/* ============================================================
   Dead Heat II — SMF 2.1 Theme
   css/index.css
   Core layout and component styles
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
    --dh-green-darkest:  #0a1a0c;
    --dh-green-dark:     #1a472a;
    --dh-green-mid:      #2d6a4f;
    --dh-green-light:    #e8f5e9;
    --dh-gold:           #c9a84c;
    --dh-gold-light:     #f0d080;
    --dh-gold-dark:      #8a6520;
    --dh-brown:          #3a1f00;
    --dh-ivory:          #faf8f2;
    --dh-border:         #ddd5c0;
    --dh-text-dark:      #1a1a1a;
    --dh-text-mid:       #3a3a3a;
    --dh-text-muted:     #6b6b6b;
    --dh-bg:             #f5f3ee;
    --dh-shadow:         0 1px 4px rgba(0,0,0,0.08);
    --dh-shadow-md:      0 2px 12px rgba(0,0,0,0.12);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--dh-text-mid);
    background: var(--dh-bg);
}

a {
    color: var(--dh-green-dark);
    text-decoration: none;
}
a:hover { color: var(--dh-gold-dark); text-decoration: underline; }

img { max-width: 100%; }

/* ---- Gold top bar ---- */
#dh-topbar {
    height: 4px;
    background: linear-gradient(90deg, var(--dh-gold-dark), var(--dh-gold), var(--dh-gold-light), var(--dh-gold), var(--dh-gold-dark));
}

/* ---- Header ---- */
#dh-header {
    background: var(--dh-green-darkest);
    border-bottom: 1px solid rgba(201,168,76,0.2);
}

#dh-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

#dh-brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

#dh-logo {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dh-gold) !important;
    text-decoration: none !important;
    letter-spacing: -0.01em;
}
#dh-logo:hover { color: var(--dh-gold-light) !important; }

#dh-forum-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    font-family: 'Source Sans 3', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#dh-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dh-user-info {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dh-header-link {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}
.dh-header-link:hover { color: rgba(255,255,255,0.9) !important; }

.dh-header-link-game {
    background: rgba(201,168,76,0.15);
    border: 1px solid rgba(201,168,76,0.3);
    color: var(--dh-gold) !important;
    padding: 4px 12px;
    border-radius: 4px;
}
.dh-header-link-game:hover {
    background: rgba(201,168,76,0.25);
    color: var(--dh-gold-light) !important;
}

/* ---- Navbar ---- */
#dh-navbar {
    background: var(--dh-green-dark);
    border-bottom: 2px solid var(--dh-gold-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--dh-shadow-md);
}

#dh-navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

#dh-nav-main {
    display: flex;
    align-items: center;
    gap: 2px;
}

.dh-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75) !important;
    text-decoration: none !important;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.dh-nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.06);
    border-bottom-color: rgba(201,168,76,0.4);
}
.dh-nav-link.active {
    color: var(--dh-gold) !important;
    border-bottom-color: var(--dh-gold);
    background: rgba(201,168,76,0.08);
}

/* Search */
#dh-search-form {
    display: flex;
    align-items: center;
    gap: 0;
}

#dh-search-input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-right: none;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 4px 0 0 4px;
    width: 200px;
    outline: none;
    transition: all 0.2s;
}
#dh-search-input::placeholder { color: rgba(255,255,255,0.3); }
#dh-search-input:focus {
    background: rgba(255,255,255,0.12);
    border-color: rgba(201,168,76,0.5);
    width: 240px;
}

#dh-search-btn {
    background: var(--dh-gold-dark);
    border: 1px solid var(--dh-gold-dark);
    color: #fff;
    padding: 6px 12px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}
#dh-search-btn:hover { background: var(--dh-gold); }

/* ---- Error bar ---- */
#dh-error-bar {
    background: #842029;
    color: #fff;
    padding: 0.6rem 1.5rem;
    font-size: 0.88rem;
}

/* ---- Main wrapper ---- */
#dh-wrapper {
    min-height: calc(100vh - 280px);
    padding: 1.5rem 0;
}

#dh-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Breadcrumbs ---- */
#dh-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
}

.dh-bc-link {
    color: var(--dh-green-mid) !important;
    text-decoration: none !important;
}
.dh-bc-link:hover { color: var(--dh-gold-dark) !important; text-decoration: underline !important; }
.dh-bc-sep { color: var(--dh-text-muted); }
.dh-bc-current { color: var(--dh-text-muted); }

/* ---- Footer ---- */
#dh-footer {
    background: var(--dh-green-darkest);
    border-top: 2px solid var(--dh-gold-dark);
    margin-top: 2rem;
}

#dh-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

#dh-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dh-gold);
}
#dh-footer-tagline {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
    font-family: 'Source Sans 3', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
}

#dh-footer-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
#dh-footer-links a {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4) !important;
    text-decoration: none !important;
    transition: color 0.2s;
}
#dh-footer-links a:hover { color: rgba(255,255,255,0.8) !important; }

#dh-footer-copy {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
    text-align: right;
}
#dh-footer-copy a { color: rgba(255,255,255,0.35) !important; }
#dh-footer-copy a:hover { color: rgba(255,255,255,0.6) !important; }

/* ---- SMF Core Element Overrides ---- */

/* Category headers */
.cat_bar, .title_bar, .titlebg {
    background: var(--dh-green-dark) !important;
    color: #fff !important;
    border-bottom: 2px solid var(--dh-gold-dark) !important;
    font-family: 'EB Garamond', Georgia, serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 0.65rem 1rem !important;
}

