/* ==========================================================================
   三光連環の儀 対立 - Universal Styling
   Enhanced with Thunder Storm Campaign design principles
   ========================================================================== */

/* ==== Reset & Base ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

:root {
    /* Faction Color Themes - Triple Light Enhanced */
    --auric-primary: #FFD700;
    --auric-secondary: #B8860B;
    --auric-bg: rgba(255, 215, 0, 0.1);
    --auric-gradient: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(184, 134, 11, 0.2) 100%);

    --veilbreak-primary: #8A2BE2;
    --veilbreak-secondary: #4B0082;
    --veilbreak-bg: rgba(138, 43, 226, 0.1);
    --veilbreak-gradient: linear-gradient(135deg, rgba(138, 43, 226, 0.3) 0%, rgba(75, 0, 130, 0.2) 100%);

    --neutral-primary: #696969;
    --neutral-secondary: #2F2F2F;

    /* Background Colors - Enhanced Gradients */
    --bg-primary: #1A1A1A;
    --bg-secondary: #2D2D2D;
    --bg-tertiary: #404040;
    --bg-gradient: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);

    /* Text Colors */
    --text-primary: #F5F5F5;
    --text-secondary: #E0E0E0;
    --text-muted: #B0B0B0;

    /* Layout */
    --max-width: 1200px;
    --container-padding: 1.5rem;

    /* Spacing */
    --padding-large: 2rem;
    --padding-medium: 1.25rem;
    --padding-small: 0.75rem;

    /* Border radius */
    --border-radius: 12px;
    --border-radius-small: 6px;

    /* Shadows - Enhanced */
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.4);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==== Typography ==== */
body {
    font-family: 'Noto Serif JP', '游明朝', 'Yu Mincho', serif;
    background: var(--bg-gradient);
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans JP', '游ゴシック', 'Yu Gothic', sans-serif;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* 統計データ用フォント */
.stats, .economy-data, .turn-stats, .ritual-progress {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* ==== Layout & Container ==== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ==== Header Navigation ==== */
.main-header {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--text-secondary);
    transition: all var(--transition-medium);
    font-weight: 500;
    font-size: 0.9rem;
}

.main-nav a:hover, .main-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* ==== Turn Selector ==== */
.turn-selector select {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==== Campaign Overview ==== */
.campaign-overview {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.campaign-overview h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--auric-primary), var(--veilbreak-primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.campaign-overview .subtitle, .campaign-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    max-width: 800px;
    margin: 0 auto;
}

/* ==== Cards ==== */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all var(--transition-medium);
}

.card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==== Faction Colors (Triple Light Linked Ring) ==== */
/* 🌟 Auric Covenant - オーリック契約団 */
.faction.auric, .auric {
    color: var(--auric-primary);
    border-color: var(--auric-secondary);
}

.faction-bg.auric {
    background: var(--auric-gradient);
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.faction-card.auric {
    background: var(--auric-gradient);
    border-left: 4px solid var(--auric-primary);
}

.faction-card.auric:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* ⚡ Veilbreak Sentinels - ヴェイルブレイク監視団 */
.faction.veilbreak, .veilbreak {
    color: var(--veilbreak-primary);
    border-color: var(--veilbreak-secondary);
}

.faction-bg.veilbreak {
    background: var(--veilbreak-gradient);
    border: 2px solid rgba(138, 43, 226, 0.5);
}

.faction-card.veilbreak {
    background: var(--veilbreak-gradient);
    border-left: 4px solid var(--veilbreak-primary);
}

.faction-card.veilbreak:hover {
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

/* ==== Faction Cards Grid ==== */
.faction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.faction-card {
    padding: 1.25rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
}

.faction-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.faction-icon {
    font-size: 3rem;
    margin-right: 1rem;
}

.faction-info h4 {
    font-size: 1.4rem;
    margin: 0 0 0.25rem 0;
}

.faction-info h5 {
    font-size: 1rem;
    opacity: 0.8;
    margin: 0 0 0.5rem 0;
}

/* ==== Ritual Progress Indicator (Triple Light Special) ==== */
.ritual-progress {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--border-radius);
    padding: var(--padding-medium);
    margin: var(--padding-medium) 0;
    backdrop-filter: blur(10px);
}

.ritual-progress h4 {
    color: var(--auric-primary);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.3rem;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 0.5rem;
}

.progress-ring {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 100%;
    width: 2rem;
    height: 2px;
    background: rgba(255, 215, 0, 0.3);
    z-index: 1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.completed::after {
    background: var(--auric-primary);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.progress-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-medium);
    z-index: 2;
    position: relative;
}

.progress-step.completed .progress-circle {
    background: var(--auric-primary);
    border-color: var(--auric-primary);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    color: var(--bg-primary);
}

.progress-step.current .progress-circle {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--auric-primary);
    animation: ritual-pulse 2s infinite;
}

.progress-label {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-muted);
    max-width: 80px;
}

