/* ===========================================
   TUSHYMAN — Content Pages Styles
   Nav, Footer, Home, Games, Bestiary, Guide,
   About, Privacy, Terms
   =========================================== */

/* ── All pages with nav get wider width ── */
.tushyman-container {
    max-width: 900px;
}

/* ── Content page container override ── */
.tushyman-content-page {
    padding-top: 0;
}

/* ── Nav flush to top on legacy pages (Q&A, Chat) ── */
.tushyman-container:has(.tm-nav) {
    padding-top: 0;
}

.tm-nav {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.tushyman-content-page .tm-nav {
    margin-top: 0;
    margin-bottom: 0;
}

/* ── Navigation ── */
.tm-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #2c1810;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tm-nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.tm-nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #d4a574;
}

.tm-nav-logo span {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #F7E7CE;
    white-space: nowrap;
}

.tm-nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-nav-links li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-nav-links a {
    display: block;
    padding: 0.7rem 1.1rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    color: #d4a574;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.tm-nav-links a:hover {
    color: #F7E7CE;
    background: rgba(212, 165, 116, 0.15);
}

.tm-nav-links a.tm-nav-active {
    color: #F7E7CE;
    font-weight: 700;
    border-bottom: 2px solid #d4a574;
}

/* Hamburger (mobile) */
.tm-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.tm-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #d4a574;
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
}

/* ── Footer ── */
.tm-footer {
    text-align: center;
    margin-top: 2.5rem;
    padding: 1.5rem 0 1rem;
    border-top: 2px solid #2c1810;
    font-size: 0.85rem;
    color: #6b4c3b;
}

.tm-footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.tm-footer-links li {
    list-style: none;
}

.tm-footer-links a {
    color: #2c1810;
    text-decoration: underline;
    font-size: 0.85rem;
}

.tm-footer-links a:hover {
    color: #c0392b;
}

.tm-footer-copy {
    font-style: italic;
}

/* ── Adjust absolute-positioned elements below nav ── */
.tm-nav ~ .ballad-btn {
    top: 60px;
}

.tm-nav ~ .game-portal-link {
    top: 60px;
}

/* ── Main content area ── */
.tm-content {
    padding: 1.5rem 0 0;
}

.tm-content h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 900;
    color: #2c1810;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.tm-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c1810;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #d4a574;
}

.tm-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c1810;
    margin: 1.5rem 0 0.5rem;
}

.tm-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #2c1810;
}

.tm-content ul, .tm-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
    line-height: 1.7;
}

.tm-content li {
    margin-bottom: 0.3rem;
}

.tm-content a {
    color: #6b3a2a;
    text-decoration: underline;
}

.tm-content a:hover {
    color: #c0392b;
}

/* ── Hero Section (Home) ── */
.tm-hero {
    text-align: center;
    padding: 2rem 0 1rem;
}

.tm-hero-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #2c1810;
    box-shadow: 0 4px 20px rgba(44, 24, 16, 0.3);
    margin-bottom: 1rem;
}

.tm-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 900;
    color: #2c1810;
    margin-bottom: 0.3rem;
}

.tm-hero-subtitle {
    font-size: 1.05rem;
    color: #6b4c3b;
    font-style: italic;
    margin-bottom: 1rem;
}

.tm-hero-intro {
    max-width: 640px;
    margin: 0 auto 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

.tm-hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tm-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid #2c1810;
    transition: all 0.2s;
    cursor: pointer;
}

.tm-btn-primary {
    background: #2c1810;
    color: #F7E7CE;
}

.tm-btn-primary:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.tm-btn-secondary {
    background: transparent;
    color: #2c1810;
}

.tm-btn-secondary:hover {
    background: #2c1810;
    color: #F7E7CE;
}

/* ── Game Cards ── */
.tm-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c1810;
    text-align: center;
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d4a574;
}

.tm-game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.tm-game-card {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #2c1810;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tm-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(44, 24, 16, 0.15);
}

.tm-game-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c1810;
    margin: 0 0 0.5rem;
}

.tm-game-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #2c1810;
    margin-bottom: 0.75rem;
}

.tm-game-card .tm-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* ── Games Hub (card layout with sub-links) ── */
.tm-game-hub {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.tm-game-card-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}

.tm-game-card-links a {
    font-size: 0.85rem;
    font-family: 'Playfair Display', Georgia, serif;
    color: #6b3a2a;
    text-decoration: underline;
    opacity: 0.85;
    transition: opacity 0.2s, color 0.2s;
}

