/* ============================================
   TIDAL BLADES RPG - UNIFIED STYLESHEET
   Based on Naviri Ascension Omni-Forge Design
   ============================================ */

:root {
    /* Color Palette */
    --tidal-deep: #0a1a2d;
    --tidal-blue: #1e4d8c;
    --coral-red: #e63946;
    --sunset-gold: #f8961e;
    --seafoam: #a8dadc;
    --tidal-gold: #ffd166;
    --tidal-teal: #2a9d8f;
    --leviathan-purple: #5a189a;
    --void-black: #0c0b1d;

    /* Extended Color Palette (Page-Specific) */
    --teal-accent: #26a69a;
    --biolum-blue: #00e5ff;
    --fold-purple: #9b59b6;
    --tidal-coral: #ff6b6b;
    --tidal-success: #4caf50;
    --tidal-sand: #d4a574;
    --tidal-wave: #0077be;
    --tidal-green: #27ae60;
    --tidal-sunset: #ff7f50;
    --gold-acc: #ffd700;
    --teal: #2a9d8f;
    --tropical-teal: #1abc9c;
    --sea-green: #16a085;
    --gold: #ffd166;
    --bioluminescent: #00ffcc;

    /* Backgrounds */
    --card-bg: rgba(30, 77, 140, 0.08);
    --section-bg: rgba(0, 0, 0, 0.1);

    /* Gradients */
    --wave-gradient: linear-gradient(90deg, var(--tidal-blue), var(--tidal-teal), var(--tidal-gold));
    --header-gradient: linear-gradient(135deg, var(--tidal-blue), var(--leviathan-purple));
    --button-gradient: linear-gradient(to right, var(--tidal-teal), var(--tidal-blue));
}

/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--void-black);
    color: var(--seafoam);
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(30, 77, 140, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(168, 218, 220, 0.1) 0%, transparent 25%),
        linear-gradient(var(--void-black) 0%, var(--tidal-deep) 100%);
    min-height: 100vh;
    padding-bottom: 3rem;
    padding-top: 80px; /* Space for fixed nav */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   NAVIGATION MENU
   ============================================ */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--tidal-deep) 0%, var(--tidal-blue) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--tidal-teal);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--tidal-gold);
    text-decoration: none;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--seafoam);
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(42, 157, 143, 0.2);
    color: var(--tidal-gold);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--tidal-teal);
    color: var(--tidal-deep);
    box-shadow: 0 0 15px rgba(42, 157, 143, 0.5);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--tidal-deep);
    border: 2px solid var(--tidal-teal);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu .nav-link {
    border-radius: 0;
    border-bottom: 1px solid rgba(168, 218, 220, 0.1);
}

.nav-dropdown-menu .nav-link:last-child {
    border-bottom: none;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--tidal-teal);
    color: var(--tidal-gold);
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(42, 157, 143, 0.2);
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 300px;
        height: calc(100vh - 70px);
        background: var(--tidal-deep);
        flex-direction: column;
        padding: 2rem 0;
        gap: 0;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
        transition: left 0.3s ease;
        border-right: 2px solid var(--tidal-teal);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav-link {
        border-radius: 0;
        border-bottom: 1px solid rgba(168, 218, 220, 0.1);
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-dropdown.active .nav-dropdown-menu {
        max-height: 500px;
    }

    .nav-dropdown-toggle::after {
        margin-left: auto;
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--tidal-gold);
    text-shadow:
        0 0 10px rgba(255, 209, 102, 0.5),
        0 0 20px rgba(42, 157, 143, 0.3);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    text-transform: uppercase;
}

h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--seafoam);
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    color: var(--sunset-gold);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

h4 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    color: var(--tidal-teal);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

p {
    margin-bottom: 1rem;
}

strong {
    color: var(--tidal-gold);
}

em {
    color: var(--sunset-gold);
}

/* ============================================
   HEADER
   ============================================ */

header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(255, 209, 102, 0.1) 0%, transparent 50%),
        linear-gradient(to bottom, transparent 0%, rgba(10, 26, 45, 0.9) 100%);
    z-index: 0;
}