.progress-step.completed .progress-label {
    color: var(--auric-primary);
    font-weight: 600;
}

@keyframes ritual-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
        transform: scale(1.05);
    }
}

/* ==== Turn Sections ==== */
.turn-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--padding-medium);
    margin: var(--padding-medium) 0;
    backdrop-filter: blur(10px);
    transition: all var(--transition-medium);
}

.turn-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.turn-content {
    line-height: 1.6;
}

.turn-content h4 {
    color: var(--auric-primary);
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.turn-section:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-medium);
}

/* Interactive Elements */
.character {
    color: var(--auric-primary);
    cursor: pointer;
    border-bottom: 1px dotted var(--auric-secondary);
    transition: all var(--transition-fast);
}

.character:hover {
    color: var(--auric-secondary);
    background-color: var(--auric-bg);
    padding: 2px 4px;
    border-radius: var(--border-radius-small);
}

.character[data-faction="veilbreak"] {
    color: var(--veilbreak-primary);
    border-bottom-color: var(--veilbreak-secondary);
}

.character[data-faction="veilbreak"]:hover {
    color: var(--veilbreak-secondary);
    background-color: var(--veilbreak-bg);
}

.location {
    color: var(--neutral-primary);
    cursor: pointer;
    border-bottom: 1px dotted var(--neutral-secondary);
    transition: all var(--transition-fast);
}

.location:hover {
    color: var(--text-primary);
    background-color: rgba(105, 105, 105, 0.2);
    padding: 2px 4px;
    border-radius: var(--border-radius-small);
}

.resource {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    border: 1px solid var(--neutral-secondary);
}

.spell, .tactic {
    background-color: var(--veilbreak-bg);
    color: var(--veilbreak-primary);
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    border: 1px solid var(--veilbreak-secondary);
}

/* Turn Sections */
.turn-section {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: var(--padding-large);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.turn-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    padding: var(--padding-large);
    border-bottom: 1px solid var(--neutral-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--padding-medium);
}

.turn-header h2 {
    margin: 0;
    color: var(--auric-primary);
}

.turn-nav {
    display: flex;
    gap: var(--padding-small);
}

.turn-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--padding-small) var(--padding-medium);
    border: 1px solid var(--neutral-secondary);
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.turn-nav a:hover {
    background-color: var(--auric-primary);
    color: var(--bg-primary);
    border-color: var(--auric-primary);
}

.turn-content {
    padding: var(--padding-large);
}

/* Dialogue Blocks */
.dialogue-block {
    background-color: var(--bg-tertiary);
    border-left: 4px solid var(--neutral-primary);
    padding: var(--padding-medium);
    margin: var(--padding-medium) 0;
    border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0;
}

.dialogue-block.auric {
    border-left-color: var(--auric-primary);
    background: linear-gradient(135deg, var(--auric-bg) 0%, var(--bg-tertiary) 100%);
}

.dialogue-block.veilbreak {
    border-left-color: var(--veilbreak-primary);
    background: linear-gradient(135deg, var(--veilbreak-bg) 0%, var(--bg-tertiary) 100%);
}

