:root {
    --primary: #6366f1;
    --secondary: #4f46e5;
    --success: #10b981;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    padding-top: 80px;
}

header {
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.tagline {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero {
    text-align: center;
    padding: 4rem 0 2rem;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--dark), #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto 2rem;
    font-weight: 500;
}

.download-btn {
    display: inline-block;
    background: linear-gradient(120deg, var(--primary), #7c3aed);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    padding: 16px 42px;
    border-radius: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    margin: 20px 0;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.download-btn:active {
    transform: translateY(1px);
}

.download-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20px;
    height: 200%;
    background: rgba(255,255,255,0.3);
    transform: rotate(30deg);
    transition: all 0.6s;
}

.download-btn:hover::after {
    left: 120%;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
    margin: 3rem 0;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
    border: 1px solid #e2e8f0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.card h3 {
    color: var(--primary);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    font-size: 1.4rem;
}

.card h3:before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.instructions {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin: 3rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step {
    display: flex;
    gap: 1.5rem;
}

.step-number {
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 4px;
    font-size: 1.1rem;
}

.legal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.legal-card {
    background: #f0f9ff;
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
}

.legal-card h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

/* Donation section */
.donation-section {
    background: linear-gradient(135deg, #fff9db 0%, #ffecd2 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #ffe0b2;
}

.donation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.kofi-btn {
    background: linear-gradient(120deg, #ff5f5f, #ff9e6d);
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 95, 95, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.kofi-btn:hover {
    transform: scale(1.05);
}

.paypal-btn {
    background: white;
    color: #003087;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid #003087;
}

.paypal-btn:hover {
    transform: scale(1.05);
}

.donation-disclaimer {
    background: #fff8e6;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.2rem;
    font-size: 0.95rem;
    color: #6b4226;
    border-left: 3px solid #ffc107;
}

.legal-disclaimer {
    background: #e3f2fd;
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
    border-left: 3px solid #2196f3;
    font-size: 0.95rem;
}

/* Language selector */
.language-selector {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1001;
}

.language-selector select {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.language-selector select:hover {
    background: rgba(255,255,255,0.25);
}

.language-selector select:focus {
    outline: none;
    border-color: white;
}

.language-selector select option {
    color: var(--dark);
    background: var(--light);
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    color: var(--gray);
    border-top: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    body {
        padding-top: 160px;
    }

    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.05rem;
    }
    
    .download-btn {
        width: 100%;
        padding: 14px;
        font-size: 1.15rem;
    }
    
    .step {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .language-selector {
        position: static;
        margin-top: 1rem;
        width: 100%;
    }
    
    .language-selector select {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .donation-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px !important;
    }
    
    .donation-buttons a {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

.security-badge {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.badge {
    background: white;
    padding: 8px 15px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 0.95rem;
}

.version-info {
    color: var(--gray);
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.warning-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1.2rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    font-weight: 500;
}

.update-notice {
    background: #dbeafe;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 500;
}

/* Animation for language change */
.fade-out {
    animation: fadeOut 0.3s forwards;
}

.fade-in {
    animation: fadeIn 0.3s forwards;
}

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

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