.title-container,
.header-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    color: var(--seafoam);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.wave-divider {
    height: 4px;
    width: 80%;
    margin: 1.5rem auto;
    background: var(--wave-gradient);
    border-radius: 2px;
}

/* ============================================
   CARDS & SECTIONS
   ============================================ */

.part,
.player-sheet,
.market-sheet,
.weapon-table-section,
.bestiary-section {
    background: var(--card-bg);
    border: 2px solid var(--leviathan-purple);
    border-radius: 10px;
    padding: 1.8rem;
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.part:hover,
.player-sheet:hover,
.market-sheet:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(76, 201, 240, 0.7);
}

.part-2 {
    border-color: var(--tidal-teal);
}

.section {
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--section-bg);
}

.section:last-child {
    border-bottom: none;
}

.section-header,
.part-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--tidal-teal);
}

.part-icon,
.champion-icon,
.market-icon,
.ascension-icon {
    font-size: 2.5rem;
    color: var(--tidal-gold);
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
}

.part-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--seafoam);
}

.part-subtitle {
    font-family: 'Rajdhani', sans-serif;
    color: var(--tidal-teal);
    margin-top: 0.5rem;
}

/* ============================================
   TABLES
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

th {
    background: var(--header-gradient);
    color: white;
    padding: 1.2rem;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(168, 218, 220, 0.2);
    vertical-align: top;
}

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

table tr:hover {
    background-color: rgba(42, 157, 143, 0.05);
}

/* ============================================
   BUTTONS
   ============================================ */

button,
.toggle-button,
.species-btn {
    background: rgba(42, 157, 143, 0.2);
    border: 2px solid var(--tidal-teal);
    color: var(--seafoam);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

button:hover,
.toggle-button:hover,
.toggle-button.active,
.species-btn:hover,
.species-btn.active {
    background: var(--tidal-teal);
    color: var(--tidal-deep);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 157, 143, 0.4);
}

/* ============================================
   SPECIAL ELEMENTS
   ============================================ */

.highlight,
.quote-box {
    background: rgba(56, 173, 169, 0.2);
    padding: 18px;
    border-radius: 10px;
    border-left: 5px solid var(--tidal-teal);
    margin: 20px 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.warning {
    background: rgba(229, 80, 57, 0.2);
    padding: 18px;
    border-radius: 10px;
    border-left: 5px solid var(--coral-red);
    margin: 20px 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.success,
.market-tip {
    background: rgba(255, 215, 0, 0.2);
    padding: 18px;
    border-radius: 10px;
    border-left: 5px solid var(--tidal-gold);
    margin: 20px 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.formula-box {
    background: rgba(10, 61, 98, 0.6);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Rajdhani', monospace;
    font-size: 1.1rem;
    margin: 15px 0;
    border-left: 4px solid var(--tidal-gold);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: var(--tidal-gold);
}

/* ============================================
   DICE & GAME ELEMENTS
   ============================================ */

.dice {
    display: inline-block;
    background: white;
    color: var(--tidal-deep);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    text-align: center;
    line-height: 36px;
    font-weight: bold;
    margin: 0 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    font-family: 'Rajdhani', monospace;
    cursor: pointer;
    transition: transform 0.2s;
}

.dice:hover {
    transform: scale(1.1);
}

.dice-large {
    width: 45px;
    height: 45px;
    line-height: 45px;
    font-size: 1.2rem;
}

.shell {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--tidal-gold);
    font-weight: 600;
}

/* ============================================
   GRIDS & LAYOUTS
   ============================================ */

.species-grid,
.faction-grid,
.items-grid,
.ability-grid,
.fruit-grid,
.rumor-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.species-card,
.faction-card,
.item-card,
.ability-card,
.fruit-card,
.rumor-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    border-top: 4px solid var(--tidal-teal);
    transition: all 0.3s ease;
    cursor: pointer;
}

.species-card:hover,
.item-card:hover,
.ability-card:hover,
.fruit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-top-color: var(--tidal-gold);
}

.rumor-card {
    border-left: 4px solid var(--coral-red);
    border-top: none;
}

/* ============================================
   SCALE INDICATORS
   ============================================ */