.tm-game-card-links a:hover {
    opacity: 1;
    color: #c0392b;
}

/* ── Tab Bar (Ask/Chat) ── */
.tm-tab-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0.75rem 0 0;
    border-bottom: 2px solid #2c1810;
}

.tm-tab {
    /* Reset browser button defaults (Firefox is aggressive) */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    border-radius: 0;
    /* Actual styles */
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #6b4c3b;
    background: rgba(44, 24, 16, 0.06);
    border: 2px solid transparent;
    border-bottom: none;
    padding: 0.65rem 2rem;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    position: relative;
    bottom: -2px;
    letter-spacing: 0.03em;
}

.tm-tab:hover {
    color: #2c1810;
    background: rgba(255, 255, 255, 0.5);
}

.tm-tab-active,
.tm-tab-active:hover {
    color: #2c1810;
    background: #F7E7CE;
    border-color: #2c1810;
    border-bottom: 2px solid #F7E7CE;
}

/* Hide the qa-area ::before flourish inside tab panels — it overlaps the tab bar */
.tm-tab-panel .tushyman-qa-area::before {
    display: none;
}

/* Show the standalone flourish below the Ask content */
.tm-tab-panel .tushyman-qa-area-top {
    display: block;
    text-align: center;
    font-size: 1.2rem;
    color: #2c1810;
    margin: 1rem 0 0;
}

/* ── Feature Teaser Sections (Home) ── */
.tm-teaser {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid #2c1810;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tm-teaser h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tm-teaser p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Boss Entries (Bestiary) ── */
.tm-boss-entry {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid #2c1810;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.tm-boss-entry h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c1810;
    margin: 0 0 0.1rem;
}

.tm-boss-tier {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #F7E7CE;
    background: #2c1810;
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.6rem;
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.5px;
}

.tm-boss-subtitle {
    font-style: italic;
    color: #6b4c3b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.tm-boss-entry p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.tm-boss-attacks {
    margin: 0.5rem 0 0 1.25rem;
    font-size: 0.9rem;
}

.tm-boss-attacks li {
    margin-bottom: 0.2rem;
}

.tm-boss-secret {
    border-style: dashed;
    opacity: 0.8;
}

/* ── Guide Sections ── */
.tm-guide-section {
    margin-bottom: 2rem;
}

.tm-controls-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0 1rem;
    font-size: 0.9rem;
}

.tm-controls-table th,
.tm-controls-table td {
    border: 1px solid #2c1810;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.tm-controls-table th {
    background: #2c1810;
    color: #F7E7CE;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
}

.tm-controls-table td {
    background: rgba(255, 255, 255, 0.5);
}

.tm-weapon-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.tm-weapon-list li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed #d4a574;
    font-size: 0.95rem;
}

.tm-weapon-list li:last-child {
    border-bottom: none;
}

.tm-weapon-name {
    font-weight: 700;
    font-family: 'Playfair Display', Georgia, serif;
}

/* ── Legal Pages (Privacy, Terms) ── */
.tm-legal h2 {
    font-size: 1.3rem;
    margin-top: 1.75rem;
}

.tm-legal p, .tm-legal li {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── About Page ── */
.tm-about-avatar {
    float: right;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #2c1810;
    box-shadow: 0 4px 15px rgba(44, 24, 16, 0.25);
    margin: 0 0 1rem 1.5rem;
}

/* ── Decorative flourish ── */
.tm-flourish {
    text-align: center;
    font-size: 1.4rem;
    color: #d4a574;
    margin: 1.5rem 0;
    letter-spacing: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .tm-nav {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .tm-nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-bottom: 0.5rem;
    }

    .tm-nav-links.tm-nav-open {
        display: flex;
    }

    .tm-nav-links a {
        padding: 0.7rem 0.5rem;
        border-bottom: 1px solid rgba(212, 165, 116, 0.15);
    }

    .tm-nav-toggle {
        display: block;
    }

    .tm-hero h1 {
        font-size: 1.8rem;
    }

    .tm-hero-avatar {
        width: 120px;
        height: 120px;
    }

    .tm-game-grid {
        grid-template-columns: 1fr;
    }

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

    .tm-content h2 {
        font-size: 1.3rem;
    }

    .tm-about-avatar {
        float: none;
        display: block;
        margin: 0 auto 1rem;
    }

    .tm-controls-table {
        font-size: 0.8rem;
    }

    .tm-controls-table th,
    .tm-controls-table td {
        padding: 0.35rem 0.5rem;
    }

    .tm-section-title {
        font-size: 1.4rem;
    }
}
