/* ===================================================================
   Sun Haven Mod Hub - Shared Component Styles
   =================================================================== */

html {
    scroll-behavior: smooth;
}

/* -----------------------------------------------------------------
   BACK-TO-TOP BUTTON
   ----------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2f8f5b, #3fb87a);
    color: #fff;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(47, 143, 91, 0.4);
}

/* -----------------------------------------------------------------
   DARK MODE TOGGLE
   ----------------------------------------------------------------- */
.theme-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(128, 128, 128, 0.25);
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 1.2em;
    z-index: 1000;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(40, 35, 28, 0.9);
    border-color: rgba(200, 180, 140, 0.3);
}

/* Adjust toggle position when top-nav is present */
.top-nav ~ .theme-toggle,
.top-nav ~ * .theme-toggle {
    top: 60px;
}

/* -----------------------------------------------------------------
   COPY-TO-CLIPBOARD
   ----------------------------------------------------------------- */
.copy-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.copy-btn {
    background: none;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 6px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.85em;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    line-height: 1;
}

.copy-btn:hover {
    background: rgba(47, 143, 91, 0.15);
    border-color: rgba(47, 143, 91, 0.5);
    transform: scale(1.05);
}

.copy-btn.copied {
    border-color: #2f8f5b;
}

/* -----------------------------------------------------------------
   SEARCH / FILTER (Index Page)
   ----------------------------------------------------------------- */
.mod-filter {
    max-width: 700px;
    margin: 20px auto 10px;
    text-align: center;
}

.mod-search {
    width: 100%;
    padding: 14px 22px;
    border-radius: 30px;
    border: 2px solid rgba(47, 143, 91, 0.25);
    background: rgba(255, 255, 255, 0.75);
    font-size: 1.05em;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 14px;
    color: #1f1a12;
}

.mod-search:focus {
    border-color: rgba(47, 143, 91, 0.6);
    box-shadow: 0 0 0 4px rgba(47, 143, 91, 0.1);
}

.mod-search::placeholder {
    color: #9e9282;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.filter-tag {
    padding: 8px 18px;
    border-radius: 20px;
    border: 2px solid rgba(47, 143, 91, 0.25);
    background: transparent;
    color: #2f8f5b;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    font-family: inherit;
    transition: all 0.25s;
}

.filter-tag.active,
.filter-tag:hover {
    background: #2f8f5b;
    color: #fff;
    border-color: #2f8f5b;
}

/* -----------------------------------------------------------------
   KEYBIND CARDS
   ----------------------------------------------------------------- */
.keybind-section {
    max-width: 700px;
    margin: 0 auto 40px;
}

.keybind-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}

.keybind-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 12px;
    padding: 16px 22px;
    text-align: center;
    min-width: 130px;
    transition: transform 0.2s, border-color 0.2s;
}

.keybind-card:hover {
    transform: translateY(-2px);
    border-color: rgba(47, 143, 91, 0.5);
}

.keybind-keys {
    font-size: 1.05em;
    margin-bottom: 8px;
}

.keybind-keys kbd {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    background: rgba(255, 255, 255, 0.1);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95em;
    min-width: 28px;
}

.keybind-action {
    font-size: 0.88em;
    opacity: 0.75;
}

/* -----------------------------------------------------------------
   CROSS-MOD LINKS ("Pairs Well With")
   ----------------------------------------------------------------- */
.related-mods {
    max-width: 700px;
    margin: 40px auto;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(128, 128, 128, 0.2);
    transition: transform 0.2s, border-color 0.25s;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(47, 143, 91, 0.5);
}

.related-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.related-info h4 {
    margin-bottom: 4px;
    font-size: 1.05em;
}

.related-info p {
    font-size: 0.88em;
    opacity: 0.7;
    margin: 0;
}

/* -----------------------------------------------------------------
   FAQ / TROUBLESHOOTING (Index Page)
   ----------------------------------------------------------------- */