.dialogue {
    font-style: italic;
    color: var(--text-secondary);
    display: block;
    margin-top: var(--padding-small);
    padding-left: var(--padding-medium);
    border-left: 2px solid var(--neutral-secondary);
}

/* Progress and Statistics */
.ritual-progress {
    background-color: var(--bg-tertiary);
    padding: var(--padding-medium);
    border-radius: var(--border-radius);
    margin: var(--padding-medium) 0;
}

.progress-bar {
    background-color: var(--bg-primary);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: var(--padding-small);
}

.progress-fill {
    background: linear-gradient(90deg, var(--auric-primary) 0%, var(--auric-secondary) 100%);
    height: 100%;
    transition: width var(--transition-medium);
}

.morale-change {
    background-color: var(--bg-tertiary);
    padding: var(--padding-medium);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--auric-primary);
    margin: var(--padding-medium) 0;
    font-family: 'Consolas', monospace;
}

/* Tables */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin: var(--padding-medium) 0;
}

.stats-table th {
    background-color: var(--bg-primary);
    color: var(--auric-primary);
    padding: var(--padding-medium);
    text-align: left;
    font-weight: bold;
}

.stats-table td {
    padding: var(--padding-small) var(--padding-medium);
    border-bottom: 1px solid var(--neutral-secondary);
}

.stats-table tr:hover {
    background-color: var(--bg-secondary);
}

/* Event Grids */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--padding-medium);
    margin: var(--padding-medium) 0;
}

.event-section {
    background-color: var(--bg-tertiary);
    padding: var(--padding-medium);
    border-radius: var(--border-radius);
    border: 1px solid var(--neutral-secondary);
}

.event-section h4 {
    color: var(--auric-primary);
    margin-bottom: var(--padding-small);
}

/* Timeline */
.event-timeline {
    position: relative;
    padding-left: var(--padding-large);
}

.event-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--auric-primary) 0%, var(--veilbreak-primary) 100%);
}

.event-item {
    position: relative;
    margin-bottom: var(--padding-large);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: var(--padding-medium);
    margin-left: var(--padding-large);
    box-shadow: var(--shadow-light);
}

.event-item::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--auric-primary);
    border: 3px solid var(--bg-primary);
}

.event-turn {
    background-color: var(--auric-primary);
    color: var(--bg-primary);
    padding: 2px 8px;
    border-radius: var(--border-radius-small);
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: var(--padding-small);
}

/* World Map */
.interactive-map {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: var(--padding-medium);
    margin: var(--padding-medium) 0;
    overflow: auto;
}

.region {
    cursor: pointer;
    transition: all var(--transition-medium);
    opacity: 0.8;
}


.region text {
    pointer-events: none;
}

/* Region Cards */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--padding-medium);
    margin: var(--padding-medium) 0;
}

.region-card {
    background-color: var(--bg-secondary);
    border: 2px solid var(--neutral-secondary);
    border-radius: var(--border-radius);
    padding: var(--padding-medium);
    transition: all var(--transition-medium);
}

.region-card.auric {
    border-color: var(--auric-secondary);
}

.region-card.veilbreak {
    border-color: var(--veilbreak-secondary);
}

.region-card.allied {
    border-color: var(--auric-primary);
    background: linear-gradient(135deg, var(--auric-bg) 0%, var(--bg-secondary) 100%);
}

.region-card.contested {
    border-color: var(--neutral-primary);
    background: linear-gradient(135deg, rgba(105, 105, 105, 0.1) 0%, var(--bg-secondary) 100%);
}

.region-type {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--border-radius-small);
    font-size: 0.8rem;
}

/* Dashboard */
.dashboard {
    max-width: var(--max-width);
    margin: 0 auto;
}

.campaign-overview {
    text-align: center;
    margin-bottom: var(--padding-large);
    padding: var(--padding-large);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--border-radius);
}

.campaign-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: var(--padding-large);
}

.campaign-summary {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faction-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--padding-large);
    margin: var(--padding-large) 0;
}

.content-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--padding-medium);
    margin: var(--padding-medium) 0;
}