.scale-indicator {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.scale-small {
    background: rgba(42, 161, 152, 0.3);
    color: var(--tidal-teal);
    border: 1px solid var(--tidal-teal);
}

.scale-medium {
    background: rgba(62, 180, 137, 0.3);
    color: var(--tidal-gold);
    border: 1px solid var(--tidal-gold);
}

.scale-raid {
    background: rgba(229, 80, 57, 0.3);
    color: var(--coral-red);
    border: 1px solid var(--coral-red);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(168, 218, 220, 0.2);
    color: var(--seafoam);
    font-family: 'Rajdhani', sans-serif;
}

.naviri-logo,
.tidal-logo,
.market-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--tidal-gold);
    margin-bottom: 10px;
    font-weight: 700;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.collapsed {
    display: none;
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--tidal-gold);
}

.text-teal {
    color: var(--tidal-teal);
}

.text-coral {
    color: var(--coral-red);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .section-header,
    .part-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .toggle-button {
        align-self: flex-start;
    }

    .species-grid,
    .faction-grid,
    .items-grid,
    .ability-grid,
    .fruit-grid,
    .rumor-table {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.8rem;
    }
}

@media (min-width: 992px) {
    .rules-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weapon-table-section {
    animation: fadeIn 0.5s ease;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(76, 201, 240, 0.8);
    }
}

.part:hover,
.market-sheet:hover {
    animation: glow 2s ease-in-out infinite;
}

/* ============================================
   PAGE-SPECIFIC ELEMENTS
   ============================================ */

/* Champions Page */
.tidal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

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

.champion-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border-top: 3px solid var(--tidal-teal);
    transition: all 0.3s ease;
    cursor: pointer;
}

.champion-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--tidal-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.champion-icon-small {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--tidal-gold);
}

.champion-name {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--seafoam);
    margin-bottom: 5px;
}

.champion-role {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: var(--tidal-teal);
}

.mono-tag,
.island-ref {
    background: rgba(42, 157, 143, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    color: var(--tidal-gold);
}

.formula {
    background: rgba(10, 61, 98, 0.6);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Rajdhani', monospace;
    font-size: 1.1rem;
    margin: 15px 0;
    border-left: 4px solid var(--tidal-gold);
    text-align: center;
    color: var(--tidal-gold);
}

.mission-seed {
    background: linear-gradient(135deg, rgba(90, 24, 154, 0.2), rgba(30, 77, 140, 0.2));
    border: 2px solid var(--leviathan-purple);
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
}

.mission-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--tidal-gold);
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
}

/* System Page */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 15rem;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    color: rgba(42, 157, 143, 0.03);
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.version-badge {
    background: var(--tidal-teal);
    color: var(--tidal-deep);
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9rem;
}

.section-intro {
    font-size: 1.1rem;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(42, 157, 143, 0.1);
    border-left: 4px solid var(--tidal-teal);
    border-radius: 5px;
}

.rule-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
    border-left: 4px solid var(--tidal-teal);
    transition: all 0.3s ease;
}

.rule-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.trait-badge {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    margin: 5px;
    font-size: 0.95rem;
}

.trait-badge.focus {
    background: rgba(100, 150, 255, 0.3);
    border: 2px solid #6496ff;
    color: #a8c5ff;
}

.trait-badge.spirit {
    background: rgba(255, 209, 102, 0.3);
    border: 2px solid var(--tidal-gold);
    color: var(--tidal-gold);
}

.trait-badge.grit {
    background: rgba(229, 80, 57, 0.3);
    border: 2px solid var(--coral-red);
    color: #ff8a80;
}

.trait-badge.prowess {
    background: rgba(42, 157, 143, 0.3);
    border: 2px solid var(--tidal-teal);
    color: var(--tidal-teal);
}