.cat_bar a, .title_bar a, .titlebg a {
    color: #fff !important;
}
.cat_bar a:hover, .title_bar a:hover {
    color: var(--dh-gold) !important;
    text-decoration: none !important;
}

/* Board/topic rows */
.windowbg, .windowbg2 {
    background: #fff !important;
    border-bottom: 1px solid var(--dh-border) !important;
}
.windowbg:hover, .windowbg2:hover {
    background: var(--dh-green-light) !important;
}

/* Table wrapper */
.table_grid, .forumline {
    border: 1px solid var(--dh-border) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-shadow: var(--dh-shadow) !important;
    margin-bottom: 1.25rem !important;
}

/* Post area */
.post_wrapper, .post {
    border-bottom: 1px solid var(--dh-border) !important;
    padding: 1rem !important;
}

/* Post header */
.keyinfo {
    border-bottom: 1px solid var(--dh-border) !important;
    background: var(--dh-ivory) !important;
    padding: 0.5rem 1rem !important;
}

/* Poster info sidebar */
.poster {
    background: var(--dh-ivory) !important;
    border-right: 1px solid var(--dh-border) !important;
    padding: 0.75rem !important;
}

/* Subject / topic titles */
.subject a, h3.catbg a {
    color: var(--dh-green-dark) !important;
    font-family: 'EB Garamond', Georgia, serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}
.subject a:hover { color: var(--dh-gold-dark) !important; }

/* Buttons */
.button_submit, input[type="submit"], .button {
    background: var(--dh-green-dark) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 18px !important;
    font-family: 'Source Sans 3', sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}
.button_submit:hover, input[type="submit"]:hover, .button:hover {
    background: var(--dh-green-mid) !important;
}

/* Secondary/reset buttons */
.button_reset, input[type="reset"] {
    background: var(--dh-ivory) !important;
    color: var(--dh-text-mid) !important;
    border: 1px solid var(--dh-border) !important;
}

/* Form inputs */
input[type="text"], input[type="email"], input[type="password"],
textarea, select {
    border: 1px solid var(--dh-border) !important;
    border-radius: 4px !important;
    padding: 7px 10px !important;
    font-family: 'Source Sans 3', sans-serif !important;
    font-size: 0.9rem !important;
    color: var(--dh-text-dark) !important;
    background: #fff !important;
    transition: border-color 0.2s !important;
}
input[type="text"]:focus, input[type="email"]:focus,
input[type="password"]:focus, textarea:focus, select:focus {
    border-color: var(--dh-green-mid) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(45,106,79,0.15) !important;
}

/* Info bars */
.information {
    background: rgba(26,71,42,0.06) !important;
    border: 1px solid rgba(26,71,42,0.2) !important;
    border-radius: 4px !important;
    color: var(--dh-green-dark) !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.88rem !important;
}

/* New post / unread indicators */
.new_post { color: var(--dh-gold-dark) !important; font-weight: 700 !important; }

/* Pagination */
.pagelinks a, .navPages {
    color: var(--dh-green-dark) !important;
    border: 1px solid var(--dh-border) !important;
    border-radius: 3px !important;
    padding: 3px 8px !important;
    font-size: 0.82rem !important;
    text-decoration: none !important;
}
.pagelinks a:hover, .navPages:hover {
    background: var(--dh-green-light) !important;
    border-color: var(--dh-green-mid) !important;
}
.pagelinks strong {
    background: var(--dh-green-dark) !important;
    color: #fff !important;
    border-radius: 3px !important;
    padding: 3px 8px !important;
    font-size: 0.82rem !important;
}

/* Moderation/sticky badges */
.sticky span, .locked span {
    background: var(--dh-gold) !important;
    color: var(--dh-brown) !important;
    font-size: 0.7rem !important;
    padding: 1px 6px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
}

/* Quick reply */
#quick_reply_header {
    background: var(--dh-green-dark) !important;
    color: #fff !important;
    border-bottom: 2px solid var(--dh-gold-dark) !important;
    font-family: 'EB Garamond', Georgia, serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 0.65rem 1rem !important;
}

/* Member profile */
.profile_details {
    background: var(--dh-ivory) !important;
    border: 1px solid var(--dh-border) !important;
    border-radius: 6px !important;
    padding: 1rem !important;
}

/* Moderator bar */
.moderatorbar {
    background: var(--dh-ivory) !important;
    border: 1px solid var(--dh-border) !important;
    border-radius: 4px !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    margin-bottom: 1rem !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    #dh-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    #dh-header-right { flex-wrap: wrap; gap: 8px; }
    #dh-navbar-inner { flex-direction: column; align-items: flex-start; padding: 0 1rem; }
    #dh-nav-main { flex-wrap: wrap; }
    .dh-nav-link { padding: 0.5rem 0.75rem; font-size: 0.82rem; }
    #dh-search-form { width: 100%; padding: 0.5rem 0; }
    #dh-search-input { width: 100%; border-radius: 4px 0 0 4px; }
    #dh-footer-inner { grid-template-columns: 1fr; text-align: center; }
    #dh-footer-copy { text-align: center; }
    #dh-container { padding: 0 1rem; }
}

@media (max-width: 480px) {
    #dh-logo { font-size: 1.3rem; }
    #dh-forum-label { display: none; }
}
