/* =======================================================================
   Senpai's Chest - Treasure Chest / Adventurer Theme
   ======================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Nunito:wght@400;600;700;800&display=swap');

/* -----------------------------------------------------------------
   CSS CUSTOM PROPERTIES - DARK MODE (default)
   ----------------------------------------------------------------- */
:root {
    --ink: #f0e8d8;
    --ink-heading: #fff5e0;
    --muted: #bfae94;
    --bg-1: #1a1208;
    --bg-2: #2a1f0f;
    --bg-3: #332814;
    --card: rgba(38, 28, 14, 0.85);
    --card-paper: #3a2e1a;
    --border: #4a3a22;
    --border-rope: #6b5530;
    --accent: #ffc332;
    --accent-hover: #ffe082;
    --accent-deep: #e6a817;
    --accent-2: #c98b2e;
    --gold-shine: #fff8e1;
    --parchment: #2e2312;
    --parchment-inner: #352a18;
    --wood-dark: #1a1208;
    --wood-mid: #2a1f0f;
    --wood-light: #4a3a22;
    --wax-red: #8b2020;
    --wax-highlight: #c04040;
    --compass-color: #ffc332;
    --trail-color: #6b5530;
    --pin-color: #a08050;
    --notice-bg: rgba(139, 32, 32, 0.15);
    --notice-border: rgba(192, 64, 64, 0.35);
    --notice-heading: #e8a060;
    --link-color: #ffc332;
    --link-hover: #ffe082;
    --scroll-bg: rgba(46, 35, 18, 0.95);
    --table-header-bg: rgba(74, 58, 34, 0.8);
    --table-row-hover: rgba(255, 195, 50, 0.05);
}

/* -----------------------------------------------------------------
   RESET & BASE
   ----------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Gill Sans', 'Trebuchet MS', sans-serif;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 195, 50, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(230, 168, 23, 0.08) 0%, transparent 50%),
        linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 40%, var(--bg-3) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 0;
    color: var(--ink);
    line-height: 1.6;
}

/* -----------------------------------------------------------------
   TOP NAVIGATION (breadcrumb)
   ----------------------------------------------------------------- */
.top-nav {
    background: rgba(20, 14, 6, 0.96);
    padding: 15px 40px;
    border-bottom: 3px solid transparent;
    border-image: repeating-linear-gradient(
        90deg,
        var(--border-rope) 0px,
        var(--accent-deep) 3px,
        var(--border-rope) 6px,
        transparent 6px,
        transparent 9px
    ) 3;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-home {
    color: var(--accent);
    text-decoration: none;
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-weight: 700;
    font-size: 0.95em;
    transition: color 0.3s, text-shadow 0.3s;
}

.nav-home:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 12px rgba(255, 195, 50, 0.5);
}

.nav-divider {
    color: var(--border-rope);
    margin: 0 10px;
}

.nav-current {
    color: var(--muted);
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}

/* -----------------------------------------------------------------
   MAIN CONTAINER - "Adventure Journal" frame
   ----------------------------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px 60px;
    position: relative;
}

/* Rope border left + right on container */
.container::before,
.container::after {
    content: '';
    position: fixed;
    top: 60px;
    bottom: 0;
    width: 6px;
    z-index: 50;
    pointer-events: none;
    background: repeating-linear-gradient(
        180deg,
        var(--border-rope) 0px,
        var(--accent-deep) 4px,
        var(--border-rope) 8px,
        transparent 8px,
        transparent 14px
    );
    opacity: 0.3;
}

.container::before { left: 12px; }
.container::after { right: 12px; }

/* -----------------------------------------------------------------
   HERO SECTION - Treasure Chest Opening
   ----------------------------------------------------------------- */
.hero {
    text-align: center;
    padding: 70px 30px 60px;
    margin-bottom: 50px;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(255, 195, 50, 0.2) 0%, transparent 60%),
        linear-gradient(180deg, rgba(255, 195, 50, 0.1) 0%, transparent 100%);
    border-radius: 24px;
    border: 2px solid rgba(255, 195, 50, 0.25);
    position: relative;
    overflow: hidden;
}

/* Gold gleam sweep across hero */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 248, 225, 0.06) 40%,
        rgba(255, 248, 225, 0.12) 50%,
        rgba(255, 248, 225, 0.06) 60%,
        transparent 80%
    );
    animation: heroGleam 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGleam {
    0% { left: -100%; }
    40%, 100% { left: 200%; }
}

.hero-icon {
    font-size: 5em;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 0 25px rgba(255, 195, 50, 0.5));
    animation: chestGlow 3s ease-in-out infinite;
    position: relative;
}