.content-card {
    background-color: var(--bg-secondary);
    border: 2px solid var(--neutral-secondary);
    border-radius: var(--border-radius);
    padding: var(--padding-large);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-medium);
    display: block;
}

.content-card:hover {
    border-color: var(--auric-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.card-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: var(--padding-medium);
}

.content-card h3 {
    color: var(--auric-primary);
    text-align: center;
    margin-bottom: var(--padding-small);
}

.content-card p {
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--padding-medium);
    margin: var(--padding-medium) 0;
}

.stat-card {
    background-color: var(--bg-secondary);
    border: 2px solid var(--neutral-secondary);
    border-radius: var(--border-radius);
    padding: var(--padding-medium);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--auric-primary);
    font-family: 'Consolas', monospace;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Charts */
.chart-container {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: var(--padding-medium);
    margin: var(--padding-medium) 0;
    text-align: center;
}

.chart-legend {
    margin-top: var(--padding-medium);
    display: flex;
    justify-content: center;
    gap: var(--padding-large);
}

.legend-item {
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

.legend-item.auric {
    color: var(--auric-primary);
}

.legend-item.veilbreak {
    color: var(--veilbreak-primary);
}

/* Awards and Analysis */
.award-grid, .analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--padding-medium);
    margin: var(--padding-medium) 0;
}

.award-item, .analysis-item {
    background-color: var(--bg-secondary);
    border: 2px solid var(--neutral-secondary);
    border-radius: var(--border-radius);
    padding: var(--padding-medium);
    text-align: center;
}

.award-item.auric {
    border-color: var(--auric-secondary);
}

.award-item.veilbreak {
    border-color: var(--veilbreak-secondary);
}

.award-icon {
    font-size: 2rem;
    margin-bottom: var(--padding-small);
}

.analysis-item.success {
    border-color: var(--auric-primary);
}

.analysis-item.effort {
    border-color: var(--veilbreak-primary);
}

.analysis-item.decisive {
    border-color: var(--neutral-primary);
}

/* ==== Campaign Stats ==== */
.campaign-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--auric-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==== Responsive Design ==== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .campaign-overview {
        margin: 1rem 0;
        padding: 1.25rem;
    }

    .campaign-overview h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

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

    .campaign-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .progress-ring {
        gap: 1rem;
    }

    .progress-step::after {
        width: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .card {
        padding: 1rem;
    }

    .campaign-overview h1 {
        font-size: 1.5rem;
    }

    .main-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .campaign-stats {
        grid-template-columns: 1fr;
    }

    .faction-header {
        flex-direction: column;
        text-align: center;
    }

    .faction-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .progress-ring {
        flex-direction: column;
        gap: 1rem;
    }

    .progress-step::after {
        display: none;
    }
}

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

.card {
    animation: fadeIn 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

/* ==== Footer ==== */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #A0A0A0;
    font-size: 0.9rem;
}

footer p {
    margin: 0;
}

/* ==== Print Styles ==== */
@media print {
    body {
        background: white;
        color: black;
    }

    .card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .main-nav, .tooltip {
        display: none;
    }

    .faction.auric {
        background: #f0f0f0;
        color: black;
    }

    .faction.veilbreak {
        background: #e0e0e0;
        color: black;
    }
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: var(--text-primary);
    padding: var(--padding-medium);
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    font-family: 'Noto Sans JP', sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    z-index: 1000;
    border: 1px solid var(--neutral-secondary);
    box-shadow: var(--shadow-medium);
    max-width: 450px;
    min-width: 250px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.4;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    z-index: 1001;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Faction-specific tooltip styling */
.character.tooltip:hover::after {
    border-left: 3px solid var(--auric-primary);
}

.character[data-faction="veilbreak"].tooltip:hover::after {
    border-left: 3px solid var(--veilbreak-primary);
}

.location.tooltip:hover::after {
    border-left: 3px solid var(--neutral-primary);
}

.resource.tooltip:hover::after {
    border-left: 3px solid var(--bg-tertiary);
}

.spell.tooltip:hover::after,
.tactic.tooltip:hover::after {
    border-left: 3px solid var(--veilbreak-primary);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }

    .tooltip::after,
    .tooltip::before {
        transition: none !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --auric-primary: #ffff00;
        --veilbreak-primary: #ff00ff;
        --text-primary: #ffffff;
        --bg-primary: #000000;
    }
}

