:root {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --surface: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    background-image: radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.15), transparent 25%);
    background-attachment: fixed;
}

#root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Glassmorphism Classes */
.glass {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Base Components */
.navbar {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Form inputs */
input, textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: var(--text-color);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    border-color: var(--primary);
}

.card {
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Strategic Map Components */
.strategic-map-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border);
}

.strategic-map-image {
    width: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.strategic-map-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
}

.sector-cell {
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sector-cell:hover {
    background-color: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.8);
}

.sector-label {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.territory-node {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    z-index: 5;
}

.territory-node:hover {
    background-color: rgba(139, 92, 246, 0.6);
    border-color: rgba(139, 92, 246, 1);
}

.territory-node-selected {
    border: 3px solid #fbbf24;
    background-color: rgba(251, 191, 36, 0.5);
}

.territory-node-valid-move {
    background-color: rgba(34, 197, 94, 0.5);
    border: 2px dashed #22c55e;
}

.territory-node-valid-move:hover {
    background-color: rgba(34, 197, 94, 0.8);
}

.territory-node-valid-place {
    background-color: rgba(139, 92, 246, 0.4);
    border: 2px dashed rgba(139, 92, 246, 0.8);
}

.territory-node-valid-place:hover {
    background-color: rgba(139, 92, 246, 0.7);
}

.territory-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
    pointer-events: none;
}

.territory-castle-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    pointer-events: none;
    background: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 4px rgba(251, 191, 36, 0.4));
}