@keyframes chestGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 195, 50, 0.4));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 35px rgba(255, 195, 50, 0.7)) drop-shadow(0 0 60px rgba(255, 195, 50, 0.3));
        transform: scale(1.05);
    }
}

/* Shimmer sparkles around icon */
.hero-icon::before,
.hero-icon::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    animation: sparkle 2.5s ease-in-out infinite;
}

.hero-icon::before {
    width: 6px; height: 6px;
    top: 10px; right: -5px;
    animation-delay: 0s;
}

.hero-icon::after {
    width: 4px; height: 4px;
    bottom: 15px; left: -8px;
    animation-delay: 1.2s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
}

.hero h1 {
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-size: 3.2em;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        var(--gold-shine) 25%,
        var(--accent) 50%,
        var(--accent-deep) 75%,
        var(--accent) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 4s linear infinite;
    text-shadow: none;
}

@keyframes goldShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.tagline {
    font-family: 'Nunito', sans-serif;
    font-size: 1.3em;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Version Badge - Doubloon coin */
.version-badge {
    display: inline-block;
    margin-top: 18px;
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        #ffe88a 0%,
        #ffc332 30%,
        #e6a817 60%,
        #c08a10 80%,
        #a07008 100%
    );
    color: #3a2208;
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: 0.85em;
    box-shadow:
        0 0 0 3px #a07008,
        0 0 0 5px rgba(255, 195, 50, 0.3),
        0 6px 25px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 248, 225, 0.4),
        inset 0 -2px 4px rgba(100, 70, 10, 0.3);
    position: relative;
}

/* Coin edge texture */
.version-badge::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed rgba(160, 112, 8, 0.5);
    pointer-events: none;
}

/* -----------------------------------------------------------------
   INTRO SECTION - Parchment note
   ----------------------------------------------------------------- */
.intro-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.15em;
    line-height: 1.8;
    color: var(--ink);
    padding: 35px 40px;
    background: var(--parchment-inner);
    border-radius: 4px;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Decorative corner flourishes */
.intro-section::before,
.intro-section::after {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.5em;
    color: var(--accent);
    opacity: 0.4;
    position: absolute;
    line-height: 1;
}

.intro-section::before {
    content: '\2767';
    top: 8px;
    left: 14px;
}

.intro-section::after {
    content: '\2767';
    bottom: 8px;
    right: 14px;
    transform: rotate(180deg);
}

/* -----------------------------------------------------------------
   SECTION TITLES - Compass Rose accents
   ----------------------------------------------------------------- */
.section-title {
    text-align: center;
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-size: 1.9em;
    font-weight: 700;
    margin: 60px 0 35px;
    color: var(--ink-heading);
    position: relative;
    padding-bottom: 20px;
}

/* Compass rose decorative underline */
.section-title::after {
    content: '\2726 \2014\2014\2014 \2726';
    display: block;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.45em;
    letter-spacing: 4px;
    color: var(--accent);
    white-space: nowrap;
}

/* -----------------------------------------------------------------
   KEYBIND SECTION - Quick Controls
   ----------------------------------------------------------------- */
.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: var(--parchment-inner);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 24px;
    text-align: center;
    min-width: 140px;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    position: relative;
}

.keybind-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(255, 195, 50, 0.1);
}

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

.keybind-action {
    font-size: 0.88em;
    color: var(--muted);
}

kbd {
    background: var(--wood-dark);
    border: 1px solid var(--border);
    border-bottom: 3px solid var(--border-rope);
    border-radius: 6px;
    padding: 4px 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent);
    display: inline-block;
}

/* -----------------------------------------------------------------
   NOTICE BOXES - "Treasure Notes" with wax seal
   ----------------------------------------------------------------- */
.notice-section {
    max-width: 800px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notice-box {
    background: var(--notice-bg);
    border: 1px solid var(--notice-border);
    border-radius: 8px;
    padding: 28px 32px 28px 70px;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Wax seal accent */
.notice-box::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 20px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%,
        var(--wax-highlight) 0%,
        var(--wax-red) 50%,
        #5a1010 100%
    );
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 3px rgba(255, 200, 200, 0.2);
}

/* Seal letter emboss */
.notice-box::after {
    content: 'S';
    position: absolute;
    top: 18px;
    left: 20px;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: 0.85em;
    color: rgba(255, 200, 200, 0.35);
}

.notice-box h3 {
    color: var(--notice-heading);
    margin-bottom: 12px;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.15em;
    font-weight: 700;
}

