* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
}

p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.upload-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

label[for="csvFile"] {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

label[for="csvFile"]:hover {
    background: #2980b9;
}

#fileName {
    margin-left: 15px;
    color: #666;
    font-style: italic;
}

.discount-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.input-group input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
}

button {
    width: 100%;
    padding: 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover:not(:disabled) {
    background: #219a52;
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.preview-section, .results-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

#csvPreview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.csv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.csv-table th,
.csv-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.csv-table th {
    background: #f4f4f4;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.csv-table tr:nth-child(even) {
    background: #f9f9f9;
}

.results-content {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
}

.success-message {
    color: #27ae60;
    font-weight: 600;
    margin-bottom: 10px;
}

.error-message {
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 10px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.stat-number {
    font-size: 1.5em;
    font-weight: 700;
    color: #3498db;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .discount-inputs {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
}