/* ==== Ritual Phase Evolution ==== */
.phase-evolution {
    margin: var(--padding-large) 0;
}

.phase-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--padding-medium);
    margin-top: var(--padding-medium);
}

.phase {
    background: var(--bg-gradient);
    border: 1px solid var(--bg-tertiary);
    border-radius: 12px;
    padding: var(--padding-medium);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.phase:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.phase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--auric-gradient);
    border-radius: 12px 12px 0 0;
}

.ritual-phase-1::before {
    background: linear-gradient(90deg, #FFD700, #FFA500);
}

.ritual-phase-2::before {
    background: linear-gradient(90deg, #FF6347, #DC143C);
}

.ritual-phase-3::before {
    background: linear-gradient(90deg, #9370DB, #4169E1);
}

.phase h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.phase p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Ritual Progress Animation */
@keyframes ritualPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.ritual-phase-1 {
    animation: ritualPulse 3s ease-in-out infinite;
}

.ritual-phase-2 {
    animation: ritualPulse 3s ease-in-out infinite 1s;
}

.ritual-phase-3 {
    animation: ritualPulse 3s ease-in-out infinite 2s;
}

/* Ritual Progress Bar */
.ritual-progress {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: var(--padding-medium);
    margin: var(--padding-medium) 0;
    border: 1px solid var(--auric-primary);
}

.progress-bar {
    background: var(--bg-tertiary);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    background: var(--auric-gradient);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Turn Grid Navigation */
.turn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: var(--padding-medium);
}

.turn-nav-item {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    border: 1px solid var(--bg-tertiary);
    transition: all 0.3s ease;
}

.turn-nav-item:hover {
    background: var(--auric-bg);
    color: var(--auric-primary);
    border-color: var(--auric-primary);
    transform: translateY(-2px);
}

/* Alliance Events */
.alliance-event {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: var(--padding-medium);
    margin: var(--padding-medium) 0;
}

.alliance-event h4 {
    color: #22c55e;
    margin-bottom: 0.5rem;
}

/* Final Victory */
.final-victory {
    background: var(--auric-gradient);
    border-radius: 12px;
    padding: var(--padding-large);
    margin: var(--padding-large) 0;
    text-align: center;
}

.final-victory h4 {
    color: var(--bg-primary);
    font-size: 1.5rem;
    margin-bottom: var(--padding-medium);
}

.final-victory p {
    color: var(--bg-primary);
    font-weight: 600;
    margin: 0.5rem 0;
}

/* ==== Playlog Specific Styles ==== */
.faction-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--padding-large);
    margin-top: var(--padding-medium);
}

.faction-stat {
    background: var(--bg-gradient);
    border: 1px solid var(--bg-tertiary);
    border-radius: 12px;
    padding: var(--padding-large);
    backdrop-filter: blur(10px);
}

.faction-stat.auric {
    border-color: var(--auric-secondary);
}

.faction-stat.veilbreak {
    border-color: var(--veilbreak-secondary);
}

.faction-stat h4 {
    color: var(--text-primary);
    margin-bottom: var(--padding-medium);
    font-size: 1.2rem;
}

.faction-stat p {
    color: var(--text-secondary);
    margin-bottom: var(--padding-medium);
    line-height: 1.5;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--padding-medium) 0;
}

.stats-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--bg-tertiary);
    color: var(--text-secondary);
}

.stats-table td:first-child {
    color: var(--text-primary);
    font-weight: 600;
}

.chart-container {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: var(--padding-medium);
    margin: var(--padding-medium) 0;
}

.chart-legend {
    display: flex;
    gap: var(--padding-medium);
    justify-content: center;
    margin-top: var(--padding-medium);
}