.notice-box p {
    color: var(--ink);
    line-height: 1.7;
    margin-bottom: 8px;
    opacity: 0.9;
}

.notice-box p:last-child {
    margin-bottom: 0;
}

/* -----------------------------------------------------------------
   FEATURES GRID - Pinned adventure journal pages
   ----------------------------------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 50px;
}

.feature-card {
    background: var(--card-paper);
    border-radius: 4px;
    padding: 35px 28px 28px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow:
        2px 3px 12px rgba(0, 0, 0, 0.2),
        inset 0 0 25px rgba(0, 0, 0, 0.1);
}

/* Slight rotation for journal page effect - alternating */
.feature-card:nth-child(odd) { transform: rotate(-0.8deg); }
.feature-card:nth-child(even) { transform: rotate(0.8deg); }

.feature-card:hover {
    transform: rotate(0deg) translateY(-6px) !important;
    box-shadow:
        4px 6px 25px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 195, 50, 0.08);
    border-color: var(--accent);
}

/* Pin / nail at top center */
.feature-card::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%,
        #d4a84a 0%,
        var(--pin-color) 50%,
        #6a5030 100%
    );
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.feature-card h3 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 1.1em;
    font-weight: 700;
}

.feature-card p {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.95em;
}

/* -----------------------------------------------------------------
   RULE TYPES - Scroll / parchment fragments with torn edges
   ----------------------------------------------------------------- */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.rule-card {
    background: var(--scroll-bg);
    padding: 28px 24px;
    border: 1px solid var(--border);
    position: relative;
    /* Torn / scroll edge using clip-path */
    clip-path: polygon(
        0% 4%, 5% 0%, 12% 3%, 20% 0%, 28% 2%, 36% 0%, 44% 3%, 52% 0%,
        60% 2%, 68% 0%, 76% 3%, 84% 0%, 92% 2%, 100% 0%,
        100% 96%, 95% 100%, 88% 97%, 80% 100%, 72% 98%, 64% 100%,
        56% 97%, 48% 100%, 40% 98%, 32% 100%, 24% 97%, 16% 100%,
        8% 98%, 0% 100%
    );
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.rule-card:hover {
    transform: scale(1.02);
}

.rule-card h4 {
    color: var(--accent);
    margin-bottom: 12px;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.1em;
    font-weight: 700;
}

.rule-card p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95em;
}

.rule-example {
    margin-top: 14px;
    background: rgba(255, 195, 50, 0.08);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--ink);
    border-left: 3px solid var(--accent);
    font-style: italic;
}

/* -----------------------------------------------------------------
   HOW TO USE - Treasure Map Journey (dotted trail)
   ----------------------------------------------------------------- */
.usage-steps {
    max-width: 720px;
    margin: 0 auto 50px;
    position: relative;
    padding-left: 50px;
}

/* Dotted trail connecting the stops */
.usage-steps::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 30px;
    bottom: 30px;
    width: 4px;
    background: repeating-linear-gradient(
        180deg,
        var(--trail-color) 0px,
        var(--trail-color) 8px,
        transparent 8px,
        transparent 16px
    );
    border-radius: 2px;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    background: var(--parchment-inner);
    padding: 25px 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.15);
}

.step:hover {
    border-color: var(--accent);
    box-shadow: 2px 3px 20px rgba(255, 195, 50, 0.1);
}

/* Map stop marker */
.step-number {
    background: radial-gradient(circle at 40% 35%,
        #ffe88a 0%,
        var(--accent) 40%,
        var(--accent-deep) 80%
    );
    color: #2a1508;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: 1.3em;
    flex-shrink: 0;
    box-shadow:
        0 0 0 3px var(--accent-deep),
        0 0 0 5px rgba(255, 195, 50, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.step-content h4 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--ink-heading);
    margin-bottom: 8px;
    font-size: 1.1em;
    font-weight: 700;
}

.step-content p {
    color: var(--muted);
    line-height: 1.6;
}

/* -----------------------------------------------------------------
   CONFIGURATION TABLE - Ship's Log / Ledger
   ----------------------------------------------------------------- */
.config-section {
    max-width: 860px;
    margin: 0 auto;
}

.config-table {
    max-width: 100%;
    margin: 0 auto 20px;
    overflow-x: auto;
    border: 2px solid var(--border-rope);
    border-radius: 8px;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--parchment);
    font-size: 0.95em;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--table-header-bg);
    color: var(--accent);
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: 0.95em;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-rope);
}

td {
    color: var(--ink);
}