.metric-highlight {
    color: var(--tidal-gold);
    font-weight: 700;
    background: rgba(255, 209, 102, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.synergy-badge {
    background: var(--leviathan-purple);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.interactive-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.panel-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--tidal-teal);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.panel-card:hover {
    background: rgba(42, 157, 143, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(42, 157, 143, 0.4);
}

.panel-card i {
    font-size: 2rem;
    color: var(--tidal-gold);
    margin-bottom: 10px;
}

.panel-card h4 {
    margin: 10px 0 5px;
    color: var(--seafoam);
}

.panel-card p {
    font-size: 0.9rem;
    color: var(--tidal-teal);
    margin: 0;
}

.spice-alert {
    background: linear-gradient(135deg, rgba(248, 150, 30, 0.2), rgba(229, 80, 57, 0.2));
    border: 2px solid var(--sunset-gold);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.spice-alert h4 {
    color: var(--sunset-gold);
    font-family: 'Cinzel', serif;
    margin-bottom: 10px;
}

.fold-threat {
    background: linear-gradient(135deg, rgba(229, 80, 57, 0.2), rgba(90, 24, 154, 0.2));
    border: 2px solid var(--coral-red);
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
}

.threat-level {
    background: var(--coral-red);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.tidal-icon {
    font-size: 2rem;
    color: var(--tidal-teal);
    margin-top: 15px;
}

/* Actions Page */
.epigraph {
    font-style: italic;
    text-align: center;
    color: var(--tidal-teal);
    font-size: 1.1rem;
    margin: 15px 0;
}

.resource-section {
    margin: 40px 0;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.resource-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid;
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.spirit-card {
    border-color: var(--tidal-gold);
}

.synergy-card {
    border-color: var(--leviathan-purple);
}

.focus-card {
    border-color: #6496ff;
}

.resilience-card {
    border-color: var(--coral-red);
}

.resource-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.resource-icon {
    font-size: 3rem;
}

.spirit-icon {
    filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.5));
}

.synergy-icon {
    filter: drop-shadow(0 0 10px rgba(90, 24, 154, 0.5));
}

.focus-icon {
    filter: drop-shadow(0 0 10px rgba(100, 150, 255, 0.5));
}

.resilience-icon {
    filter: drop-shadow(0 0 10px rgba(229, 80, 57, 0.5));
}

.resource-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--seafoam);
}

.action-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.action-item {
    padding: 12px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid;
    transition: all 0.3s ease;
}

.action-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.spirit-action {
    border-left-color: var(--tidal-gold);
}

.synergy-action {
    border-left-color: var(--leviathan-purple);
}

.focus-action {
    border-left-color: #6496ff;
}

.resilience-action {
    border-left-color: var(--coral-red);
}

.resource-cost {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
}

.spirit-cost {
    background: rgba(255, 209, 102, 0.3);
    color: var(--tidal-gold);
    border: 1px solid var(--tidal-gold);
}

.synergy-cost {
    background: rgba(90, 24, 154, 0.3);
    color: var(--leviathan-purple);
    border: 1px solid var(--leviathan-purple);
}

.focus-cost {
    background: rgba(100, 150, 255, 0.3);
    color: #6496ff;
    border: 1px solid #6496ff;
}

.resilience-cost {
    background: rgba(229, 80, 57, 0.3);
    color: var(--coral-red);
    border: 1px solid var(--coral-red);
}

.cost-example {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.pool-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.pool-spirit {
    background: var(--tidal-gold);
    color: var(--tidal-deep);
}

.pool-synergy {
    background: var(--leviathan-purple);
    color: white;
}

.pool-focus {
    background: #6496ff;
    color: white;
}

.pool-resilience {
    background: var(--coral-red);
    color: white;
}

.dice-notation {
    font-family: 'Rajdhani', monospace;
    font-size: 1.2rem;
    color: var(--seafoam);
    margin: 10px 0;
}

/* Rules Page Specific */
.dice-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.dice-xlarge {
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 1.5rem;
}

.ascension-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.forge-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border-left: 4px solid var(--tidal-teal);
}

.forge-heritage {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tidal-gold);
    margin-bottom: 15px;
}

.range-bar {
    display: flex;
    height: 30px;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.range-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.range-fail {
    background-color: var(--coral-red);
}

.range-success {
    background-color: var(--tidal-teal);
}

.range-overclock {
    background-color: var(--tidal-gold);
    color: var(--tidal-deep);
}

.miracle {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.2), rgba(42, 157, 143, 0.2));
    border: 2px solid var(--tidal-gold);
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
}

.loot-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
}

