/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-surface: #ffffff;
    --bg-soft: #f2f7f6;
    --bg-mist: #eef2f7;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    --primary: #0f766e;
    --primary-strong: #0d9488;
    --accent: #f97316;
    --accent-strong: #ea580c;
    --border: rgba(15, 118, 110, 0.12);
    --shadow-soft: 0 18px 40px rgba(15, 118, 110, 0.12);
    --shadow-card: 0 14px 28px rgba(15, 118, 110, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.65;
    color: var(--text-main);
    background: radial-gradient(circle at 10% 20%, #e8f5f3 0%, transparent 45%),
        radial-gradient(circle at 90% 0%, #fef3e7 0%, transparent 40%),
        linear-gradient(135deg, var(--bg-soft), var(--bg-mist));
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    z-index: 0;
}

body::before {
    top: -120px;
    left: -80px;
    background: rgba(15, 118, 110, 0.12);
}

body::after {
    bottom: -140px;
    right: -60px;
    background: rgba(249, 115, 22, 0.18);
}

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 20px;
    padding: 40px 0;
    background: transparent;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.logo {
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
    background: transparent;
}

.logo:hover {
    transform: scale(1.1);
}

/* Ensure Lottie animation fills the logo container */
.logo svg {
    width: 100% !important;
    height: 100% !important;
}

.app-name {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    margin: 0;
    line-height: 1.2;
}

.app-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 8px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 0 20px;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 42px 40px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.app-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: #e9f1f0;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.12);
}

.app-switch-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-switch-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.25);
}

.app-switch-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.edition-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(15, 118, 110, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.2);
}

.edition-badge.internal {
    color: var(--accent-strong);
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.3);
}

.card-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    text-align: center;
    margin-bottom: 10px;
}

.card-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* Form Styles */
.redeem-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

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

.form-label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.form-input {
    padding: 16px 20px;
    border: 1.5px solid rgba(15, 118, 110, 0.18);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fbfb;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.form-input::placeholder {
    color: #999;
}

.required {
    color: #e74c3c;
    margin-left: 4px;
}

.is-hidden {
    display: none;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled,
.submit-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #cbd5e1;
}

.submit-btn:disabled:hover,
.submit-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Features Section */
.features-section {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(15, 118, 110, 0.1);
}

.features-title {
    text-align: center;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.feature-item {
    text-align: center;
    padding: 25px 20px;
    background: #f7fbfb;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(15, 118, 110, 0.08);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}

.feature-desc {
    color: var(--text-light);
    line-height: 1.5;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    background: transparent;
    margin-top: 40px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    margin-bottom: 20px;
}

.success-icon, .error-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-message {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.modal-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: var(--primary-strong);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .main-content {
        padding: 0 15px;
    }
    
    .header {
        margin-bottom: 30px;
    }
    
    .logo {
        width: 70px;
        height: 70px;
        margin: 0 auto;
        background: transparent;
    }
    
    .app-name {
        font-size: 2rem;
    }
    
    .card, .features-section {
        padding: 25px 20px;
    }
    
    .card-title {
        font-size: 1.6rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-input {
        padding: 14px 16px;
    }
    
    .submit-btn {
        padding: 16px 25px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    
    .main-content {
        padding: 0 10px;
    }
    
    .card, .features-section {
        padding: 20px 15px;
    }

    .switch-row {
        justify-content: center;
    }
    
    .app-name {
        font-size: 1.8rem;
    }
    
    .card-title {
        font-size: 1.4rem;
    }
    
    .features-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: radial-gradient(circle at 10% 20%, #0f2e2a 0%, transparent 45%),
            radial-gradient(circle at 90% 0%, #3a2516 0%, transparent 40%),
            linear-gradient(135deg, #0b1318, #101b22);
        color: #e2e8f0;
    }

    .card, .features-section {
        background: rgba(15, 23, 42, 0.9);
        color: #e2e8f0;
        border-color: rgba(148, 163, 184, 0.15);
    }

    .app-switch {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(148, 163, 184, 0.15);
    }

    .app-switch-btn {
        color: #cbd5f5;
    }

    .form-input {
        background: rgba(15, 23, 42, 0.8);
        border-color: rgba(148, 163, 184, 0.25);
        color: #e2e8f0;
    }

    .form-input:focus {
        background: rgba(15, 23, 42, 0.9);
    }

    .feature-item {
        background: rgba(15, 23, 42, 0.8);
        border-color: rgba(148, 163, 184, 0.15);
    }

    .card-title, .features-title, .feature-title, .form-label {
        color: #f8fafc;
    }

    .card-subtitle, .feature-desc, .modal-message, .app-tagline, .footer {
        color: #cbd5f5;
    }
}