td:first-child {
    font-family: 'Consolas', 'Courier New', monospace;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--table-row-hover);
}

/* Alternating row tint for ledger feel */
tr:nth-child(even) td {
    background: rgba(255, 195, 50, 0.02);
}

tr:nth-child(even):hover td {
    background: var(--table-row-hover);
}

code {
    background: var(--wood-dark);
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent);
    border: 1px solid var(--border);
}

.config-note {
    text-align: center;
    color: var(--muted);
    font-size: 0.95em;
    margin-top: 15px;
    margin-bottom: 40px;
}

/* -----------------------------------------------------------------
   INSTALLATION - Expedition steps
   ----------------------------------------------------------------- */
.install-steps {
    max-width: 720px;
    margin: 0 auto 50px;
}

.install-step {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
    background: var(--parchment-inner);
    padding: 25px 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    align-items: center;
    transition: border-color 0.3s, transform 0.25s;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
}

.install-step:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.step-icon {
    font-size: 2.2em;
    width: 55px;
    text-align: center;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.step-info h4 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--ink-heading);
    margin-bottom: 6px;
    font-weight: 700;
}

.step-info p {
    color: var(--muted);
    line-height: 1.6;
}

.step-info a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s, text-shadow 0.3s;
}

.step-info a:hover {
    color: var(--link-hover);
    text-shadow: 0 0 10px rgba(255, 195, 50, 0.4);
    text-decoration: underline;
}

/* -----------------------------------------------------------------
   RELATED MODS - "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: 16px;
    margin-top: 16px;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 10px;
    text-decoration: none;
    background: var(--parchment-inner);
    border: 1px solid var(--border);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    color: inherit;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 2px 4px 20px rgba(255, 195, 50, 0.12);
}

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

.related-info h4 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--accent);
    margin-bottom: 4px;
    font-size: 1.05em;
    font-weight: 700;
}

.related-info p {
    font-size: 0.88em;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

/* -----------------------------------------------------------------
   FOOTER - Map edge / old paper
   ----------------------------------------------------------------- */
.footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px 20px;
    border-top: 3px solid transparent;
    border-image: repeating-linear-gradient(
        90deg,
        var(--border-rope) 0px,
        var(--accent-deep) 3px,
        var(--border-rope) 6px,
        transparent 6px,
        transparent 9px
    ) 3;
    background: rgba(20, 14, 6, 0.6);
    border-radius: 0 0 20px 20px;
}

.footer p {
    color: var(--muted);
    margin-bottom: 15px;
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.9em;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s, text-shadow 0.3s;
}

.footer-links a:hover {
    color: var(--link-hover);
    text-shadow: 0 0 10px rgba(255, 195, 50, 0.4);
    text-decoration: underline;
}

/* -----------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------- */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px 40px;
    }

    .container::before,
    .container::after {
        display: none;
    }

    .hero {
        padding: 45px 20px 40px;
    }

    .hero h1 {
        font-size: 2.2em;
    }

    .hero-icon {
        font-size: 3.5em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .intro-section {
        padding: 25px 20px;
        font-size: 1.05em;
    }

    .usage-steps {
        padding-left: 0;
    }

    .usage-steps::before {
        display: none;
    }

    .step, .install-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto 12px;
    }

    .step-icon {
        margin: 0 auto;
    }

    .top-nav {
        padding: 12px 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .notice-box {
        padding: 25px 20px 25px 60px;
    }

    .feature-card:nth-child(odd),
    .feature-card:nth-child(even) {
        transform: rotate(0deg);
    }

    .keybind-grid {
        gap: 10px;
    }

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

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75em;
    }

    .hero-icon {
        font-size: 3em;
    }

    .tagline {
        font-size: 1.1em;
    }

    .version-badge {
        width: 58px;
        height: 58px;
        line-height: 58px;
        font-size: 0.75em;
    }

    .features-grid,
    .rules-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.3em;
    }

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 10px 12px;
    }

    .notice-box {
        padding: 20px 16px 20px 50px;
    }

    .notice-box::before,
    .notice-box::after {
        width: 26px;
        height: 26px;
        line-height: 26px;
        top: 14px;
        left: 14px;
    }
}

/* =================================================================
   LIGHT MODE
   ================================================================= */