.legend-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legend-item.auric {
    color: var(--auric-primary);
}

.legend-item.veilbreak {
    color: var(--veilbreak-primary);
}
/* ==== World Map Specific Styles ==== */
.world-map-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.world-map-svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.svg-region-detail {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 2rem;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--padding-medium);
    margin-top: var(--padding-medium);
}

.region-card {
    background: var(--bg-gradient);
    border: 1px solid var(--bg-tertiary);
    border-radius: 12px;
    padding: var(--padding-medium);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.region-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.region-card.auric {
    border-color: var(--auric-secondary);
}

.region-card.veilbreak {
    border-color: var(--veilbreak-secondary);
}

.region-card.neutral {
    border-color: var(--neutral-secondary);
}

.region-card.allied {
    border-color: var(--auric-primary);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, var(--bg-secondary) 100%);
}

.region-card.contested {
    border-color: var(--veilbreak-primary);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, var(--bg-secondary) 100%);
}

.region-header {
    margin-bottom: var(--padding-medium);
}

.region-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.region-type {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.region-info p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--padding-medium);
    margin-top: var(--padding-medium);
}

.strategy-card {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 8px;
    padding: var(--padding-medium);
}

.strategy-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--padding-medium);
    font-size: 1rem;
}

.strategy-card ul {
    list-style: none;
    padding: 0;
}

.strategy-card li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.strategy-card li::before {
    content: '•';
    color: var(--auric-primary);
    position: absolute;
    left: 0;
}

.timeline {
    position: relative;
    margin-top: var(--padding-medium);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bg-tertiary);
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--padding-large);
    position: relative;
}

.timeline-marker {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-primary);
    margin-right: var(--padding-medium);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.timeline-marker.auric {
    background: var(--auric-gradient);
}

.timeline-marker.veilbreak {
    background: var(--veilbreak-gradient);
}

.timeline-marker.allied {
    background: linear-gradient(135deg, var(--auric-primary), #32CD32);
}

.timeline-marker.contested {
    background: linear-gradient(135deg, var(--veilbreak-primary), #DC143C);
}

.timeline-marker.fire {
    background: linear-gradient(135deg, #DC143C, #FF6347);
}

.timeline-marker.victory {
    background: linear-gradient(135deg, var(--auric-primary), #00FF00);
}

.timeline-content {
    flex: 1;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: var(--padding-medium);
    border: 1px solid var(--bg-tertiary);
}

.timeline-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* Supply Lines */
.supply-lines-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.supply-route, .supply-vulnerabilities {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--auric-primary);
}

.vulnerability-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    border-left: 3px solid var(--auric-secondary);
}

/* Event Locations */
.events-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-location {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--auric-primary);
    transition: all 0.3s ease;
}

.event-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.event-details {
    margin-top: 1rem;
}

.event-details p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Strategic Points */
.strategic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.strategic-point {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.strategic-point:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.priority-high {
    background: rgba(255, 69, 0, 0.1);
    border-left: 4px solid #FF4500;
}

.priority-medium {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid var(--auric-secondary);
}

.priority-low {
    background: rgba(135, 206, 235, 0.1);
    border-left: 4px solid var(--auric-primary);
}

.priority-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
}

.point-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.point-content p {
    font-size: 0.9rem;
    opacity: 0.8;
    color: var(--text-secondary);
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .supply-lines-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .priority-icon {
        font-size: 2rem;
        margin-right: 0.8rem;
    }

    .world-map-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .svg-region-detail {
        position: static;
        order: -1;
    }
}

/* SVG Region Styles */
.region {
    cursor: default;
    opacity: 0.8;
}

/* SVG text color fix */
.world-map-svg text {
    fill: #FFFFFF !important;
    color: #FFFFFF !important;
}

.region-label, .region-name, .legend-text, .legend-title, .legend-subtitle, .legend-small {
    fill: #FFFFFF !important;
    color: #FFFFFF !important;
}

/* SVG Legend text sizing */
.legend-title {
    font-size: 12px !important;
}

.legend-text {
    font-size: 10px !important;
}
