/* GalCiv3 Theme — Dark sci-fi, blue/cyan accents */
/* Section 1: Variable overrides */
.theme-galciv3 {
    --accent-color: #014B8A;
    --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: #014B8A;
    --section-header-background-2: #014B8A;
    --section-header-background-3: #014B8A;
    --section-header-text-color: #FDFDFD;
    --body-background: #0A0A0A;
    --body-text-color: #E0E0E0;
    --nav-gradient: linear-gradient(to bottom,rgba(1,55,110,1) 0%,rgba(1,75,138,1) 100%);
    --nav-border-color: #014B8A;
    --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: #0A1929;
    --post-quote-text-color: #C8D8E8;
    --post-quote-border-color: #014B8A;
    --post-quote-header-background: #012E55;
    --post-quote-header-text-color: #49A1F8;
    --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-galciv3 .sd-site-header {
        background: var(--header-background);
        border-bottom-color: var(--accent-color);
    }

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


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

    .theme-galciv3 .sd-post-header__username a {
        color: var(--post-quote-header-text-color);
        font-weight: 600;
    }
    /* Section 7: Buttons and links */
    .theme-galciv3 .sd-btn-primary {
        background-color: var(--accent-color);
        color: var(--accent-color-text);
        box-shadow: 0 0 10px rgba(73,161,248,1),inset 0 0 7px rgba(255,255,255,.35);
        border-radius: 6px;
    }

        .theme-galciv3 .sd-btn-primary:hover {
            background-color: #1076C8;
            box-shadow: 0 0 10px rgba(16,118,200,1),inset 0 0 7px rgba(255,255,255,.35);
        }

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

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

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

        .theme-galciv3 .sd-thread-tray__page-link:hover {
            background: var(--accent-color);
            color: var(--accent-color-text);
        }
    /* Section 10: Sidebar */
    .theme-galciv3 .sd-sidebar {
    }
    /* Section 11: Forum jump */
    .theme-galciv3 .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-galciv3 .sd-category-header {
        background: linear-gradient(to bottom,#014B8A 0%,#013A6B 100%);
        color: var(--accent-color-text);
        border-bottom: 1px solid var(--post-quote-header-background);
    }
    /* Section 13: Moderators bar */
    .theme-galciv3 .sd-moderators {
        background: #0F0F0F;
        border-top-color: #333333;
    }
    /* Section 14: Spoiler text */
    .theme-galciv3 .spoiler {
        background: var(--link-color);
        color: var(--link-color);
    }

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

    .theme-galciv3 .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;
    }
    /* Section 16: Site nav overrides */
    .theme-galciv3 .site-nav {
        --site-nav-bg: #01376e;
        --site-nav-text: #fff;
        --site-nav-hover-bg: rgba(1,75,138,.5);
        --site-nav-active-bg: rgba(1,75,138,.9);
        --site-nav-border-color: #014B8A;
    }

    /* Content area background */
    .theme-galciv3 .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-galciv3 .sd-stardock-reply {
        filter: brightness(0) invert(1);
    }

/* Blue accent line directly under the dark Stardock header — sits between
   the header's own dark-gray border-bottom and the GC3 banner. */
.theme-galciv3 .header-container {
    border-bottom: 1px solid #4082bb;
}

/* Section 17: Body background — large GC3 starscape (ships + planets) baked
   into the legacy background.release5.jpg. Pinned to top center, fixed so it
   doesn't scroll with the content. Offset 33px down to clear the dark
   Stardock header at the top of the page. */
body.theme-galciv3 {
    background: #000 url('/images/themes/galciv3/background.jpg') no-repeat fixed center 32px;
    background-size: auto;
}

/* Section 18: GC3 banner — transparent overlay area that holds the Galactic
   Civilizations III logo + "How Will You Rule Your Galaxy?" tagline, sitting
   on top of the body background image. */
.sd-gc3-banner {
    position: relative;
    display: block;
    width: 100%;
    height: 320px;
    pointer-events: none;
}

.sd-gc3-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    pointer-events: auto;
    z-index: 5;
}

    .sd-gc3-logo img {
        display: block;
        width: auto;
        height: auto;
        max-width: 995px;
        border: 0;
    }