.faq-section {
    max-width: 800px;
    margin: 50px auto;
}

.faq-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    border: 1px solid rgba(31, 26, 18, 0.1);
    overflow: hidden;
    transition: border-color 0.25s;
}

.faq-item[open] {
    border-color: rgba(47, 143, 91, 0.4);
}

.faq-question {
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05em;
    color: inherit;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.4em;
    color: #2f8f5b;
    font-weight: 700;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] .faq-question::after {
    content: '\2212';
}

.faq-answer {
    padding: 0 22px 18px;
    line-height: 1.7;
    opacity: 0.8;
}

.faq-answer code {
    background: rgba(47, 143, 91, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* -----------------------------------------------------------------
   RECOMMENDED PACKS (Index Page)
   ----------------------------------------------------------------- */
.mod-packs {
    max-width: 900px;
    margin: 50px auto;
}

.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 20px;
}

.pack-card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid rgba(31, 26, 18, 0.1);
    transition: transform 0.25s, box-shadow 0.25s;
}

.pack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(31, 26, 18, 0.15);
}

.pack-card.full-suite {
    border: 2px solid rgba(47, 143, 91, 0.4);
    background: linear-gradient(135deg, rgba(47, 143, 91, 0.06), rgba(242, 166, 90, 0.06));
}

.pack-name {
    font-size: 1.3em;
    margin-bottom: 8px;
}

.pack-desc {
    opacity: 0.7;
    font-size: 0.95em;
    margin-bottom: 16px;
    line-height: 1.5;
}

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

.pack-mod {
    padding: 6px 14px;
    border-radius: 16px;
    background: rgba(47, 143, 91, 0.12);
    color: #2a5f43;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    transition: background 0.2s;
}

.pack-mod:hover {
    background: rgba(47, 143, 91, 0.25);
}

/* -----------------------------------------------------------------
   CHANGELOG TIMELINE
   ----------------------------------------------------------------- */
.changelog-timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(47, 143, 91, 0.6), rgba(47, 143, 91, 0.1));
    border-radius: 2px;
}

.timeline-node {
    position: relative;
    margin-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: -33px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2f8f5b;
    border: 3px solid rgba(47, 143, 91, 0.3);
}

.timeline-node.current .timeline-marker {
    box-shadow: 0 0 12px rgba(47, 143, 91, 0.4);
    animation: pulse-node 2s ease-in-out infinite;
}

@keyframes pulse-node {
    0%, 100% { box-shadow: 0 0 10px rgba(47, 143, 91, 0.3); }
    50% { box-shadow: 0 0 20px rgba(47, 143, 91, 0.6); }
}

.timeline-version {
    display: inline-block;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 12px;
    padding: 4px 14px;
    border-radius: 14px;
    background: rgba(47, 143, 91, 0.15);
    color: #2f8f5b;
}

.timeline-content {
    padding: 18px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    border: 1px solid rgba(128, 128, 128, 0.12);
}

.timeline-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.timeline-entry:last-child {
    margin-bottom: 0;
}

.timeline-entry .changelog-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.timeline-entry .changelog-content h4 {
    margin-bottom: 4px;
    font-size: 1em;
}

.timeline-entry .changelog-content p {
    font-size: 0.9em;
    opacity: 0.75;
    margin: 0;
    line-height: 1.5;
}

/* -----------------------------------------------------------------
   COLLAPSIBLE MUSEUM SECTIONS (SMUT)
   ----------------------------------------------------------------- */
details.museum-section summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

details.museum-section summary::-webkit-details-marker {
    display: none;
}

details.museum-section summary::marker {
    display: none;
    content: '';
}

.collapse-icon {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 0.8em;
    opacity: 0.5;
}

details[open] .collapse-icon {
    transform: rotate(180deg);
}

/* -----------------------------------------------------------------
   SCROLL-SPY ACTIVE PILL (RacialBonuses)
   ----------------------------------------------------------------- */