.loot-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: 15px;
    align-items: center;
    border-left: 4px solid var(--tidal-teal);
    transition: all 0.3s ease;
}

.loot-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.loot-range {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--tidal-gold);
}

.loot-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--seafoam);
}

.loot-reward {
    color: var(--tidal-teal);
    font-size: 0.95rem;
}

/* Weapons Page */
.weapon-icon {
    position: fixed;
    font-size: 8rem;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.icon-1 {
    top: 10%;
    left: 5%;
    transform: rotate(-15deg);
}

.icon-2 {
    bottom: 10%;
    right: 5%;
    transform: rotate(25deg);
}

.paths-container {
    margin: 30px 0;
}

.paths-table {
    width: 100%;
}

.path-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--tidal-gold);
    font-size: 1.1rem;
}

.ability-active {
    background: rgba(42, 157, 143, 0.15);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 8px;
    border-left: 3px solid var(--tidal-teal);
}

.ability-passive {
    background: rgba(90, 24, 154, 0.15);
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid var(--leviathan-purple);
}

.weapon-table {
    width: 100%;
    margin: 20px 0;
}

.weapon-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--tidal-gold);
}

.tier-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0 5px;
}

.tier-1 {
    background: rgba(42, 157, 143, 0.3);
    color: var(--tidal-teal);
    border: 1px solid var(--tidal-teal);
}

.tier-2 {
    background: rgba(255, 209, 102, 0.3);
    color: var(--tidal-gold);
    border: 1px solid var(--tidal-gold);
}

.tier-3 {
    background: rgba(229, 80, 57, 0.3);
    color: var(--coral-red);
    border: 1px solid var(--coral-red);
}

/* Bestiary Page */
.fold-corruption {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(90, 24, 154, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

.fold-corruption-1 {
    top: 15%;
    left: 10%;
}

.fold-corruption-2 {
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

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

.title-container {
    position: relative;
    z-index: 2;
}

.quote {
    font-style: italic;
    color: var(--tidal-teal);
    font-size: 1.1rem;
    margin-top: 10px;
}

.board-game-border {
    height: 4px;
    background: var(--wave-gradient);
    margin: 30px 0;
    border-radius: 2px;
}

.game-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--tidal-teal);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    position: relative;
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.game-card.danger {
    border-color: var(--coral-red);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.dice-indicator {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--tidal-gold);
    color: var(--tidal-deep);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.level-minion {
    background: rgba(42, 157, 143, 0.3);
    color: var(--tidal-teal);
    border: 1px solid var(--tidal-teal);
}

.level-elite {
    background: rgba(255, 209, 102, 0.3);
    color: var(--tidal-gold);
    border: 1px solid var(--tidal-gold);
}

.level-boss {
    background: rgba(229, 80, 57, 0.3);
    color: var(--coral-red);
    border: 1px solid var(--coral-red);
}

.stat-table {
    width: 100%;
    margin: 20px 0;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* Market Page */
.market-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.market-icon {
    font-size: 2.5rem;
    color: var(--tidal-gold);
}

.shell-tracker {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--tidal-gold);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.shell-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid;
}

.shell-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--seafoam);
}

.shell-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tidal-gold);
}

.cart-section {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--tidal-teal);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tidal-gold);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

/* Reference/Session Zero Pages */
.species-nav {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.species-btn {
    background: rgba(42, 157, 143, 0.2);
    border: 2px solid var(--tidal-teal);
    color: var(--seafoam);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

.species-btn:hover,
.species-btn.active {
    background: var(--tidal-teal);
    color: var(--tidal-deep);
    transform: translateY(-2px);
}

.species-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid var(--tidal-teal);
}

.species-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.species-icon {
    font-size: 3rem;
    color: var(--tidal-gold);
}

.species-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--seafoam);
}

.species-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 10px;
}

.reef-strider {
    background: var(--tidal-teal);
    color: white;
}

.shell-back {
    background: var(--coral-red);
    color: white;
}

.kelp-kin {
    background: var(--tidal-green);
    color: white;
}

.glimmer-born {
    background: var(--tidal-gold);
    color: var(--tidal-deep);
}

.species-stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 3px solid var(--tidal-teal);
}