[data-theme="light"] {
    --ink: #2a1f0f;
    --ink-heading: #1a1208;
    --muted: #5a4a32;
    --bg-1: #faf6ef;
    --bg-2: #f2ebe0;
    --bg-3: #ece3d4;
    --card: rgba(255, 255, 255, 0.78);
    --card-paper: #f5eedd;
    --border: #d4c4a0;
    --border-rope: #b8a47a;
    --accent: #c09020;
    --accent-hover: #9a7018;
    --accent-deep: #a07818;
    --accent-2: #8a6818;
    --gold-shine: #fff8e1;
    --parchment: #faf5ec;
    --parchment-inner: #f5edd8;
    --wood-dark: #e8dfc8;
    --wood-mid: #f0e8d4;
    --wood-light: #d4c4a0;
    --wax-red: #a03030;
    --wax-highlight: #d04848;
    --compass-color: #c09020;
    --trail-color: #c8b888;
    --pin-color: #b09060;
    --notice-bg: rgba(160, 48, 48, 0.07);
    --notice-border: rgba(160, 48, 48, 0.25);
    --notice-heading: #8b4020;
    --link-color: #a07818;
    --link-hover: #7a5810;
    --scroll-bg: #f7f0e0;
    --table-header-bg: rgba(192, 144, 32, 0.12);
    --table-row-hover: rgba(192, 144, 32, 0.06);
}

[data-theme="light"] body {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 195, 50, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(192, 144, 32, 0.06) 0%, transparent 50%),
        linear-gradient(160deg, #faf6ef 0%, #f2ebe0 40%, #ece3d4 100%);
    color: #2a1f0f;
}

[data-theme="light"] .top-nav {
    background: rgba(250, 246, 240, 0.96);
}

[data-theme="light"] .hero {
    background:
        radial-gradient(ellipse at 50% 80%, rgba(192, 144, 32, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, rgba(192, 144, 32, 0.08) 0%, transparent 100%);
    border-color: rgba(192, 144, 32, 0.3);
}

[data-theme="light"] .hero::before {
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 248, 225, 0.15) 40%,
        rgba(255, 248, 225, 0.25) 50%,
        rgba(255, 248, 225, 0.15) 60%,
        transparent 80%
    );
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(
        135deg,
        #a07818 0%,
        #d4a830 25%,
        #a07818 50%,
        #8a6818 75%,
        #a07818 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .version-badge {
    background: radial-gradient(circle at 35% 35%,
        #ffe88a 0%,
        #e6b830 30%,
        #c09020 60%,
        #a07818 80%,
        #8a6818 100%
    );
    color: #fff;
    box-shadow:
        0 0 0 3px #8a6818,
        0 0 0 5px rgba(192, 144, 32, 0.3),
        0 6px 25px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 248, 225, 0.5),
        inset 0 -2px 4px rgba(100, 70, 10, 0.2);
}

[data-theme="light"] .intro-section {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .feature-card {
    box-shadow:
        2px 3px 12px rgba(0, 0, 0, 0.08),
        inset 0 0 20px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .feature-card:hover {
    box-shadow:
        4px 6px 25px rgba(0, 0, 0, 0.12),
        0 0 25px rgba(192, 144, 32, 0.08);
}

[data-theme="light"] .feature-card::before {
    background: radial-gradient(circle at 40% 35%,
        #e8c878 0%,
        #c0a060 50%,
        #8a7040 100%
    );
}

[data-theme="light"] .rule-card {
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .step {
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .step-number {
    background: radial-gradient(circle at 40% 35%,
        #ffe88a 0%,
        #d4a830 40%,
        #a07818 80%
    );
    color: #fff;
    box-shadow:
        0 0 0 3px #a07818,
        0 0 0 5px rgba(192, 144, 32, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] kbd {
    border-bottom-color: #c8b888;
}

[data-theme="light"] .config-table {
    border-color: var(--border);
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] th {
    border-bottom-color: var(--border);
}

[data-theme="light"] code {
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .install-step {
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .related-card {
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .related-card:hover {
    box-shadow: 2px 4px 20px rgba(192, 144, 32, 0.1);
}

[data-theme="light"] .footer {
    background: rgba(245, 237, 220, 0.8);
}

[data-theme="light"] .container::before,
[data-theme="light"] .container::after {
    opacity: 0.15;
}

[data-theme="light"] .notice-box {
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .hero-icon {
    filter: drop-shadow(0 0 20px rgba(192, 144, 32, 0.35));
}

/* Override the chestGlow animation filter for light mode */
[data-theme="light"] .hero-icon {
    animation: chestGlowLight 3s ease-in-out infinite;
}

@keyframes chestGlowLight {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(192, 144, 32, 0.3));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 28px rgba(192, 144, 32, 0.5)) drop-shadow(0 0 50px rgba(192, 144, 32, 0.2));
        transform: scale(1.05);
    }
}