/* The "alt" logo (without tagline) is the smaller responsive version. */
.sd-gc3-logo--alt {
    display: none;
}

    .sd-gc3-logo--alt img {
        max-width: 320px;
    }

/* Section 19: GC3 sprite-based nav — eight game-section buttons rendered from
   a single horizontal sprite (nav-sprite.png, 865x148, two rows of 74px:
   normal on top / hover-active on bottom). Centered below the banner so the
   blue button strip sits cleanly between the banner art and the forum body. */
.sd-gc3-nav {
    position: relative;
    display: block;
    width: 865px;
    max-width: 100%;
    margin: -38px auto 0 auto;
    z-index: 4;
    text-align: center;
}

    .sd-gc3-nav ul {
        display: inline-block;
        font-size: 0;
        list-style-type: none;
        margin: 0;
        padding: 0;
        line-height: 0;
    }

    .sd-gc3-nav > ul > li {
        background: url('/images/themes/galciv3/nav-sprite.png') no-repeat;
        background-position-y: top;
        border: none;
        color: #fff;
        display: inline-block;
        vertical-align: top;
        height: 54px;
    }

        .sd-gc3-nav > ul > li > a {
            display: inline-block;
            height: 100%;
            width: 100%;
            text-decoration: none;
        }

            .sd-gc3-nav > ul > li > a > span {
                display: none;
            }

        .sd-gc3-nav > ul > li.sd-gc3-nav__game {
            background-position: 0 top;
            width: 90px;
        }

            .sd-gc3-nav > ul > li.sd-gc3-nav__game:hover,
            .sd-gc3-nav > ul > li.sd-gc3-nav__game.sd-gc3-nav__active {
                background-position: 0 -74px;
            }

        .sd-gc3-nav > ul > li.sd-gc3-nav__databanks {
            background-position: -90px top;
            width: 133px;
        }

            .sd-gc3-nav > ul > li.sd-gc3-nav__databanks:hover,
            .sd-gc3-nav > ul > li.sd-gc3-nav__databanks.sd-gc3-nav__active {
                background-position: -90px -74px;
            }

        .sd-gc3-nav > ul > li.sd-gc3-nav__forum {
            background-position: -223px top;
            width: 89px;
        }

            .sd-gc3-nav > ul > li.sd-gc3-nav__forum:hover,
            .sd-gc3-nav > ul > li.sd-gc3-nav__forum.sd-gc3-nav__active {
                background-position: -223px -74px;
            }

        .sd-gc3-nav > ul > li.sd-gc3-nav__journals {
            background-position: -312px top;
            width: 122px;
        }

            .sd-gc3-nav > ul > li.sd-gc3-nav__journals:hover,
            .sd-gc3-nav > ul > li.sd-gc3-nav__journals.sd-gc3-nav__active {
                background-position: -312px -74px;
            }

        .sd-gc3-nav > ul > li.sd-gc3-nav__metaverse {
            background-position: -434px top;
            width: 131px;
        }

            .sd-gc3-nav > ul > li.sd-gc3-nav__metaverse:hover,
            .sd-gc3-nav > ul > li.sd-gc3-nav__metaverse.sd-gc3-nav__active {
                background-position: -434px -74px;
            }

        .sd-gc3-nav > ul > li.sd-gc3-nav__community {
            background-position: -565px top;
            width: 134px;
        }

            .sd-gc3-nav > ul > li.sd-gc3-nav__community:hover,
            .sd-gc3-nav > ul > li.sd-gc3-nav__community.sd-gc3-nav__active {
                background-position: -565px -74px;
            }

        .sd-gc3-nav > ul > li.sd-gc3-nav__dlc {
            background-position: -699px top;
            width: 60px;
        }

            .sd-gc3-nav > ul > li.sd-gc3-nav__dlc:hover,
            .sd-gc3-nav > ul > li.sd-gc3-nav__dlc.sd-gc3-nav__active {
                background-position: -699px -74px;
            }

        .sd-gc3-nav > ul > li.sd-gc3-nav__store {
            background-position: -759px top;
            width: 106px;
        }

            .sd-gc3-nav > ul > li.sd-gc3-nav__store:hover,
            .sd-gc3-nav > ul > li.sd-gc3-nav__store.sd-gc3-nav__active {
                background-position: -759px -74px;
            }

