/* ==================== */
/* Reset & Base Styles  */
/* ==================== */

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

:root {
    --primary-blue: #0066cc;
    --dark-blue: #004499;
    --light-blue: #3399ff;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-white: #ffffff;
    --bg-light: #f8f8f8;
    --bg-dark: #f0f0f0;
    --border-color: #e0e0e0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== */
/* Page Container       */
/* ==================== */

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== */
/* Header               */
/* ==================== */

.header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.back-link svg {
    transition: transform 0.3s ease;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

/* ==================== */
/* Main Content         */
/* ==================== */

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.content-wrapper {
    width: 100%;
    max-width: 900px;
    text-align: center;
}

/* ==================== */
/* Logo                 */
/* ==================== */

.logo-container {
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease-out;
}

.logo {
    max-width: 300px;
    width: 100%;
    height: auto;
}

/* ==================== */
/* Title Section        */
/* ==================== */

.title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

/* ==================== */
/* Download Section     */
/* ==================== */

.download-section {
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.download-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.card-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: center;
}

/* ==================== */
/* QR Section           */
/* ==================== */

.qr-section {
    text-align: center;
}

.qr-section h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.qr-container {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.qr-code {
    width: 180px;
    height: 180px;
    display: block;
}

.qr-note {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* ==================== */
/* Divider              */
/* ==================== */

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.divider::before {
    content: '';
    width: 1px;
    height: 100px;
    background: var(--border-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.divider span {
    background: var(--bg-white);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ==================== */
/* Button Section       */
/* ==================== */

.button-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.download-btn.primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.download-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.download-btn.secondary {
    background: var(--bg-white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.download-btn.secondary:hover {
    background: var(--primary-blue);
    color: white;
}

/* ==================== */
/* Language Grid        */
/* ==================== */

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.language-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue);
}

.language-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.button-group {
    margin-top: 1.5rem;
}

/* ==================== */
/* Footer               */
/* ==================== */

.footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

/* ==================== */
/* Animations           */
/* ==================== */

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

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

/* ==================== */
/* Responsive Design    */
/* ==================== */

@media (max-width: 768px) {
    .main-content {
        padding: 2rem 1.5rem;
    }

    .download-card {
        padding: 2rem 1.5rem;
    }

    .card-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .divider {
        margin: 1rem 0;
    }

    .divider::before {
        width: 100px;
        height: 1px;
        transform: translate(-50%, -50%) rotate(0deg);
    }

    .qr-code {
        width: 150px;
        height: 150px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .logo {
        max-width: 220px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 1.5rem;
    }

    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .download-card {
        padding: 1.5rem 1rem;
    }

    .qr-code {
        width: 130px;
        height: 130px;
    }

    .download-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ==================== */
/* Accessibility        */
/* ==================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}
