/* ==========================================================================
   Pink Spot — brand theme
   Palette mirrors the app themes:
   - light_theme.dart : white scaffold + #FF76CE primary
   - dark_theme.dart  : #121212 scaffold, #1F1F1F surface, #FF76CE primary
   - splash _brandGradient : #FF9BDC → #FF76CE → #F64FB8 (light)
                             #9E5F88 → #934A7A → #882C68 (dark)
   ========================================================================== */

/* ---- Theme variables ---- */
:root {
    color-scheme: light;

    /* backgrounds */
    --bg: #ffffff;
    --bg-soft: #fdf2f8;
    --surface: #ffffff;

    /* text */
    --text: #1f2937;
    --text-muted: #5b6470;

    /* brand */
    --accent: #FF76CE;          /* brand pink (decorative) */
    --accent-strong: #F64FB8;   /* deep pink */
    --accent-soft: #ffe3f4;     /* tint for hovers/chips */
    --accent-text: #c42d93;     /* pink dark enough for AA text on light bg */
    --brand-gradient: linear-gradient(135deg, #FF9BDC 0%, #FF76CE 50%, #F64FB8 100%);
    --on-gradient: #ffffff;

    /* structure */
    --border: #eee1ea;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-bg-solid: rgba(255, 255, 255, 0.98);
    --shadow: 0 4px 14px rgba(31, 41, 55, 0.06);
    --shadow-lift: 0 12px 28px rgba(246, 79, 184, 0.18);

    /* footer (stays dark in both themes) */
    --footer-bg: #1f2937;
    --footer-text: #d1d5db;
    --footer-muted: #9ca3af;
    --footer-border: #374151;

    /* badges (e.g. "Coming Soon") */
    --badge-bg: #c42d93;
    --badge-text: #ffffff;

    /* phone mockup bezel */
    --bezel: #1f2937;
}

/* Dark palette — matches dark_theme.dart (#121212 / #1F1F1F / #FF76CE) */
:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #121212;
    --bg-soft: #1a1418;
    --surface: #1f1f1f;

    --text: #f3f4f6;
    --text-muted: #adb2ba;

    --accent: #FF76CE;
    --accent-strong: #FF9BDC;
    --accent-soft: #3a2333;
    --accent-text: #FF9BDC;
    --brand-gradient: linear-gradient(135deg, #9E5F88 0%, #934A7A 50%, #882C68 100%);
    --on-gradient: #ffffff;

    --border: #33292f;
    --nav-bg: rgba(18, 18, 18, 0.88);
    --nav-bg-solid: rgba(18, 18, 18, 0.97);
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lift: 0 12px 28px rgba(0, 0, 0, 0.5);

    --footer-bg: #1f1f1f;
    --footer-text: #c3c8cf;
    --footer-muted: #9aa0a8;
    --footer-border: #33292f;

    --badge-bg: #FF76CE;
    --badge-text: #121212;

    --bezel: #000000;
}

/* System preference default (when no manual choice was stored) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg: #121212;
        --bg-soft: #1a1418;
        --surface: #1f1f1f;

        --text: #f3f4f6;
        --text-muted: #adb2ba;

        --accent: #FF76CE;
        --accent-strong: #FF9BDC;
        --accent-soft: #3a2333;
        --accent-text: #FF9BDC;
        --brand-gradient: linear-gradient(135deg, #9E5F88 0%, #934A7A 50%, #882C68 100%);
        --on-gradient: #ffffff;

        --border: #33292f;
        --nav-bg: rgba(18, 18, 18, 0.88);
        --nav-bg-solid: rgba(18, 18, 18, 0.97);
        --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
        --shadow-lift: 0 12px 28px rgba(0, 0, 0, 0.5);

        --footer-bg: #1f1f1f;
        --footer-text: #c3c8cf;
        --footer-muted: #9aa0a8;
        --footer-border: #33292f;

        --badge-bg: #FF76CE;
        --badge-text: #121212;

        --bezel: #000000;
    }
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
}

::selection {
    background: var(--accent);
    color: #fff;
}

h1, h2, h3, h4 {
    letter-spacing: -0.02em;
}

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

/* ---- Navigation ---- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: var(--nav-bg-solid);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-right: auto;
    white-space: nowrap;
}

.nav-logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-text);
}

/* Theme toggle button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent-text);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 1rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 3px 0;
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--nav-bg-solid);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    gap: 0;
}

.nav-menu.active li {
    padding: 0.75rem 20px;
    border-bottom: 1px solid var(--border);
}

/* ---- Hero section ---- */
.hero {
    padding: 120px 0 80px;
    background: var(--brand-gradient);
    color: var(--on-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.94;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 26px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:focus-visible {
    outline: 2px solid var(--on-gradient);
    outline-offset: 2px;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: #ffffff;
    color: var(--accent-strong);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
    background: #fff0f9;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.btn-secondary {
    background: transparent;
    color: var(--on-gradient);
    border: 2px solid var(--on-gradient);
}

.btn-secondary:hover {
    background: var(--on-gradient);
    color: var(--accent-strong);
}

/* ---- Phone mockup ---- */
.phone-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-screen {
    width: 280px;
    height: 560px;
    background: var(--bezel);
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.app-preview {
    background: var(--brand-gradient);
    height: 100%;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    color: var(--on-gradient);
}

.preview-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.preview-text {
    text-align: center;
    margin-bottom: 15px;
}

.preview-text h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.preview-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.preview-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
}

/* ---- Features section ---- */
.features {
    padding: 88px 0;
    background: var(--bg-soft);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text);
}

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

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lift);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--brand-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--on-gradient);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- Download section ---- */
.download {
    padding: 88px 0;
    background: var(--bg);
}

