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

:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --text-color: #1a1a2e;
    --text-secondary: #666;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow);
    animation: slideUp 0.5s ease-out;
}

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

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.logo svg {
    width: 40px;
    height: 40px;
    fill: white;
}

h1 {
    color: var(--text-color);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #e5e5e5;
}

/* Loader */
.loader {
    display: none;
    padding: 20px 0;
}

.loader.active {
    display: block;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.status {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Store Badges */
.store-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.store-link {
    display: block;
    transition: transform 0.2s ease;
}

.store-link:hover {
    transform: scale(1.05);
}

.store-badge {
    height: 48px;
}

.store-badge.google-play {
    height: 72px;
    margin: -12px 0;
}

/* Browser Option */
.browser-option {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.browser-option p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.link:hover {
    text-decoration: underline;
}

/* Hidden State */
.hidden {
    display: none !important;
}

/* Footer */
footer {
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Error State */
.error-icon {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-icon svg {
    width: 32px;
    height: 32px;
    fill: #ef4444;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 32px 24px;
        border-radius: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 15px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .logo {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

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

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a2e;
        --card-bg: #2d2d44;
        --text-color: #ffffff;
        --text-secondary: #a0a0a0;
    }

    .btn-secondary {
        background: #3d3d5c;
        color: white;
    }

    .btn-secondary:hover {
        background: #4d4d6c;
    }

    .store-badges,
    .browser-option {
        border-top-color: #3d3d5c;
    }
}
