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

:root {
    --primary: #E63946;
    --primary-dark: #A4161A;
    --primary-light: #F77F88;
    --secondary: #0f172a;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --success: #22c55e;
    --error: #ef4444;
    --gradient-start: #FF7043;
    --gradient-end: #E91E63;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.modern-header {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    padding: 0;
    position: relative;
    overflow: hidden;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.modern-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: white;
    text-align: center;
    flex-shrink: 0;
}

.logo-icon {
    width: 90px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

.logo-text {
    min-width: 280px;
}

.logo-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-align: center;
    line-height: 1.3;
    margin: 0;
}

.logo-text p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 0.3rem;
    text-align: left;
    margin: 0.3rem 0 0 0;
}

.main-content {
    flex: 1;
    padding: 2rem 1rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.upload-section {
    display: grid;
    gap: 1.5rem;
}

.upload-card, .info-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.dropzone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--background);
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone-icon svg {
    width: 32px;
    height: 32px;
}

.dropzone-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.dropzone-subtext {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.browse-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.browse-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.preview-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.remove-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: var(--error);
    color: white;
}

.preview-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#previewImage {
    max-width: 100px;
    max-height: 100px;
    border-radius: 12px;
    object-fit: contain;
    background: white;
    padding: 0.5rem;
    border: 1px solid var(--border);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#fileName {
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

#fileSize {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.generate-btn {
    width: 100%;
    padding: 1rem 2rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.guide-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.guide-icon {
    min-width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.guide-icon.on {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.guide-icon.off {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}


.guide-text {
    flex: 1;
}

.guide-text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.guide-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.guide-result {
    margin-top: 0.5rem !important;
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
}

.info-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 1.5rem;
    background: var(--secondary);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification.error {
    background: var(--error);
}

.notification.success {
    background: var(--success);
}

.driver-name-section {
    margin-bottom: 1.5rem;
}

.driver-name-section label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.driver-name-section input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.driver-name-section input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dual-upload {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.upload-box {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-box:hover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.02);
}

.upload-box.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-box-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-box-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    margin-bottom: 0.5rem;
}

.upload-box-icon.on {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.upload-box-icon.off {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.upload-box-text {
    font-weight: 600;
    color: var(--text-primary);
}

.upload-box-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.upload-box-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.upload-box-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 10px;
    object-fit: contain;
    background: white;
    padding: 0.25rem;
    border: 1px solid var(--border);
}

.upload-box-preview span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    word-break: break-all;
    text-align: center;
    max-width: 100%;
}

.remove-file-btn {
    background: var(--error);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-file-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

@media (max-width: 640px) {
    .dual-upload {
        grid-template-columns: 1fr;
    }
    
    .upload-box {
        min-height: 150px;
    }
}

@media (max-width: 640px) {
    .modern-header .header-content {
        padding: 1.5rem 1rem;
    }
    
    .logo-icon {
        width: 48px;
        height: 48px;
    }
    
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .logo-text p {
        font-size: 0.8rem;
    }
    
    .upload-card, .info-card {
        padding: 1.5rem;
    }
    
    .dropzone {
        padding: 2rem 1rem;
    }
    
    .sizes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
