/* GalCiv2 Theme — Dark, classic blue with gold accents */

/* Site nav uses Bai Jamjuree (Google Fonts) — clean condensed sans that
   matches the techy/sci-fi feel of the legacy GC2 button strip. */
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@500;600;700&display=swap');

/* Section 1: Variable overrides */
.theme-galciv2 {
    --accent-color: #555555;
    --accent-color-text: #FDFDFD;
    --background: #000000;
    --alternate-background: #181818;
    --text-color: #FDFDFD;
    --secondary-text-color: #9C9C9C;
    --table-text-color: #FDFDFD;
    --link-color: #FFB400;
    --border-color: #666666;
    --border-color-gradient: #313131;
    --header-background: linear-gradient(to bottom,#8C8D91 0%,#3D3E44 42%,#242529 100%);
    --header-text-color: #FDFDFD;
    --menu-background: linear-gradient(to bottom,#c3c3c3 0%,#dedede 1%,#e6e6e6 2%,#e6e6e6 55%,#d2d2d2 56%,#cbcbcb 100%);
    --menu-text-color: #000000;
    --section-header-background: #555555;
    --section-header-background-2: #555555;
    --section-header-background-3: #555555;
    --section-header-text-color: #FDFDFD;
    --body-background: #0A0A0A;
    --body-text-color: #E0E0E0;
    --nav-gradient: linear-gradient(to bottom,#444444 0%,#555555 100%);
    --nav-border-color: #666666;
    --error-background: #2D0000;
    --error-text-color: #FF6B6B;
    --error-border-color: #8B0000;
    --success-text-color: #4CAF50;
    --message-background: #2D2200;
    --message-text-color: #FFD54F;
    --message-border-color: #8B6914;
    --post-quote-background: #1A1A0A;
    --post-quote-text-color: #E0D8C0;
    --post-quote-border-color: #665500;
    --post-quote-header-background: #332B00;
    --post-quote-header-text-color: #FFC800;
    --search-highlight-text-color: #45D5F7;
    --tooltip-background-color: #181818;
    --tooltip-border-color: #666666;
    --tooltip-color: #FDFDFD;
    --tooltip-highlight-color: #FFB400;
    --tooltip-de-emphasize-color: #8D8D8D;
    --table-header-background: #000000;
    --main-accent-color: #45D5F7;
    --sub-alert-background-color: var(--link-color);
    --sub-alert-text-color: #FDFDFD;
    --sub-alert-link-color: #000000;
}
    /* Section 2: Site header overrides */
    .theme-galciv2 .sd-site-header {
        background: var(--header-background);
        border-bottom-color: var(--accent-color);
    }

    .theme-galciv2 .sd-site-title {
        color: var(--header-text-color);
    }
    /* Section 3: Breadcrumb bar */
    .theme-galciv2 .sd-breadcrumbs li:not(:last-child)::after {
        color: var(--border-color);
    }
    /* Section 4: Forum listing rows */
    .theme-galciv2 .sd-thread-item:hover,
    .theme-galciv2 .sd-thread-item:nth-child(even):hover,
    .theme-galciv2 .sd-category-row:hover,
    .theme-galciv2 .sd-category-table tbody tr:nth-child(even):hover {
        background: rgba(255,180,0,.1);
    }
    /* Section 5: Thread group labels and section headers */


    .theme-galciv2 .sd-thread-list-header {
        background: #0F0F0F;
    }
    /* Section 6: Post container headers (for thread view) */
    .theme-galciv2 .sd-post-header {
        background: linear-gradient(to bottom,#3D3D3D 0%,#2A2A2A 100%);
        border-bottom: 1px solid var(--accent-color);
    }

    .theme-galciv2 .sd-post-header__username a {
        color: var(--post-quote-header-text-color);
        font-weight: 600;
    }
    /* Section 7: Buttons and links */
    .theme-galciv2 .sd-btn-primary {
        background-color: var(--accent-color);
        color: var(--accent-color-text);
    }

        .theme-galciv2 .sd-btn-primary:hover {
            background-color: var(--border-color);
        }

    .theme-galciv2 .sd-btn-secondary {
        border-color: var(--border-color);
        color: var(--text-color);
    }

        .theme-galciv2 .sd-btn-secondary:hover {
            background: #1A1A1A;
        }
    /* Section 8: Thread icon states */
    .theme-galciv2 .sd-thread-icon--unread {
        color: var(--post-quote-header-text-color);
    }

    .theme-galciv2 .sd-thread-icon--read {
        color: var(--border-color);
    }
    /* Section 9: Pagination */
    .theme-galciv2 .sd-thread-tray__page-link {
        border-color: var(--border-color);
        color: var(--link-color);
    }

        .theme-galciv2 .sd-thread-tray__page-link:hover {
            background: var(--accent-color);
            color: var(--accent-color-text);
        }
    /* Section 10: Sidebar */
    .theme-galciv2 .sd-sidebar {
    }
    /* Section 11: Forum jump */
    .theme-galciv2 .sd-forum-jump__select {
        border-color: var(--border-color);
        background: var(--alternate-background);
        color: var(--text-color);
    }
    /* Section 12: Category rows (home page) — hover unified in Section 4 */
    .theme-galciv2 .sd-category-header {
        background: linear-gradient(to bottom,var(--accent-color) 0%,#3D3D3D 100%);
        color: var(--section-header-text-color);
        border-bottom: 1px solid #333333;
    }
    /* Section 13: Moderators bar */
    .theme-galciv2 .sd-moderators {
        background: #0F0F0F;
        border-top-color: #333333;
    }
    /* Section 14: Spoiler text */
    .theme-galciv2 .spoiler {
        background: var(--link-color);
        color: var(--link-color);
    }

        .theme-galciv2 .spoiler:hover, .theme-galciv2 .spoiler.revealed {
            background: transparent;
            color: inherit;
        }
    /* Section 15: Quote blocks */
    .theme-galciv2 .sd-quote {
        background: var(--post-quote-background);
        border-left: 3px solid var(--post-quote-border-color);
        padding: .5rem .75rem;
    }

    .theme-galciv2 .sd-quote-header {
        background: var(--post-quote-header-background);
        color: var(--post-quote-header-text-color);
        padding: .25rem .5rem;
        font-size: .8rem;
        font-weight: 600;
    }

    /* Content area background */
    .theme-galciv2 .sd-content-area {
        background: var(--body-background);
    }
    /* Dark-theme override — whiten the Stardock-reply badge so the Stardock S shows on dark backgrounds like the legacy forums. */
    .theme-galciv2 .sd-stardock-reply {
        filter: brightness(0) invert(1);
    }

    /* Section 17: Site nav overrides — pulls visual cues from the legacy GalCiv2
   metal/silver button strip (deep navy band, brushed-steel item gradient,
   cyan accent glow) but keeps the modern horizontal layout from
   site-nav.css (centered max-1760px bar, 50px tall). */
    .theme-galciv2 .site-nav {
        --site-nav-bg: transparent;
        --site-nav-text: #d6e6f5;
        --site-nav-hover-bg: linear-gradient(to bottom, #6a7d92 0%, #3a4a5e 50%, #1f2a3a 100%);
        --site-nav-active-bg: linear-gradient(to bottom, #7a8da2 0%, #4a5a6e 50%, #2a3a4e 100%);
        --site-nav-border-color: #2c4f7a;
        --site-nav-height: 48px;
        padding-bottom: 1.5rem;
        padding-top: 1rem;
        font-family: 'Bai Jamjuree', 'Segoe UI', Arial, sans-serif;
    }

    /* Deep navy band with brushed-metal sheen and cyan hairline borders top and
   bottom — the modern equivalent of the legacy panel that framed the button
   stack. */
    .theme-galciv2 .site-nav__bar {
        background: linear-gradient(to right, transparent, #45a5e5 5%, #45a5e5 95%, transparent) no-repeat scroll left top, linear-gradient(to right, transparent, #45a5e5 5%, #45a5e5 95%, transparent) no-repeat scroll left bottom, linear-gradient(to bottom, #1a2b42 0%, #0a1626 50%, #1a2b42 100%);
        background-size: 100% 1px, 100% 1px, 100% 100%;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -8px 12px rgba(0,0,0,.4);
        max-width: 1760px;
        justify-content: center;
    }

    .theme-galciv2 .site-nav__menu {
        margin: 0;
        align-items: center;
    }

    /* Center the brushed-steel pills vertically within the 48px bar — the
   default .site-nav__item is full-bar-height, so without this the 30px
   pills hug the top edge. */
    .theme-galciv2 .site-nav__item {
        align-items: center;
        height: 97%;
        border-left: 1px solid #2c4f7a;
        border-right: 1px solid #2c4f7a;
    }

        /* Brushed-steel pill items — subtle vertical gradient with cyan top edge that
   brightens on hover, mirroring the embossed look of the legacy buttons. */
        .theme-galciv2 .site-nav__item a {
            color: #d6e6f5;
            font-weight: 600;
            padding: 0 1.1rem;
            text-shadow: 0 1px 2px #000;
            transition: background .2s ease-in-out, box-shadow .2s ease-in-out, border-color .2s ease-in-out;
        }

        .theme-galciv2 .site-nav__item:first-child {
            border-left: 2px solid #2c4f7a;
        }

        .theme-galciv2 .site-nav__item:last-child {
            border-right: 2px solid #2c4f7a;
        }

        .theme-galciv2 .site-nav__item a:hover {
            background: linear-gradient(to bottom, #7ab0e0 0%, #26416e 33%, #26416e 66%, #7ab0e0 100%);
            border-top-color: #7ab0e0;
            box-shadow: 0 0 8px rgba(69,165,229,.6), inset 0 1px 0 rgba(255,255,255,.15);
            color: #ffffff;
        }

    .theme-galciv2 .site-nav__item--active a {
        background: linear-gradient(to bottom, #7ab0e0 0%, #26416e 50%, #7ab0e0 100%);
        border-color: #7ab0e0;
        box-shadow: 0 0 6px rgba(69,165,229,.5), inset 0 1px 0 rgba(255,255,255,.2);
        color: #ffffff;
    }

    /* Logo — the GC2 title art sits centered in the bar, slightly elevated. */
    .theme-galciv2 .site-nav__logo {
        padding: 0 1rem 0 0;
    }

        .theme-galciv2 .site-nav__logo img {
            max-height: 81px;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
        }

    /* Purchase CTA — keep the green-button identity but layer in the same metal
   border treatment so it reads as part of the GC2 strip. */
    .theme-galciv2 .site-nav__store {
        background: linear-gradient(to bottom, #3bb33b 0%, #288a28 50%, #3bb33b 100%);
        border: 1px solid #1a661a;
        border-top-color: #8be08b;
        height: 97%;
        padding: 0 1.25rem;
        font-weight: 600;
        text-shadow: 0 1px 2px #000;
    }

        .theme-galciv2 .site-nav__store:hover {
            background: linear-gradient(to bottom, #288a28 0%, #3bb33b 50%, #288a28 100%);
            border-top-color: #a0f0a0;
            box-shadow: 0 0 8px rgba(92,184,92,.6), inset 0 1px 0 rgba(255,255,255,.15);
            text-decoration: none;
        }

/* Section 18: Body background — same starscape used by the Stardock.net
   theme (1920x1120 page_bg.jpg). Cover sizing fills any viewport without
   distortion; scroll-attached + scaled down on mobile because iOS drops
   `fixed` backgrounds. */
.theme-galciv2 {
    background: #000 url(https://www.stardock.com/games/images/page_bg.jpg) no-repeat fixed center top;
    background-size: cover;
}

@media (max-width: 900px) {
    .theme-galciv2 {
        background-attachment: scroll;
        background-size: 1280px auto;
    }
}

/* Section 19: Mobile drawer + site-nav hide — at ≤850px the desktop site-nav
   is fully hidden and the drawer (triggered from the Stardock header's
   "Galactic Civilizations II Menu" item) takes over navigation. */
@media (max-width: 850px) {
    .theme-galciv2 .site-nav {
        display: none;
    }
}

.sd-galciv2-drawer {
    position: fixed;
    top: 0;
    left: -260px;
    width: 240px;
    height: 100%;
    background: linear-gradient(to bottom, #0a1626 0%, #050b14 100%);
    border-right: 2px solid #45a5e5;
    box-shadow: 4px 0 12px rgba(0,0,0,.5);
    z-index: 2000;
    transition: left 0.35s ease;
    overflow-y: auto;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.sd-galciv2-drawer--open {
    left: 0;
}

.sd-galciv2-drawer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sd-galciv2-drawer > ul > li {
    background: linear-gradient(to bottom, #1a2b42 0%, #0a1626 50%, #1a2b42 100%);
    border-bottom: 1px solid #2c4f7a;
    border-top: 1px solid rgba(255,255,255,.04);
    padding: 0.75em 0;
}

    .sd-galciv2-drawer > ul > li > a {
        display: block;
        color: #d6e6f5;
        text-decoration: none;
        padding: 0 1em;
    }

        .sd-galciv2-drawer > ul > li > a > span {
            color: #d6e6f5;
            font-weight: 600;
            font-size: 1.05em;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            text-shadow: 0 1px 2px #000;
        }

        .sd-galciv2-drawer > ul > li > a:hover > span,
        .sd-galciv2-drawer > ul > li.sd-galciv2-drawer__active > a > span {
            color: #ffffff;
            text-shadow: 0 0 8px rgba(69,165,229,.8), 0 1px 2px #000;
        }

    /* Purchase CTA in drawer — green identity matching the desktop store pill. */
    .sd-galciv2-drawer > ul > li.sd-galciv2-drawer__store {
        background: linear-gradient(to bottom, #2d8b2d 0%, #1a661a 100%);
        border-bottom: 1px solid #1a661a;
        border-top-color: #8be08b;
    }

        .sd-galciv2-drawer > ul > li.sd-galciv2-drawer__store > a > span {
            color: #ffffff;
            text-shadow: 0 1px 2px #000;
        }

        .sd-galciv2-drawer > ul > li.sd-galciv2-drawer__store > a:hover > span {
            color: #c8ffd0;
            text-shadow: 0 0 6px rgba(92,184,92,.8), 0 1px 2px #000;
        }

    /* Close — sits at bottom, darker treatment so it reads as "dismiss". */
    .sd-galciv2-drawer > ul > li.sd-galciv2-drawer__close {
        background: linear-gradient(to bottom, #1a1a1a 0%, #000000 100%);
        border-top: 1px solid #45a5e5;
    }

/* New Topic — GalCiv2 brushed-blue pill matching the nav strip palette. */
.theme-galciv2 .sd-forumhead__new-topic {
    background: linear-gradient(to bottom, #4a7ab8 0%, #2c5a98 50%, #1f4378 100%);
    border: 1px solid #45a5e5;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 4px rgba(0,0,0,.3), 0 0 6px rgba(69,165,229,.4);
    border-radius: 4px;
    color: #FFFFFF;
    font-family: 'Bai Jamjuree', 'Segoe UI', Arial, sans-serif;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px #000;
}

    .theme-galciv2 .sd-forumhead__new-topic:hover {
        background: linear-gradient(to bottom, #5a8ac8 0%, #3669a8 50%, #265288 100%);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.3), 0 0 10px rgba(69,165,229,.6);
        opacity: 1;
    }