.territory-name-label {
    position: absolute;
    top: -24px;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.unit-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.unit-marker-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.unit-marker-p1 .unit-marker-img {
    filter: drop-shadow(0 0 6px #ff3366) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.unit-marker-p2 .unit-marker-img {
    filter: drop-shadow(0 0 6px #38bdf8) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.unit-marker-selected .unit-marker-img {
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 10px #fbbf24) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
}

.war-map-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.character-panel {
    flex: 0 0 320px;
    padding: 1.5rem;
    position: sticky;
    top: 5rem;
}

.turn-hud {
    padding: 1rem 1.5rem;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
}

.stat-input {
    width: 60px;
    text-align: center;
}

.char-card {
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.char-card-clickable {
    cursor: pointer;
    border: 1px dashed rgba(139, 92, 246, 0.4);
}

.char-card-clickable:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.15);
}

.char-card-selected {
    border: 2px solid #fbbf24 !important;
    background: rgba(251, 191, 36, 0.15) !important;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.char-card-acted {
    opacity: 0.5;
}

.sector-cell-selected {
    border: 3px solid #fbbf24;
    background-color: rgba(251, 191, 36, 0.2);
}

.sector-cell-valid-move {
    background-color: rgba(34, 197, 94, 0.3);
    border: 2px dashed #22c55e;
}

.sector-cell-valid-move:hover {
    background-color: rgba(34, 197, 94, 0.5);
}

.sector-cell-valid-place {
    background-color: rgba(139, 92, 246, 0.2);
    border: 2px dashed rgba(139, 92, 246, 0.6);
}

.sector-cell-valid-place:hover {
    background-color: rgba(139, 92, 246, 0.4);
}

.unit-marker-acted {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.turn-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.turn-active {
    background-color: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

.turn-waiting {
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 51, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 51, 102, 0);
    }
}

.lobby-container {
    max-width: 500px;
    margin: 4rem auto;
}

.lobby-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lobby-status {
    animation: fadePulse 2s infinite;
}

@keyframes fadePulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.territory-node-fight {
    animation: shake 0.5s infinite;
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 0 20px #ef4444;
}

.fight-overlay {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    z-index: 20;
    animation: pulseFight 1s infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

@keyframes shake {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-52%, -48%) rotate(-5deg); }
    50% { transform: translate(-50%, -50%) rotate(0deg); }
    75% { transform: translate(-48%, -52%) rotate(5deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes pulseFight {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.territory-node-owned-red {
    border: 2px solid #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}

.territory-node-owned-blue {
    border: 2px solid #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.7);
}

.territory-res-pill {
    position: absolute;
    bottom: -18px;
    display: flex;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.9);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    pointer-events: none;
    z-index: 6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.res-tag {
    color: #fbbf24;
}

.territory-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.15s ease-out;
}

.territory-modal-card {
    width: 90%;
    max-width: 440px;
    border-radius: 12px;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

.territory-modal-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.btn-modal-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.btn-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.owner-banner {
    padding: 6px 12px;
    border-radius: 6px;
    text-align: center;
}

.owner-banner-red {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.owner-banner-blue {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #93c5fd;
}

.owner-banner-neutral {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}

.territory-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stat-box {
    background: rgba(15, 23, 42, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.stat-value {
    font-size: 1.1rem;
}

.btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.unit-marker-army-badge {
    position: absolute;
    bottom: -6px;
    right: -8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 9999px;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    z-index: 10;
    line-height: 1;
}

.recruitment-section {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-xs {
    padding: 3px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Hero Selection Grid */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    width: 100%;
    margin-top: 12px;
    margin-bottom: 16px;
}

.hero-card {
    background: rgba(15, 23, 42, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px 12px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
}

.hero-card:hover {
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
}

.hero-card.selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.hero-selection-badge {
    position: absolute;
    top: -10px;
    right: -6px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-stats-row {
    display: flex;
    gap: 6px;
    margin: 8px 0;
    width: 100%;
    justify-content: center;
}

.hero-stat-pill {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 600;
}

/* Character Selector Tabs in Gameplay */
.character-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

.char-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #cbd5e1;
}

.char-tab-btn:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(30, 41, 59, 0.8);
}

.char-tab-btn.active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    color: #f1f5f9;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.char-tab-btn.acted {
    opacity: 0.6;
}

.char-tab-btn.dead {
    opacity: 0.4;
    text-decoration: line-through;
    border-color: #ef4444;
}

/* Scroll Notification Toast */
.scroll-notification-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
    animation: slideDown 0.3s ease-out;
    pointer-events: none;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Scroll Section in Character Panel */
.scroll-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.scroll-item {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.scroll-use-btn {
    padding: 0.15rem 0.5rem !important;
    font-size: 0.7rem !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    color: #a78bfa !important;
}

.scroll-use-btn:hover {
    background: rgba(139, 92, 246, 0.2) !important;
}

/* Pre-Battle Preparation Modal */
.battle-prep-modal {
    max-width: 440px;
    width: 95%;
}

.battle-win-chance-banner {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.battle-win-chance-banner.chance-high {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.3) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.battle-win-chance-banner.chance-high .win-chance-value {
    color: #4ade80;
}

.battle-win-chance-banner.chance-med {
    border-color: rgba(234, 179, 8, 0.4);
    background: linear-gradient(135deg, rgba(113, 63, 18, 0.3) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.battle-win-chance-banner.chance-med .win-chance-value {
    color: #facc15;
}

.battle-win-chance-banner.chance-low {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.battle-win-chance-banner.chance-low .win-chance-value {
    color: #f87171;
}

.win-chance-value {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.army-domination-tag {
    color: #86efac;
    font-weight: 600;
}

.army-domination-tag-danger {
    color: #fca5a5;
    font-weight: 600;
}

/* Combatant Comparison Grid */
.battle-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.combatant-card {
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.attacker-card {
    border-left: 3px solid #38bdf8;
}

.defender-card {
    border-left: 3px solid #ef4444;
}

.combatant-header {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.4rem;
}

.combatant-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #cbd5e1;
}

/* Battle Scrolls Section */
.battle-scrolls-section {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.battle-scroll-row {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.scroll-apply-btn {
    padding: 0.15rem 0.5rem !important;
    font-size: 0.75rem !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
    color: #c4b5fd !important;
    background: rgba(139, 92, 246, 0.15) !important;
}

.scroll-apply-btn:hover {
    background: rgba(139, 92, 246, 0.3) !important;
    border-color: #a78bfa !important;
}

/* Utility classes */
.gap-02 { gap: 0.2rem; }
.gap-03 { gap: 0.3rem; }
.gap-05 { gap: 0.5rem; }
.mt-02 { margin-top: 0.2rem; }
.mt-03 { margin-top: 0.3rem; }
.pt-05 { padding-top: 0.5rem; }
.pb-05 { padding-bottom: 0.5rem; }
.mb-03 { margin-bottom: 0.3rem; }
.mb-05 { margin-bottom: 0.5rem; }
.flex-wrap { flex-wrap: wrap; }
.border-b { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.italic { font-style: italic; }
.text-success { color: #4ade80; }

/* Kingdom & Realm Overview Panel */
.kingdom-overview-panel {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.kingdom-summary-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.metric-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

/* Territories Overview Grid */
.territories-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.territory-overview-card {
    padding: 0.85rem;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.15s, border-color 0.15s;
}

.territory-overview-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.castle-card {
    border-left: 3px solid #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(30, 41, 59, 0.6) 100%);
}

.territory-mini-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.territory-code-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.protection-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.garrison-info {
    padding: 0.3rem 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Heroes Overview Grid */
.heroes-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.hero-overview-card {
    padding: 0.85rem;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-dead {
    opacity: 0.6;
    border-color: rgba(239, 68, 68, 0.3);
}

.hero-mini-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.hero-stats-overview {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
}

.hero-scrolls-container {
    padding: 0.5rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(139, 92, 246, 0.12);
}

.hero-scroll-row {
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.empty-overview-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}