/* Section 20: Responsive — collapse banner & hide sprite nav on small screens
   so the forum body remains usable. The smaller "alt" logo replaces the big
   tagline logo, and the game-section nav is hidden (users navigate via the
   regular site links instead). */
@media (max-width: 920px) {
    body.theme-galciv3 {
        background-size: 1280px auto;
    }

    .sd-gc3-banner {
        height: 38vw;
        max-height: 240px;
    }

    .sd-gc3-logo {
        display: none;
    }

    .sd-gc3-logo--alt {
        display: block;
    }

    .sd-gc3-nav {
        display: none;
    }
}

/* Section 21: Mobile slide-in drawer — opened via the "Galactic Civilizations
   III Menu" item in the Stardock header's mobile nav. Styled with the GC3
   deep-blue/black palette and gold highlights to mirror the theme's accents
   (matches the Demigod drawer pattern). */
.sd-gc3-drawer {
    position: fixed;
    top: 0;
    left: -240px;
    width: 220px;
    height: 100%;
    background: #000000;
    border-right: 2px solid #014B8A;
    z-index: 2000;
    transition: left 0.35s ease;
    overflow-y: auto;
    font-family: 'Segoe UI', Arial, sans-serif;
}

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

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

.sd-gc3-drawer > ul > li {
    background: linear-gradient(180deg, #01376E 0%, #000000 100%);
    border-bottom: 1px solid #014B8A;
    padding: 0.75em 0;
}

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

        .sd-gc3-drawer > ul > li > a > span {
            color: #FDFDFD;
            font-weight: bold;
            font-size: 1.1em;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .sd-gc3-drawer > ul > li > a:hover,
        .sd-gc3-drawer > ul > li.sd-gc3-drawer__active > a,
        .sd-gc3-drawer > ul > li > a:hover > span,
        .sd-gc3-drawer > ul > li.sd-gc3-drawer__active > a > span {
            color: #FFB400;
            text-shadow: 0 0 6px rgba(73, 161, 248, 0.6);
        }

    /* Store item — highlighted with the theme's glowing blue button style */
    .sd-gc3-drawer > ul > li.sd-gc3-drawer__store {
        background: linear-gradient(180deg, #1076C8 0%, #014B8A 100%);
        border-bottom: 1px solid #014B8A;
    }

        .sd-gc3-drawer > ul > li.sd-gc3-drawer__store > a > span {
            color: #FDFDFD;
            text-shadow: 0 0 6px rgba(73, 161, 248, 0.8);
        }

        .sd-gc3-drawer > ul > li.sd-gc3-drawer__store > a:hover > span {
            color: #FFD54F;
        }

    /* Close item — sits at the bottom, darker treatment so it reads as "dismiss"
   rather than a nav destination. */
    .sd-gc3-drawer > ul > li.sd-gc3-drawer__close {
        background: linear-gradient(180deg, #1A1A1A 0%, #000000 100%);
        border-top: 1px solid #014B8A;
    }

/* New Topic — mirror the GC3 sd-btn-primary cyan glow. */
.theme-galciv3 .sd-forumhead__new-topic {
    background: var(--accent-color);
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 10px rgba(73,161,248,1), inset 0 0 7px rgba(255,255,255,.35);
    border-radius: 6px;
    color: var(--accent-color-text);
}

    .theme-galciv3 .sd-forumhead__new-topic:hover {
        background: #1076C8;
        box-shadow: 0 0 14px rgba(16,118,200,1), inset 0 0 7px rgba(255,255,255,.45);
        opacity: 1;
    }