.species-bonus {
    color: var(--tidal-gold);
    font-weight: 700;
}

.bond-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.bond-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--leviathan-purple);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bond-card:hover {
    background: rgba(90, 24, 154, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(90, 24, 154, 0.4);
}

/* Omni-Forge Page */
.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.component-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--tidal-teal);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.component-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.component-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--tidal-gold);
    margin-bottom: 10px;
}

.component-effect {
    color: var(--seafoam);
    font-size: 0.95rem;
}

.component-raid {
    background: rgba(229, 80, 57, 0.2);
    border-left: 4px solid var(--coral-red);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

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

.convergence-card {
    background: linear-gradient(135deg, rgba(90, 24, 154, 0.2), rgba(42, 157, 143, 0.2));
    border: 2px solid var(--leviathan-purple);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.convergence-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(90, 24, 154, 0.4);
}

.convergence-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--tidal-gold);
    margin-bottom: 10px;
}

.convergence-effect {
    color: var(--seafoam);
}

.convergence-raid {
    background: rgba(229, 80, 57, 0.2);
    border-left: 4px solid var(--coral-red);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Squad/Tracker Pages */
.tracker-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.tracker-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--tidal-teal);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.tracker-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.squad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.squad-info {
    flex: 1;
}

.squad-scale {
    background: var(--tidal-teal);
    color: var(--tidal-deep);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
}

.counter-btn {
    background: var(--tidal-teal);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.counter-btn:hover {
    background: var(--tidal-gold);
    color: var(--tidal-deep);
    transform: scale(1.05);
}

.counter-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tidal-gold);
    margin: 0 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 8px 0;
}

.status-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Encounter Cards */
.encounter-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.small-encounter {
    border-color: var(--tidal-teal);
}

.medium-encounter {
    border-color: var(--tidal-gold);
}

.raid-encounter {
    border-color: var(--coral-red);
}

.encounter-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.encounter-display {
    font-size: 1.1rem;
    color: var(--seafoam);
    margin: 10px 0;
}

/* Additional utility classes */
.scale-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.scale-label {
    font-weight: 700;
    color: var(--tidal-teal);
    min-width: 120px;
}

.scale-value {
    font-weight: 700;
    color: var(--tidal-gold);
}

.scale-btn {
    background: rgba(42, 157, 143, 0.2);
    border: 2px solid var(--tidal-teal);
    color: var(--seafoam);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scale-btn:hover,
.scale-btn.active {
    background: var(--tidal-teal);
    color: var(--tidal-deep);
}

.tier-display {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.tier-header {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--tidal-gold);
    margin: 20px 0 10px;
}

.tier-cost {
    color: var(--coral-red);
    font-weight: 700;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--seafoam);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive adjustments for page-specific elements */
@media (max-width: 768px) {
    .champions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .loot-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .watermark {
        font-size: 8rem;
    }

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

    .tracker-container {
        grid-template-columns: 1fr;
    }

    .component-grid,
    .convergence-grid {
        grid-template-columns: 1fr;
    }

    .weapon-icon {
        font-size: 4rem;
    }
}

/* ============================================
   ADDITIONAL PAGE-SPECIFIC ELEMENTS
   ============================================ */

/* Resonance/Actions Page */
.master-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.resource-system {
    margin: 40px 0;
}

.section-icon {
    font-size: 1.5rem;
    color: var(--tidal-gold);
    margin-right: 10px;
}

.resource-description {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 3px solid var(--tidal-teal);
}

.spirit-header,
.focus-header,
.resilience-header,
.synergy-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Squad/Logistics Page */
.logistics-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.logistics-icon {
    font-size: 2.5rem;
    color: var(--tidal-gold);
}

.info-item {
    margin: 15px 0;
}

.info-label {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--tidal-teal);
    margin-bottom: 5px;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.info-value {
    width: 100%;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--tidal-teal);
    border-radius: 8px;
    color: var(--seafoam);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.info-value:focus {
    outline: none;
    border-color: var(--tidal-gold);
    box-shadow: 0 0 15px rgba(255, 209, 102, 0.3);
}

.info-value::placeholder {
    color: rgba(168, 218, 220, 0.5);
}

/* Reference/Player Sheet */
.player-sheet {
    background: var(--card-bg);
    border: 2px solid var(--leviathan-purple);
    border-radius: 10px;
    padding: 1.8rem;
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
    margin-bottom: 2rem;
}

/* Omni-Forge Page */
.tidal-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    position: relative;
}