.nav-pill.active {
    color: #fff !important;
}

.nav-pill.core.active { background: var(--gold, #c08a2b); }
.nav-pill.celestial.active { background: var(--ember, #b35c35); }
.nav-pill.elemental.active { background: var(--river, #3b6e8f); }
.nav-pill.amari.active { background: var(--forest, #3f6b4f); }
.nav-pill.serpent.active { background: var(--serpent, #2f7a6c); }

/* -----------------------------------------------------------------
   DARK MODE OVERRIDES (shared elements)
   ----------------------------------------------------------------- */
[data-theme="dark"] .back-to-top {
    background: linear-gradient(135deg, #3fb87a, #2f8f5b);
}

[data-theme="dark"] .faq-item {
    background: rgba(40, 35, 28, 0.7);
    border-color: rgba(200, 180, 140, 0.15);
}

[data-theme="dark"] .faq-item[open] {
    border-color: rgba(63, 185, 80, 0.4);
}

[data-theme="dark"] .pack-card {
    background: rgba(40, 35, 28, 0.7);
    border-color: rgba(200, 180, 140, 0.15);
}

[data-theme="dark"] .pack-card.full-suite {
    border-color: rgba(63, 185, 80, 0.4);
}

[data-theme="dark"] .pack-mod {
    background: rgba(63, 185, 80, 0.15);
    color: #6fcf97;
}

[data-theme="dark"] .mod-search {
    background: rgba(40, 35, 28, 0.8);
    border-color: rgba(63, 185, 80, 0.25);
    color: #e8dfd2;
}

[data-theme="dark"] .mod-search::placeholder {
    color: #8a7e6e;
}

[data-theme="dark"] .filter-tag {
    border-color: rgba(63, 185, 80, 0.25);
    color: #6fcf97;
}

[data-theme="dark"] .filter-tag.active,
[data-theme="dark"] .filter-tag:hover {
    background: #2f8f5b;
    color: #fff;
    border-color: #2f8f5b;
}

[data-theme="dark"] .faq-answer code {
    background: rgba(63, 185, 80, 0.15);
    color: #6fcf97;
}

/* -----------------------------------------------------------------
   LIGHT MODE OVERRIDES (for dark-themed pages switching to light)
   ----------------------------------------------------------------- */
[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(128, 128, 128, 0.25);
}

[data-theme="light"] .keybind-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(31, 26, 18, 0.12);
}

[data-theme="light"] .keybind-keys kbd {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(31, 26, 18, 0.15);
}

[data-theme="light"] .related-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(31, 26, 18, 0.12);
}

[data-theme="light"] .timeline-content {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(31, 26, 18, 0.1);
}

[data-theme="light"] .timeline-version {
    background: rgba(47, 143, 91, 0.12);
    color: #1a7f37;
}

[data-theme="light"] .changelog-timeline::before {
    background: linear-gradient(180deg, rgba(47, 143, 91, 0.4), rgba(47, 143, 91, 0.08));
}

[data-theme="light"] .timeline-marker {
    background: #2f8f5b;
    border-color: rgba(47, 143, 91, 0.2);
}

[data-theme="light"] .copy-btn {
    border-color: rgba(31, 26, 18, 0.2);
}
[data-theme="light"] .copy-btn:hover {
    background: rgba(47, 143, 91, 0.1);
}

/* -----------------------------------------------------------------
   ANNOUNCEMENT BANNER
   ----------------------------------------------------------------- */
.announcement-banner {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #2f8f5b, #3fb87a);
    color: #fff;
    font-size: 0.95em;
    position: relative;
    z-index: 950;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.4s, transform 0.4s;
}

.announcement-banner.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.announcement-banner.hiding {
    display: flex;
    opacity: 0;
    transform: translateY(-100%);
}

.announcement-icon {
    font-size: 1.4em;
    flex-shrink: 0;
}

.announcement-text {
    flex: 1;
    line-height: 1.4;
}

.announcement-link {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
}

.announcement-link:hover {
    background: rgba(255, 255, 255, 0.35);
}

.announcement-dismiss {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.announcement-dismiss:hover {
    color: #fff;
}

[data-theme="dark"] .announcement-banner {
    background: linear-gradient(135deg, #1a5e38, #2a7a4a);
}

/* -----------------------------------------------------------------
   BUG REPORT FLOATING BUTTON
   ----------------------------------------------------------------- */
.bug-report-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 24px;
    background: rgba(220, 60, 60, 0.9);
    color: #fff;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 998;
    box-shadow: 0 4px 16px rgba(220, 60, 60, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    backdrop-filter: blur(8px);
}

.bug-report-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(220, 60, 60, 0.35);
    background: rgba(200, 40, 40, 0.95);
}

.bug-icon {
    font-size: 1.2em;
    line-height: 1;
}

.bug-label {
    line-height: 1;
}

[data-theme="dark"] .bug-report-btn {
    background: rgba(180, 50, 50, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .bug-report-btn:hover {
    background: rgba(200, 40, 40, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* -----------------------------------------------------------------
   BREADCRUMB NAV ENHANCEMENTS
   ----------------------------------------------------------------- */
.top-nav {
    display: flex;
    align-items: center;
}

/* -----------------------------------------------------------------
   ACCESSIBILITY - Skip to Content & Focus Rings
   ----------------------------------------------------------------- */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--accent, #2f8f5b);
    color: #fff;
    font-weight: 700;
    border-radius: 0 0 12px 12px;
    z-index: 10000;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

*:focus-visible {
    outline: 3px solid rgba(47, 143, 91, 0.7);
    outline-offset: 2px;
    border-radius: 4px;
}

/* -----------------------------------------------------------------
   TABLE OF CONTENTS SIDEBAR
   ----------------------------------------------------------------- */
.toc-sidebar {
    position: fixed;
    top: 120px;
    left: 16px;
    width: 200px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    z-index: 900;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    border: 1px solid rgba(31, 26, 18, 0.1);
    padding: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.toc-sidebar h3 {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent, #2f8f5b);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(47, 143, 91, 0.2);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 4px;
}

.toc-link {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.82em;
    color: #5f5245;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.toc-link:hover {
    background: rgba(47, 143, 91, 0.08);
    color: #2f8f5b;
}

.toc-link.active {
    background: rgba(47, 143, 91, 0.12);
    color: #2f8f5b;
    border-left-color: #2f8f5b;
    font-weight: 600;
}

[data-theme="dark"] .toc-sidebar {
    background: rgba(40, 35, 28, 0.9);
    border-color: rgba(200, 180, 140, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .toc-link {
    color: #b0a58f;
}

[data-theme="dark"] .toc-link:hover,
[data-theme="dark"] .toc-link.active {
    color: #6fcf97;
    background: rgba(63, 185, 80, 0.1);
    border-left-color: #6fcf97;
}

[data-theme="light"] .toc-sidebar {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(31, 26, 18, 0.1);
}

/* -----------------------------------------------------------------
   PAGE TRANSITION ANIMATIONS
   ----------------------------------------------------------------- */
.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-in.animated {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------------------------------------------
   MOD STATUS INDICATORS (Index Page)
   ----------------------------------------------------------------- */
.mod-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.75em;
    font-weight: 600;
    margin-top: 8px;
}

.mod-status-badge.status-active {
    background: rgba(47, 143, 91, 0.12);
    color: #2a7a4a;
}

.mod-status-badge.status-active::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2f8f5b;
    animation: status-pulse 2s ease-in-out infinite;
}

.mod-status-badge.status-stable {
    background: rgba(45, 108, 223, 0.12);
    color: #2d6cdf;
}

.mod-status-badge.status-stable::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2d6cdf;
}

.mod-status-badge.status-new {
    background: rgba(242, 166, 90, 0.15);
    color: #c07028;
}

.mod-status-badge.status-new::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f2a65a;
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

[data-theme="dark"] .mod-status-badge.status-active {
    background: rgba(63, 185, 80, 0.15);
    color: #6fcf97;
}

[data-theme="dark"] .mod-status-badge.status-stable {
    background: rgba(45, 108, 223, 0.15);
    color: #79a8f0;
}

[data-theme="dark"] .mod-status-badge.status-new {
    background: rgba(242, 166, 90, 0.15);
    color: #f2a65a;
}

/* -----------------------------------------------------------------
   COMPARISON TABLE (Index Page)
   ----------------------------------------------------------------- */
.comparison-section {
    max-width: 1000px;
    margin: 50px auto;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(31, 26, 18, 0.1);
    box-shadow: 0 8px 30px rgba(31, 26, 18, 0.08);
}

.comparison-table thead th {
    background: linear-gradient(135deg, #2f8f5b, #3fb87a);
    color: #fff;
    padding: 14px 16px;
    font-size: 0.88em;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.comparison-table thead th:first-child {
    text-align: left;
    padding-left: 20px;
}

.comparison-table tbody td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(31, 26, 18, 0.06);
    font-size: 0.9em;
}

.comparison-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    padding-left: 20px;
    white-space: nowrap;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:hover {
    background: rgba(47, 143, 91, 0.04);
}

.cmp-yes {
    color: #2f8f5b;
    font-weight: 700;
}

.cmp-no {
    color: #c0b0a0;
}

[data-theme="dark"] .comparison-table {
    background: rgba(40, 35, 28, 0.7);
    border-color: rgba(200, 180, 140, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .comparison-table thead th {
    background: linear-gradient(135deg, #2a7a4a, #2f8f5b);
}

[data-theme="dark"] .comparison-table tbody td {
    border-bottom-color: rgba(200, 180, 140, 0.08);
    color: #e8dfd2;
}

[data-theme="dark"] .comparison-table tbody tr:hover {
    background: rgba(63, 185, 80, 0.05);
}

[data-theme="dark"] .cmp-yes {
    color: #6fcf97;
}

[data-theme="dark"] .cmp-no {
    color: #5f5245;
}

/* -----------------------------------------------------------------
   BREADCRUMB DATE
   ----------------------------------------------------------------- */
.breadcrumb-date {
    font-size: 0.78em;
    opacity: 0.6;
    margin-left: auto;
    font-weight: 400;
}

[data-theme="dark"] .breadcrumb-date {
    opacity: 0.5;
}

[data-theme="light"] .breadcrumb-date {
    color: #5f5245;
}

/* -----------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------- */
@media (max-width: 1100px) {
    .toc-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .keybind-grid {
        gap: 10px;
    }

    .keybind-card {
        min-width: 110px;
        padding: 12px 16px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .packs-grid {
        grid-template-columns: 1fr;
    }

    .changelog-timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -23px;
        width: 12px;
        height: 12px;
    }

    .changelog-timeline::before {
        left: 10px;
    }

    .comparison-table {
        font-size: 0.85em;
    }

    .comparison-table thead th,
    .comparison-table tbody td {
        padding: 10px 8px;
    }

    .breadcrumb-date {
        display: none;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1em;
    }

    .mod-filter {
        margin: 10px auto;
    }

    .filter-tags {
        gap: 6px;
    }

    .filter-tag {
        padding: 6px 14px;
        font-size: 0.8em;
    }

    .announcement-banner {
        flex-wrap: wrap;
        padding: 12px 16px;
        font-size: 0.88em;
        gap: 8px;
    }

    .announcement-link {
        font-size: 0.85em;
        padding: 5px 12px;
    }

    .bug-report-btn {
        bottom: 20px;
        left: 20px;
        padding: 8px 14px;
        font-size: 0.8em;
    }

    .bug-label {
        display: none;
    }
}