.download h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.download > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.download-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.download-card {
    display: flex;
    align-items: center;
    padding: 2rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: var(--bg-soft);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    min-width: 250px;
}

.download-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.download-card.coming-soon {
    opacity: 0.65;
    cursor: not-allowed;
    position: relative;
}

.download-card.coming-soon::after {
    content: attr(data-label);
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--badge-bg);
    color: var(--badge-text);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.download-card i {
    font-size: 3rem;
    margin-right: 1rem;
    color: var(--accent-text);
}

.download-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.download-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---- About section ---- */
.about {
    padding: 88px 0;
    background: var(--bg-soft);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text);
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: start;
}

.about-text {
    max-width: 800px;
    width: 100%;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.about-text p {
    margin-bottom: 2rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-text ul {
    list-style: none;
    margin-bottom: 2rem;
}

.about-text li {
    padding: 0.75rem 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: start;
}

.about-text li::before {
    content: "♥";
    color: var(--accent);
    font-weight: bold;
    margin-right: 10px;
    font-size: 1rem;
}

.about-text li:last-child {
    border-bottom: none;
}

.about-text li strong {
    color: var(--text);
}

/* ---- Footer ---- */
.footer {
    background: var(--footer-bg);
    color: #ffffff;
    padding: 60px 0 20px;
    border-top: 1px solid var(--footer-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-section p {
    color: var(--footer-text);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--footer-border);
    color: var(--footer-muted);
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ---- Legal pages ---- */
.legal-content {
    padding: 120px 0 80px;
    min-height: 100vh;
    background: var(--bg);
}

.legal-content h1 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.legal-content .last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 3rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin: 2rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-content strong {
    color: var(--text);
}

.legal-content a {
    color: var(--accent-text);
}

.legal-content ul,
.legal-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content img {
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* ---- FAQ ---- */
.faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.faq-question {
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text);
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--accent-soft);
}

.faq-question i {
    color: var(--accent-text);
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 1.25rem 1.5rem;
    background: var(--bg-soft);
    color: var(--text-muted);
    line-height: 1.8;
    border-top: 1px solid var(--border);
}

.faq-answer.open {
    display: block;
}

/* ---- Language select ---- */
select#languageSelect {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-family: inherit;
    cursor: pointer;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s ease;
}

select#languageSelect:hover {
    border-color: var(--accent);
}

/* ---- Responsive design ---- */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg-solid);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow);
    }

    .nav-menu li {
        padding: 0.75rem 20px;
        border-bottom: 1px solid var(--border);
    }

    .hamburger {
        display: flex;
    }

    .theme-toggle {
        margin-left: 0.75rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }

    .download-options {
        flex-direction: column;
        align-items: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .legal-content h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .phone-screen {
        width: 240px;
        height: 480px;
    }
}