.weapon-table-section {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.weapon-table-section.active {
    opacity: 1;
    max-height: none;
    overflow: visible;
}

/* Session Zero / Reference specific */
.section-icon {
    margin-right: 10px;
}

/* Additional utility styles */
.highlight {
    background: rgba(42, 157, 143, 0.2);
}

main {
    position: relative;
    z-index: 1;
}

section {
    position: relative;
    z-index: 1;
}

/* Fix for any remaining layout issues */
.card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid var(--tidal-teal);
}

.action-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--tidal-teal);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.action-system {
    margin: 30px 0;
}

.combat-system {
    margin: 30px 0;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.dice-box {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--tidal-gold);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.dice-formula {
    font-family: 'Rajdhani', monospace;
    font-size: 1.3rem;
    color: var(--tidal-gold);
    margin: 15px 0;
}

.dice-comparison {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.dice-demo {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    flex: 1;
    min-width: 150px;
}

.cost-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0 3px;
}

.tidal-footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px 20px;
    border-top: 2px solid var(--tidal-teal);
    background: rgba(0, 0, 0, 0.2);
}

.tidal-guard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.tidal-guard-icon {
    font-size: 1.5rem;
    color: var(--tidal-teal);
}

.wave-decoration {
    width: 100%;
    height: 4px;
    background: var(--wave-gradient);
    margin: 30px 0;
    border-radius: 2px;
}

.arrow {
    display: inline-block;
    color: var(--tidal-gold);
    margin: 0 10px;
    font-size: 1.2rem;
}

.bonus-label {
    font-weight: 700;
    color: var(--tidal-teal);
    margin-right: 5px;
}

.bonus-value {
    font-weight: 700;
    color: var(--tidal-gold);
}

.synergy-help {
    background: rgba(90, 24, 154, 0.15);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--leviathan-purple);
    margin: 15px 0;
}

.synergy-bonus {
    color: var(--leviathan-purple);
    font-weight: 700;
}

.roll-range {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(42, 157, 143, 0.2);
    border-radius: 8px;
    font-weight: 700;
    color: var(--tidal-gold);
    margin: 0 5px;
}

.reward-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 3px solid var(--tidal-gold);
    transition: all 0.3s ease;
}

.reward-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.ability-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--tidal-gold);
    font-size: 1.1rem;
}

.ability-tier {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(42, 157, 143, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 8px;
}

.ability-scale {
    font-size: 0.9rem;
    color: var(--tidal-teal);
    font-style: italic;
}

.tier-header-box {
    background: linear-gradient(135deg, rgba(30, 77, 140, 0.3), rgba(90, 24, 154, 0.3));
    border: 2px solid var(--tidal-teal);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    text-align: center;
}

.boss-actions {
    background: rgba(229, 80, 57, 0.15);
    border: 2px solid var(--coral-red);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.shell-icon {
    display: inline-block;
    color: var(--tidal-gold);
    margin: 0 3px;
}

.shell-multiplier {
    font-weight: 700;
    color: var(--tidal-gold);
}

.rumor-range {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--tidal-gold);
    display: inline-block;
    min-width: 60px;
}

.rumor-text {
    color: var(--seafoam);
}

.faction-benefit {
    background: rgba(42, 157, 143, 0.1);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--tidal-teal);
    margin: 10px 0;
}

.faction-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--tidal-gold);
    font-size: 1.2rem;
}

/* Ensure proper z-index layering */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(30, 77, 140, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(168, 218, 220, 0.1) 0%, transparent 25%);
    z-index: -1;
    pointer-events: none;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .logistics-title,
    .market-title,
    .tidal-title {
        font-size: 1.5rem;
    }

    .dice-comparison {
        flex-direction: column;
    }

    .tidal-guard {
        flex-direction: column;
    }

    .master-container {
        padding: 10px;
    }
}
