/* Gacha Fan Site — Pastel Anime Theme */

:root {
    --primary: #e056a0;
    --primary-dark: #c4408a;
    --primary-light: #fce4f0;
    --accent: #7c5cfc;
    --accent-light: #ede8ff;
    --cyan: #38bdf8;
    --cyan-light: #e0f7ff;
    --bg: #fdf6f9;
    --surface: #ffffff;
    --text: #2d1b35;
    --text-secondary: #6b5578;
    --border: #f0dce6;
    --shadow: 0 2px 8px rgba(224, 86, 160, 0.08), 0 1px 3px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 24px rgba(224, 86, 160, 0.12), 0 4px 8px rgba(0,0,0,0.05);
    --radius: 10px;
    --radius-lg: 14px;
    --max-width: 1200px;
    --sidebar-width: 280px;
    --gap: 24px;
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    min-height: 100vh;
    font-size: 16px;
}

a { color: #b0336e; text-decoration: none; transition: color 0.2s; }
a:hover { color: #8a2556; text-decoration: underline; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ======= HEADER ======= */
header {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow);
    position: static;
}

.header-inner {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo:hover { color: var(--primary-dark); text-decoration: none; }
.site-logo i { font-size: 1.3rem; }

.unofficial-notice {
    background: #fef3c7;
    color: #92400e;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Nav */
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    padding: 7px 13px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

.nav-dropdown { position: relative; }

.nav-dropdown-btn { display: flex; align-items: center; gap: 4px; }

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 260px;
    z-index: 200;
    padding: 6px;
}

.nav-dropdown:hover .nav-dropdown-content { display: block; }

.nav-dropdown-content a {
    display: block;
    padding: 8px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.86rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.nav-dropdown-content a:hover, .nav-dropdown-content a.active {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

.arrow { font-size: 0.7em; margin-left: 2px; }

/* ======= BURGER MENU ======= */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: background 0.2s;
}
.mobile-menu-btn:hover { background: var(--primary-light); }

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Burger animation when open */
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ======= MAIN LAYOUT ======= */
.main-layout {
    display: flex;
    gap: var(--gap);
    max-width: var(--max-width);
    margin: var(--gap) auto;
    padding: 0 20px;
}

.content-area { flex: 1; min-width: 0; }

.sidebar { width: var(--sidebar-width); flex-shrink: 0; }

/* ======= BREADCRUMBS ======= */
.breadcrumbs {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .separator { margin: 0 8px; color: #c8adb8; }

/* ======= GAME HEADER ======= */
.game-header {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: var(--gap);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.game-header h1 {
    color: var(--text);
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 14px;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
    background: linear-gradient(135deg, #b8357a, #5a3ad4);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}

/* ======= INTRODUCTION ======= */
.introduction {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    margin-bottom: var(--gap);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text);
    font-size: 1.05rem;
}

/* ======= ARTICLE CONTENT ======= */
.game-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: var(--gap);
    line-height: 1.8;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.game-content h2 {
    color: var(--text);
    margin: 32px 0 14px;
    font-size: 1.55rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}
.game-content h2:first-child { margin-top: 0; }

.game-content h3 { color: var(--text); margin: 22px 0 10px; font-size: 1.2rem; }
.game-content p { margin-bottom: 14px; color: var(--text-secondary); }
.game-content ul, .game-content ol { margin: 14px 0; padding-left: 28px; color: var(--text-secondary); }
.game-content li { margin: 7px 0; }

.game-content a {
    color: #b0336e;
    text-decoration: none;
    border-bottom: 1px dashed #b0336e;
    transition: all 0.2s;
}
.game-content a:hover {
    color: #8a2556;
    border-bottom-style: solid;
    text-decoration: none;
}

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

.game-content blockquote {
    background: linear-gradient(135deg, #fdf6f9, #ede8ff);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    margin: 18px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}

/* Table wrapper for responsive scroll */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 18px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.game-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 480px;
}

.game-content th, .game-content td {
    padding: 11px 14px;
    border: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.game-content th {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    font-weight: 600;
    color: var(--text);
    position: sticky;
    top: 0;
}

.game-content td { color: var(--text-secondary); white-space: normal; }

/* ======= FAQ SECTION ======= */
.faq-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: var(--gap);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.faq-section h2 { margin-bottom: 18px; font-size: 1.45rem; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--primary); }

.faq-question {
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    color: var(--text);
    transition: background 0.2s;
}

.faq-question:hover { background: var(--primary-light); }

.faq-icon { font-size: 1.2rem; transition: transform 0.3s ease; color: var(--primary); }

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer { max-height: 500px; }

.faq-answer p { padding: 0 18px 14px; color: var(--text-secondary); margin: 0; }

/* ======= RELATED PAGES ======= */
.related-pages {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: var(--gap);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.related-pages h3 { margin-bottom: 14px; font-size: 1.15rem; }

.related-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s;
    border: 1px solid transparent;
}

.related-link:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(224, 86, 160, 0.25);
}

/* ======= SIDEBAR ======= */
.sidebar-widget {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.sidebar-widget h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget p { font-size: 0.9rem; color: var(--text-secondary); }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

/* ======= FOOTER ======= */
footer {
    padding: 32px 0 20px;
    margin-top: 40px;
    border-top: 2px solid var(--border);
    background: var(--surface);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 28px;
    margin-bottom: 24px;
}

.footer-col h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li { margin: 5px 0; }

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-col a:hover { color: var(--primary); text-decoration: none; }

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

.footer-disclaimer {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #92400e;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.footer-copy { font-size: 0.82rem; color: var(--text-secondary); }

/* ======= DOWNLOAD BUTTON ======= */
.download-btn,
.game-content .download-btn,
.game-content a.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #b8357a, #5a3ad4) !important;
    color: #fff !important;
    padding: 14px 32px;
    border-radius: var(--radius-lg);
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(184, 53, 122, 0.35);
    border: none !important;
    border-bottom: none !important;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.download-btn:hover,
.game-content .download-btn:hover,
.game-content a.download-btn:hover {
    background: linear-gradient(135deg, #a02e6a, #4c30b8) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 53, 122, 0.45);
    text-decoration: none !important;
    color: #fff !important;
    border-bottom: none !important;
}

.download-btn i { font-size: 1.1rem; }

/* ======= GAME CARD (for series/mods listings) ======= */
.game-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 14px;
    transition: all 0.25s;
    box-shadow: var(--shadow);
}
.game-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.game-card h3 a {
    color: var(--text);
    text-decoration: none;
}
.game-card h3 a:hover { color: var(--primary); }

/* ======= IMAGES ======= */
.game-figure { margin: 22px 0; text-align: center; }
.game-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: block;
    margin: 0 auto;
}
.game-header-figure { margin: 16px 0 0; text-align: center; }
.game-header-img { width: 100%; border-radius: var(--radius-lg); }
figure figcaption {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-style: italic;
}

/* ======= AUTHOR BOX ======= */
.author-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin: 30px 20px 0;
    max-width: calc(var(--max-width) - 40px);
    margin-left: auto;
    margin-right: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.author-avatar svg { display: block; }
.author-label { font-size: 0.78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.author-name { font-weight: 600; color: var(--primary); text-decoration: none; display: block; margin: 2px 0; }
.author-name:hover { text-decoration: underline; }
.author-desc { font-size: 0.85rem; color: var(--text-secondary); margin: 4px 0 0; }
.author-page-box { text-align: center; margin-bottom: 30px; }
.author-avatar-large svg { width: 96px; height: 96px; margin: 0 auto 12px; display: block; }
.author-role { color: var(--text-secondary); }

/* ======= WIKI-STYLE INLINE LINKS ======= */
.game-content a.wiki-link {
    color: var(--primary);
    border-bottom: 1px dashed var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}
.game-content a.wiki-link:hover {
    color: var(--primary-dark);
    border-bottom-style: solid;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 1024px) {
    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }

    .header-inner { flex-wrap: wrap; padding: 10px 16px; }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid var(--border);
        margin-top: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        opacity: 0;
    }

    nav.open {
        display: flex;
        max-height: 800px;
        opacity: 1;
    }

    .nav-dropdown { border-bottom: 1px solid var(--border); }
    .nav-dropdown:last-child { border-bottom: none; }

    .nav-dropdown-btn {
        width: 100%;
        justify-content: space-between;
        padding: 10px 14px;
    }

    .nav-dropdown-btn .arrow {
        transition: transform 0.3s ease;
        font-size: 0.8em;
    }

    .nav-dropdown.open .nav-dropdown-btn .arrow {
        transform: rotate(180deg);
    }

    .nav-dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 8px 20px;
        display: none;
        min-width: auto;
        background: var(--primary-light);
        border-radius: 0 0 var(--radius) var(--radius);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }

    .nav-dropdown.open .nav-dropdown-content {
        display: block;
        max-height: 500px;
        padding: 6px 6px 10px 20px;
    }

    .nav-dropdown-content a {
        padding: 7px 12px;
        font-size: 0.85rem;
    }

    .game-header h1 { font-size: 1.5rem; }
    .game-header { padding: 20px; }
    .game-content { padding: 20px; }
    .game-content h2 { font-size: 1.3rem; }

    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 480px) {
    .header-left { gap: 8px; }
    .site-logo { font-size: 1.3rem; }
    .unofficial-notice { font-size: 0.65rem; padding: 2px 8px; }
    .game-header h1 { font-size: 1.3rem; }
    .badges { gap: 6px; }
    .badge { font-size: 0.75rem; padding: 4px 10px; }
    .footer-grid { grid-template-columns: 1fr; }
    .download-btn { padding: 12px 24px; font-size: 0.95rem; }
}

/* ======= DOWNLOAD BUTTONS GROUP ======= */
.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    align-items: center;
}

.download-btn-secondary,
.game-content .download-btn-secondary,
.game-content a.download-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface) !important;
    color: #9b2d74 !important;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s;
    border: 2px solid #b8357a !important;
    border-bottom: 2px solid #b8357a !important;
}

.download-btn-secondary:hover,
.game-content .download-btn-secondary:hover,
.game-content a.download-btn-secondary:hover {
    background: var(--primary-light) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 53, 122, 0.2);
    text-decoration: none !important;
    color: #7a2460 !important;
}

.store-btn,
.game-content .store-btn,
.game-content a.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    border: none !important;
    border-bottom: none !important;
}

.store-btn:hover,
.game-content .store-btn:hover,
.game-content a.store-btn:hover {
    transform: translateY(-1px);
    text-decoration: none !important;
    color: #fff !important;
    border-bottom: none !important;
}

.store-btn-google,
.game-content a.store-btn-google {
    background: #01875f !important;
    box-shadow: 0 3px 10px rgba(1, 135, 95, 0.3);
}
.store-btn-google:hover { background: #017050 !important; box-shadow: 0 5px 14px rgba(1, 135, 95, 0.4); }

.store-btn-apple,
.game-content a.store-btn-apple {
    background: #1a1a1a !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.store-btn-apple:hover { background: #333 !important; box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3); }

.file-info {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }
