
:root {
    --primary-color: #2c3e50;
    --secondary-color: #8b4513;
    --accent-color: #d4af37;
    --background: #f8f5f0;
    --card-background: #ffffff;
    --text-color: #2c2c2c;
    --border-color: #d4c5a9;
    --code-background: #f4f1ea;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Dark mode colors */
[data-theme="dark"] {
    --primary-color: #4a90e2;
    --secondary-color: #c0a062;
    --accent-color: #f4e4c1;
    --background: #1a1a1a;
    --card-background: #2d2d2d;
    --text-color: #e8e8e8;
    --border-color: #555;
    --code-background: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.5);
}

/* Dark mode - ensure all text is readable */
[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] span,
[data-theme="dark"] em,
[data-theme="dark"] i {
    color: #e8e8e8;
}

[data-theme="dark"] h1 {
    color: #f4a460;
}

[data-theme="dark"] h2 {
    color: #daa520;
}

[data-theme="dark"] h3 {
    color: #f4c590;
}

[data-theme="dark"] h4 {
    color: #e9967a;
}

[data-theme="dark"] h5 {
    color: #d2b48c;
}

[data-theme="dark"] h6 {
    color: #c9a87c;
}

[data-theme="dark"] strong {
    color: #f4e4c1;
}

[data-theme="dark"] th {
    background: #8b7355;
    color: #ffffff;
}

[data-theme="dark"] header {
    background: linear-gradient(135deg, #1a2332, #2c3e50);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', 'Georgia', serif;
    background: var(--background);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 17px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 6px var(--shadow);
    position: relative;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.site-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #f4e4c1, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.4));
}

/* Fallback for browsers that don't support background-clip */
@supports not (background-clip: text) {
    .site-title {
        color: #f4e4c1;
        -webkit-text-fill-color: inherit;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
}

.site-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-style: italic;
}

nav {
    background: var(--secondary-color);
    box-shadow: 0 2px 4px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    padding: 1rem 2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.nav-link.active {
    background: var(--accent-color);
    color: var(--primary-color);
}

main {
    max-width: 1400px;
    margin: 1rem auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.content-area {
    flex: 1;
    background: var(--card-background);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    border: 2px solid var(--border-color);
    max-width: 1000px;
}

.sidebar-toc {
    width: 280px;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: var(--card-background);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    border: 2px solid var(--border-color);
}

.sidebar-toc h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.3rem;
}

.sidebar-toc ul {
    list-style: none;
}

.sidebar-toc li {
    margin: 0.3rem 0;
}

.sidebar-toc a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 0.2rem 0;
    font-size: 0.95rem;
}

.sidebar-toc a:hover {
    color: var(--secondary-color);
    padding-left: 0.5rem;
}

h1 {
    font-size: 2.4rem;
    color: #8b4513;
    margin: 1.25rem 0 0.5rem;
    border-bottom: 4px solid var(--accent-color);
    padding-bottom: 0.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

h2 {
    font-size: 1.8rem;
    color: #b8860b;
    margin: 1rem 0 0.5rem;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 0.3rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

h3 {
    font-size: 1.4rem;
    color: #cd853f;
    margin: 0.75rem 0 0.4rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 0.75rem;
    font-weight: 600;
}

/* Step headers in character creation only */
.page-character-creation h3[id*="step-"] {
    background: linear-gradient(135deg, var(--card-background), var(--background));
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border-left: 6px solid var(--accent-color);
    margin-top: 1rem;
    box-shadow: 0 2px 4px var(--shadow);
}

h4 {
    font-size: 1.15rem;
    color: #d2691e;
    margin: 0.6rem 0 0.3rem;
    font-weight: 600;
    padding-left: 0.5rem;
}

h5 {
    font-size: 1rem;
    color: #a0522d;
    margin: 0.5rem 0 0.25rem;
    font-weight: 600;
    font-style: italic;
}

h6 {
    font-size: 0.9rem;
    color: #8b7355;
    margin: 0.5rem 0 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p {
    margin: 0.4rem 0;
    max-width: 80ch;
}

ul, ol {
    margin: 0.4rem 0 0.4rem 1.5rem;
    max-width: 75ch;
}

li {
    margin: 0.1rem 0;
    line-height: 1.4;
}

/* Add breathing room for list items with strong tags */
li strong {
    color: var(--secondary-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    background: var(--card-background);
    box-shadow: 0 2px 8px var(--shadow);
}

th {
    background: var(--secondary-color);
    color: white;
    padding: 0.35rem 0.5rem;
    text-align: left;
    font-weight: bold;
    border: 1px solid var(--border-color);
}

td {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--card-background);
}

tr:nth-child(even) td {
    background: var(--code-background);
}

tr:nth-child(odd) td {
    background: var(--card-background);
}

code {
    background: var(--code-background);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
}

hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 0.5rem 0;
}

@media (max-width: 1024px) {
    .sidebar-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .nav-content {
        flex-direction: column;
    }

    .content-area {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* Anchor offset for sticky nav */
h2[id], h3[id] {
    scroll-margin-top: 80px;
}

/* Collapsible TOC sections */
.toc-section {
    margin: 0.25rem 0;
}

.toc-section-header {
    cursor: pointer;
    padding: 0.3rem 0;
    font-weight: bold;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.toc-section-header:hover {
    color: var(--secondary-color);
}

.toc-toggle {
    font-size: 0.8em;
    transition: transform 0.2s;
}

.toc-section.collapsed .toc-toggle {
    transform: rotate(-90deg);
}

.toc-section-content {
    max-height: 3000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 0.75rem;
}

.toc-section.collapsed .toc-section-content {
    max-height: 0;
}

/* Nested subsections (for collapsible sections within sections) */
.toc-subsection {
    margin: 0.2rem 0;
}

.toc-subsection-header {
    cursor: pointer;
    padding: 0.25rem 0;
    font-weight: normal;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0;
}

.toc-category-name {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.toc-subsection-header:hover {
    color: var(--secondary-color);
}

.toc-subsection.collapsed .toc-toggle {
    transform: rotate(-90deg);
}

.toc-subsection-content {
    max-height: 3000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 0.5rem;
}

.toc-subsection.collapsed .toc-subsection-content {
    max-height: 0;
}

/* Bold styling for major TOC sections without subsections */
.sidebar-toc .toc-major-link > a {
    font-weight: bold;
}


/* Highlight key game terms */
strong {
    color: var(--secondary-color);
    font-weight: 600;
}

em {
    color: #555;
    font-style: italic;
}

/* Better blockquote styling for flavor text */
blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 4px;
}

/* Add visual breaks between major sections */
h2 + p:first-of-type {
    margin-top: 1rem;
}


/* Better table styling for ability tables */
table {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 6px;
    overflow: hidden;
}

tr:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    transition: background 0.2s ease;
}

/* Special styling for KING text */
.king-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: bold;
    font-size: 1.1em;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, #c0a062, #8b7355);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    display: inline-block;
}

/* Fallback for browsers that don't support background-clip */
@supports not (background-clip: text) {
    .king-text {
        color: #c0a062;
        -webkit-text-fill-color: inherit;
    }
}

/* Stat color coding - each stat gets a unique color for easy recognition */
/* Mature, muted color palette */
.stat-body {
    color: #8B4513;
    font-weight: 600;
}

.stat-mind {
    color: #4A5568;
    font-weight: 600;
}

.stat-spirit {
    color: #D97706;
    font-weight: 600;
}

.stat-heart {
    color: #9B2C2C;
    font-weight: 600;
}

.stat-cunning {
    color: #2F855A;
    font-weight: 600;
}

.stat-fate {
    color: #7C3AED;
    font-weight: 600;
}

.stat-sense {
    color: #0891B2;
    font-weight: 600;
}

.stat-vitality {
    color: #276749;
    font-weight: 600;
}

.stat-stamina {
    color: #744210;
    font-weight: 600;
}

/* Dark mode stat colors - brighter versions */
[data-theme="dark"] .stat-body {
    color: #D2691E;
}

[data-theme="dark"] .stat-mind {
    color: #A0AEC0;
}

[data-theme="dark"] .stat-spirit {
    color: #F59E0B;
}

[data-theme="dark"] .stat-heart {
    color: #F87171;
}

[data-theme="dark"] .stat-cunning {
    color: #34D399;
}

[data-theme="dark"] .stat-fate {
    color: #A78BFA;
}

[data-theme="dark"] .stat-sense {
    color: #22D3EE;
}

[data-theme="dark"] .stat-vitality {
    color: #10B981;
}

[data-theme="dark"] .stat-stamina {
    color: #D97706;
}

/* Prophet special terms */
.prophet-miracle {
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 0 2px rgba(255, 215, 0, 0.3);
}

.prophet-burden {
    color: #8B4789;
    font-weight: 600;
    font-style: italic;
}

.prophet-faith {
    color: #4169E1;
    font-weight: 700;
}

/* Dark mode Prophet terms - brighter/glowing versions */
[data-theme="dark"] .prophet-miracle {
    color: #FFE55C;
    text-shadow: 0 0 4px rgba(255, 229, 92, 0.5);
}

[data-theme="dark"] .prophet-burden {
    color: #B565D8;
}

[data-theme="dark"] .prophet-faith {
    color: #6495ED;
}

/* Druid-specific keywords (only in Druid section) */
.druid-attunement {
    color: #2E7D32;
    font-weight: 600;
    font-variant: small-caps;
}

.druid-aspect {
    color: #1976D2;
    font-weight: 600;
    font-variant: small-caps;
}

.druid-stone {
    color: #795548;
    font-weight: 600;
}

.druid-flame {
    color: #D84315;
    font-weight: 600;
}

.druid-tide {
    color: #0277BD;
    font-weight: 600;
}

.druid-wind {
    color: #78909C;
    font-weight: 600;
}

.druid-root {
    color: #558B2F;
    font-weight: 600;
}

.druid-beast {
    color: #6D4C41;
    font-weight: 600;
}

.druid-star {
    color: #5E35B1;
    font-weight: 600;
}

/* Dark mode Druid terms - brighter versions */
[data-theme="dark"] .druid-attunement {
    color: #66BB6A;
}

[data-theme="dark"] .druid-aspect {
    color: #42A5F5;
}

[data-theme="dark"] .druid-stone {
    color: #A1887F;
}

[data-theme="dark"] .druid-flame {
    color: #FF7043;
}

[data-theme="dark"] .druid-tide {
    color: #29B6F6;
}

[data-theme="dark"] .druid-wind {
    color: #90A4AE;
}

[data-theme="dark"] .druid-root {
    color: #9CCC65;
}

[data-theme="dark"] .druid-beast {
    color: #A1887F;
}

[data-theme="dark"] .druid-star {
    color: #9575CD;
}

/* Ability Type Keywords - Combat tree action types */
.ability-action {
    color: #C62828;
    font-weight: 700;
}

.ability-free-action {
    color: #2E7D32;
    font-weight: 700;
}

.ability-maneuver {
    color: #1565C0;
    font-weight: 700;
}

.ability-reaction {
    color: #6A1B9A;
    font-weight: 700;
}

.ability-passive {
    color: #37474F;
    font-weight: 600;
}

.ability-triggered {
    color: #E65100;
    font-weight: 600;
}

.ability-declaration {
    color: #00838F;
    font-weight: 600;
    font-style: italic;
}

.ability-ultimate {
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 0 2px rgba(255, 215, 0, 0.5);
}

/* Dark mode ability type colors */
[data-theme="dark"] .ability-action {
    color: #EF5350;
}

[data-theme="dark"] .ability-free-action {
    color: #66BB6A;
}

[data-theme="dark"] .ability-maneuver {
    color: #42A5F5;
}

[data-theme="dark"] .ability-reaction {
    color: #AB47BC;
}

[data-theme="dark"] .ability-passive {
    color: #90A4AE;
}

[data-theme="dark"] .ability-triggered {
    color: #FF9800;
}

[data-theme="dark"] .ability-declaration {
    color: #26C6DA;
}

[data-theme="dark"] .ability-ultimate {
    color: #FFE082;
    text-shadow: 0 0 4px rgba(255, 224, 130, 0.6);
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow);
    font-weight: 600;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--shadow);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    background: var(--accent-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow);
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* Quick Reference Modal */
.quick-ref-button {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 9999;
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow);
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-ref-button:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px var(--shadow);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-color);
}

/* Breadcrumb Navigation */
.breadcrumb {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

[data-theme="dark"] .breadcrumb {
    color: #999;
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

/* Stat Array Cards */
.stat-array-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-array-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-array-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px var(--shadow);
    border-color: var(--accent-color);
}

.stat-array-card h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.stat-array-values {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.stat-array-description {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

[data-theme="dark"] .stat-array-description {
    color: #aaa;
}

/* Example Character Callout Boxes */
.example-box {
    background: linear-gradient(135deg, #f0f7ff, #e6f2ff);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .example-box {
    background: linear-gradient(135deg, #2a3a4a, #3a4a5a);
}

.example-box h4 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.example-box-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Collapsible How-To-Read sections */
.how-to-read {
    background: #fffbf0;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

[data-theme="dark"] .how-to-read {
    background: #3a3020;
}

.how-to-read-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.how-to-read-header h3 {
    margin: 0;
    color: var(--accent-color);
}

.how-to-read.collapsed .how-to-read-content {
    display: none;
}

.how-to-read-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.how-to-read.collapsed .how-to-read-toggle {
    transform: rotate(-90deg);
}

/* Color-coded TOC sections */
.toc-category-steps .toc-section-header a {
    color: #2F855A;
}

.toc-category-paths .toc-section-header a {
    color: #9B2C2C;
}

.toc-category-alignments .toc-section-header a {
    color: #2C5282;
}

.toc-category-races .toc-section-header a {
    color: #8B4513;
}

/* Skill Tree Advancement Cards */
.advancement {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--secondary-color);
    border-radius: 6px;
    padding: 1.2rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px var(--shadow);
    transition: all 0.3s ease;
}

.advancement:hover {
    box-shadow: 0 4px 8px var(--shadow);
    transform: translateY(-2px);
    border-left-color: var(--accent-color);
}

.advancement p:first-child {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

[data-theme="dark"] .advancement p:first-child {
    color: var(--accent-color);
}

.advancement em {
    display: block;
    font-style: italic;
    margin: 0.5rem 0;
    opacity: 0.85;
    font-size: 0.95rem;
}

.advancement p strong:first-child {
    color: var(--primary-color);
}

[data-theme="dark"] .advancement p strong:first-child {
    color: var(--secondary-color);
}

.advancement p {
    margin: 0.6rem 0;
    line-height: 1.6;
}

.advancement p:last-child {
    margin-bottom: 0;
}

/* Style Core and Advantage labels differently */
.advancement p:has(> strong:first-child:contains("Core")) {
    margin-top: 0.8rem;
}

.advancement p:has(> strong:first-child:contains("Prerequisite")) {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--border-color);
    font-style: italic;
}

/* Martial Tree Tier Cards */
.tier-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-left: 5px solid #8b4513;
    border-radius: 6px;
    padding: 1.2rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 6px var(--shadow);
    transition: all 0.3s ease;
}

.tier-card:hover {
    box-shadow: 0 4px 10px var(--shadow);
    transform: translateY(-2px);
    border-left-color: var(--accent-color);
}

.tier-card > p:first-child {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: bold;
}

[data-theme="dark"] .tier-card > p:first-child {
    color: var(--accent-color);
}

.tier-card ul {
    margin-left: 1.5rem;
}

.tier-card ul li {
    margin: 0.5rem 0;
}

/* Throne Ability Cards - Base */
.throne-ability-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px var(--shadow);
    transition: all 0.3s ease;
}

.throne-ability-card:hover {
    box-shadow: 0 4px 8px var(--shadow);
    transform: translateX(4px);
}

.throne-ability-card p {
    margin: 0.6rem 0;
    line-height: 1.7;
}

/* Throne Cards by Stat - Body (Red/Crimson) */
.throne-body {
    border-left: 4px solid #b91c1c;
}

.throne-body:hover {
    border-left-color: #dc2626;
}

.throne-body h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #991b1b;
}

[data-theme="dark"] .throne-body h3 {
    color: #f87171;
}

/* Throne Cards by Stat - Mind (Blue) */
.throne-mind {
    border-left: 4px solid #1e40af;
}

.throne-mind:hover {
    border-left-color: #2563eb;
}

.throne-mind h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #1e3a8a;
}

[data-theme="dark"] .throne-mind h3 {
    color: #60a5fa;
}

/* Throne Cards by Stat - Sense (Cyan/Teal) */
.throne-sense {
    border-left: 4px solid #0e7490;
}

.throne-sense:hover {
    border-left-color: #06b6d4;
}

.throne-sense h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #0891b2;
}

[data-theme="dark"] .throne-sense h3 {
    color: #22d3ee;
}

/* Throne Cards by Stat - Heart (Pink/Rose) */
.throne-heart {
    border-left: 4px solid #be123c;
}

.throne-heart:hover {
    border-left-color: #e11d48;
}

.throne-heart h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #9f1239;
}

[data-theme="dark"] .throne-heart h3 {
    color: #fb7185;
}

/* Throne Cards by Stat - Cunning (Purple) */
.throne-cunning {
    border-left: 4px solid #7c3aed;
}

.throne-cunning:hover {
    border-left-color: #8b5cf6;
}

.throne-cunning h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #6d28d9;
}

[data-theme="dark"] .throne-cunning h3 {
    color: #a78bfa;
}

/* Throne Cards by Stat - Fate (Gold/Amber) */
.throne-fate {
    border-left: 4px solid #d97706;
}

.throne-fate:hover {
    border-left-color: #f59e0b;
}

.throne-fate h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #b45309;
}

[data-theme="dark"] .throne-fate h3 {
    color: #fbbf24;
}

/* Mystic Ability Cards */
.mystic-ability-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.2rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 5px var(--shadow);
    transition: all 0.3s ease;
}

.mystic-ability-card:hover {
    box-shadow: 0 4px 10px var(--shadow);
    transform: translateY(-2px);
}

.mystic-ability-card em {
    display: block;
    margin: 0.5rem 0;
    opacity: 0.9;
    font-style: italic;
}

/* Mystic Ability Cards - Stat-based colors */
.mystic-body {
    border-left: 4px solid #b91c1c;
}

.mystic-body:hover {
    border-left-color: #dc2626;
}

.mystic-body h3,
.mystic-body h4,
.mystic-body h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #b91c1c;
}

[data-theme="dark"] .mystic-body h3,
[data-theme="dark"] .mystic-body h4,
[data-theme="dark"] .mystic-body h2 {
    color: #f87171;
}

.mystic-mind {
    border-left: 4px solid #1e40af;
}

.mystic-mind:hover {
    border-left-color: #2563eb;
}

.mystic-mind h3,
.mystic-mind h4,
.mystic-mind h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #1e40af;
}

[data-theme="dark"] .mystic-mind h3,
[data-theme="dark"] .mystic-mind h4,
[data-theme="dark"] .mystic-mind h2 {
    color: #60a5fa;
}

.mystic-sense {
    border-left: 4px solid #0e7490;
}

.mystic-sense:hover {
    border-left-color: #0891b2;
}

.mystic-sense h3,
.mystic-sense h4,
.mystic-sense h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #0e7490;
}

[data-theme="dark"] .mystic-sense h3,
[data-theme="dark"] .mystic-sense h4,
[data-theme="dark"] .mystic-sense h2 {
    color: #22d3ee;
}

.mystic-heart {
    border-left: 4px solid #be123c;
}

.mystic-heart:hover {
    border-left-color: #e11d48;
}

.mystic-heart h3,
.mystic-heart h4,
.mystic-heart h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #be123c;
}

[data-theme="dark"] .mystic-heart h3,
[data-theme="dark"] .mystic-heart h4,
[data-theme="dark"] .mystic-heart h2 {
    color: #fb7185;
}

.mystic-cunning {
    border-left: 4px solid #7c3aed;
}

.mystic-cunning:hover {
    border-left-color: #8b5cf6;
}

.mystic-cunning h3,
.mystic-cunning h4,
.mystic-cunning h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: #7c3aed;
}

[data-theme="dark"] .mystic-cunning h3,
[data-theme="dark"] .mystic-cunning h4,
[data-theme="dark"] .mystic-cunning h2 {
    color: #a78bfa;
}

/* Spell/Miracle Cards - Base */
.spell-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px var(--shadow);
    transition: all 0.3s ease;
}

.spell-card:hover {
    box-shadow: 0 4px 8px var(--shadow);
}

.spell-card > p:first-child {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.spell-card p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.spell-card p:nth-child(2) {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

/* Arcane Spells (Blue) */
.spell-arcane {
    border-left: 4px solid #2563eb;
}

.spell-arcane:hover {
    border-left-color: #3b82f6;
}

.spell-arcane > p:first-child {
    color: #1e40af;
}

[data-theme="dark"] .spell-arcane > p:first-child {
    color: #60a5fa;
}

/* Primal Spell Aspects */
/* Stone (Gray) */
.spell-stone {
    border-left: 4px solid #6b7280;
}

.spell-stone:hover {
    border-left-color: #9ca3af;
}

.spell-stone > p:first-child {
    color: #4b5563;
}

[data-theme="dark"] .spell-stone > p:first-child {
    color: #d1d5db;
}

/* Flame (Orange/Red) */
.spell-flame {
    border-left: 4px solid #dc2626;
}

.spell-flame:hover {
    border-left-color: #ef4444;
}

.spell-flame > p:first-child {
    color: #b91c1c;
}

[data-theme="dark"] .spell-flame > p:first-child {
    color: #f87171;
}

/* Tide (Cyan/Water) */
.spell-tide {
    border-left: 4px solid #0891b2;
}

.spell-tide:hover {
    border-left-color: #06b6d4;
}

.spell-tide > p:first-child {
    color: #0e7490;
}

[data-theme="dark"] .spell-tide > p:first-child {
    color: #22d3ee;
}

/* Wind (Light Gray/White) */
.spell-wind {
    border-left: 4px solid #94a3b8;
}

.spell-wind:hover {
    border-left-color: #cbd5e1;
}

.spell-wind > p:first-child {
    color: #64748b;
}

[data-theme="dark"] .spell-wind > p:first-child {
    color: #e2e8f0;
}

/* Root (Green) */
.spell-root {
    border-left: 4px solid #16a34a;
}

.spell-root:hover {
    border-left-color: #22c55e;
}

.spell-root > p:first-child {
    color: #15803d;
}

[data-theme="dark"] .spell-root > p:first-child {
    color: #4ade80;
}

/* Beast (Brown) */
.spell-beast {
    border-left: 4px solid #92400e;
}

.spell-beast:hover {
    border-left-color: #b45309;
}

.spell-beast > p:first-child {
    color: #78350f;
}

[data-theme="dark"] .spell-beast > p:first-child {
    color: #fdba74;
}

/* Star (Purple/Violet) */
.spell-star {
    border-left: 4px solid #7c3aed;
}

.spell-star:hover {
    border-left-color: #8b5cf6;
}

.spell-star > p:first-child {
    color: #6d28d9;
}

[data-theme="dark"] .spell-star > p:first-child {
    color: #a78bfa;
}

/* Jutsu Cards (Martial Artist) */
.jutsu-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 3px 6px var(--shadow);
    transition: all 0.3s ease;
}

.jutsu-card:hover {
    box-shadow: 0 5px 12px var(--shadow);
    transform: translateY(-3px);
}

.jutsu-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Psionic Discipline Cards */
.psionic-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 3px 6px var(--shadow);
    transition: all 0.3s ease;
}

.psionic-card:hover {
    box-shadow: 0 5px 12px var(--shadow);
    transform: translateY(-3px);
}

.psionic-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Prayer Cards (Prophet) */
.prayer-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 3px 6px var(--shadow);
    transition: all 0.3s ease;
}

.prayer-card:hover {
    box-shadow: 0 5px 12px var(--shadow);
    transform: translateY(-3px);
}

.prayer-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Litany Cards (Prophet) */
.litany-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.2rem;
    margin: 1rem 0;
    box-shadow: 0 2px 5px var(--shadow);
    transition: all 0.3s ease;
}

.litany-card:hover {
    box-shadow: 0 4px 10px var(--shadow);
    transform: translateY(-2px);
}

.litany-card h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Ultimate Choice Cards */
.ultimate-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.2rem;
    margin: 1rem 0;
    box-shadow: 0 2px 5px var(--shadow);
    transition: all 0.3s ease;
}

.ultimate-card:hover {
    box-shadow: 0 4px 10px var(--shadow);
    transform: translateY(-2px);
}

.ultimate-card h5 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.15rem;
    font-weight: 700;
}

/* Psionic Discipline Tier Cards */
.discipline-tier-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.2rem;
    margin: 1rem 0;
    box-shadow: 0 2px 5px var(--shadow);
    transition: all 0.3s ease;
}

.discipline-tier-card:hover {
    box-shadow: 0 4px 10px var(--shadow);
    transform: translateY(-2px);
}

.discipline-tier-card p:first-of-type {
    font-weight: 600;
    margin-top: 0;
}
