:root {
    /* Light Theme Colors - Professional Palette */
    --bg-primary: #fafbfc;
    --bg-secondary: #f5f7fa;
    --bg-card: #ffffff;
    --bg-hover: #f0f2f5;
    
    /* Professional Brand Colors - Slate/Indigo */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.08);
    --primary-dark: #3730a3;
    
    --accent: #6366f1;
    --accent-light: rgba(99, 102, 241, 0.1);
    
    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #ffffff;
    
    /* Border & Shadow */
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    
    /* Status Colors */
    --success: #059669;
    --success-light: rgba(5, 150, 105, 0.1);
    --error: #dc2626;
    --error-light: rgba(220, 38, 38, 0.1);
    --warning: #d97706;
    --warning-light: rgba(217, 119, 6, 0.1);
    --info: #0284c7;
    --info-light: rgba(2, 132, 199, 0.1);
}

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

body {
    font-family: 'IBM Plex Sans', 'Source Sans Pro', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    position: relative;
}

/* Professional Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Sans Pro', 'IBM Plex Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.logo-text, .section-title, .card-title {
    font-family: 'Source Sans Pro', 'IBM Plex Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
}

button, .download-button, .download-link-button {
    font-family: 'IBM Plex Sans', 'Source Sans Pro', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 280px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, rgba(99, 102, 241, 0.02) 100%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 560px;
    margin: 0 auto;
    padding: 80px 24px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 0;
    border-bottom: none;
}

.logo-text {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.logo-text .brand {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.header-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Download Section */
.download-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 16px;
    padding: 48px 40px;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.download-header {
    text-align: center;
    margin-bottom: 36px;
}

.download-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    border-radius: 14px 14px 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Status Message */
.status-message {
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: 12px 12px 0 12px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.status-message.visible {
    display: block;
}

.status-message.success {
    background: var(--success-light);
    border: 1px solid var(--success);
    color: #047857;
}

.status-message.error {
    background: var(--error-light);
    border: 1px solid var(--error);
    color: #991b1b;
}

.status-message.warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    color: #92400e;
}

.status-message.info {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    color: var(--primary-dark);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form */
.download-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: opacity 0.3s ease;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.required-asterisk {
    color: var(--error);
    font-weight: 700;
    margin-right: 4px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    border: 1.5px solid var(--border);
    border-radius: 10px 10px 0 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    background: var(--bg-card);
}

.form-input:hover:not(:focus) {
    border-color: var(--border-hover);
    background: var(--bg-secondary);
}

.form-input:disabled {
    background: var(--bg-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.input-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
    line-height: 1.4;
}

.input-error {
    font-size: 0.8125rem;
    color: var(--error);
    min-height: 20px;
    display: none;
    margin-top: 6px;
}

.input-error.visible {
    display: block;
}

/* Download Button */
.download-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: 0.01em;
    border: none;
    border-radius: 10px 10px 0 10px;
    cursor: pointer;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--primary-hover) 100%);
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.download-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.download-button:hover::before {
    left: 100%;
}

.download-button:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 50%, var(--accent) 100%);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.download-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.1);
}

.download-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.download-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.download-button.loading .button-text {
    opacity: 0;
}

.download-button.loading .button-loader {
    display: block;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Info Section */
.info-section {
    padding: 0;
}

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

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-list li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.info-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 400;
    opacity: 0.6;
}

/* Processing State */
.processing-state {
    margin-top: 32px;
    padding: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px 12px 0 12px;
    text-align: center;
}

.processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.processing-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.processing-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.processing-subtext {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

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

/* Download Link Section */
.download-link-section {
    margin-top: 32px;
    padding: 32px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    border: 1px solid var(--primary);
    border-radius: 12px 12px 0 12px;
    text-align: center;
}

.download-link-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.download-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.download-link-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 12px 12px 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.download-link-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.download-link-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--primary);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 10px 10px 0 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.download-link-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

.download-link-button:active {
    transform: translateY(0);
}

.invoice-link-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--success);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 10px 10px 0 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.invoice-link-button:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(5, 150, 105, 0.3);
}

.invoice-link-button:active {
    transform: translateY(0);
}

/* Info Widget */
.info-widget {
    position: fixed;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
}

.info-widget:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.info-widget:active {
    transform: scale(1.05);
}

/* Mobile: Bottom Right */
@media (max-width: 768px) {
    .info-widget {
        bottom: 24px;
        right: 24px;
    }
}

/* Desktop: Top Right */
@media (min-width: 769px) {
    .info-widget {
        top: 24px;
        right: 24px;
    }
}

/* Support Section */
.support-section {
    padding: 24px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.support-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.support-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.support-link:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-hover);
}

/* Footer */
.footer {
    margin-top: 80px;
    padding: 48px 40px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 16px 16px 0 16px;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.footer-brand-section {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Source Sans Pro', 'IBM Plex Sans', 'Roboto', sans-serif;
    letter-spacing: -0.02em;
    margin: 0 0 8px 0;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 6px 0;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s ease;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-link:hover::after {
    width: 100%;
}

/* Copyright */
.copyright {
    margin-top: 24px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.copyright-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 0.9375rem;
    }

    .container {
        padding: 40px 20px;
    }

    .header {
        margin-bottom: 40px;
        padding-bottom: 24px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .header-subtitle {
        font-size: 0.875rem;
    }

    .download-section {
        padding: 32px 24px;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .section-description {
        font-size: 0.875rem;
    }

    .form-label {
        font-size: 0.8125rem;
    }

    .form-input {
        font-size: 0.9375rem;
        padding: 12px 14px;
    }

    .download-button {
        font-size: 0.875rem;
        padding: 12px 20px;
    }

    .processing-text {
        font-size: 0.9375rem;
    }

    .processing-subtext {
        font-size: 0.8125rem;
    }

    .download-link-text {
        font-size: 0.9375rem;
    }

    .download-link-button {
        font-size: 0.875rem;
        padding: 12px 24px;
    }

    .support-text {
        font-size: 0.8125rem;
    }

    .footer {
        padding: 32px 24px;
    }

    .footer-brand {
        font-size: 1.25rem;
    }

    .footer-links {
        gap: 24px;
    }

    .footer-link {
        font-size: 0.8125rem;
    }

    .copyright {
        padding: 16px 0;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.875rem;
    }

    .container {
        padding: 32px 16px;
    }

    .logo-text {
        font-size: 1.375rem;
    }

    .header-subtitle {
        font-size: 0.8125rem;
    }

    .download-section {
        padding: 24px 20px;
    }

    .section-title {
        font-size: 1rem;
    }

    .section-description {
        font-size: 0.8125rem;
    }

    .form-label {
        font-size: 0.75rem;
    }

    .form-input {
        font-size: 0.875rem;
        padding: 11px 12px;
    }

    .download-button {
        font-size: 0.8125rem;
        padding: 11px 18px;
    }

    .processing-text {
        font-size: 0.875rem;
    }

    .processing-subtext {
        font-size: 0.75rem;
    }

    .download-link-text {
        font-size: 0.875rem;
    }

    .download-link-button {
        font-size: 0.8125rem;
        padding: 11px 20px;
    }

    .support-text {
        font-size: 0.75rem;
    }

    .footer {
        padding: 24px 20px;
    }

    .footer-brand {
        font-size: 1.125rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }

    .footer-link {
        font-size: 0.75rem;
    }

    .copyright-text {
        font-size: 0.6875rem;
    }

    .download-icon {
        width: 48px;
        height: 48px;
    }
}
