/* Modern & Çocuk Dostu Tasarım Sistemi - Fredoka Yazı Tipi */
:root {
    --primary: #6c5ce7;
    --primary-hover: #5b4bc4;
    --secondary: #00cec9;
    --secondary-hover: #00b894;
    --accent: #fdcb6e;
    --accent-hover: #e17055;
    --danger: #ff7675;
    --danger-hover: #d63031;
    --success: #2ecc71;
    --text-color: #ffffff;
    --text-muted: #b2bec3;
    --bg-gradient: linear-gradient(135deg, #1e1b4b 0%, #311042 100%);
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.12);
    --font-family: 'Fredoka', sans-serif;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --border-radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    height: 100dvh;
    overflow: hidden; /* Kaydırma çubuğunu tamamen engelle */
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center; /* Dikeyde de ortala */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}

/* Oyun Taşıyıcısı */
#game-container {
    width: 520px; /* Harita genişliği 480px + sağ/sol padding 20px-20px için ideal */
    height: 710px; /* Sabit hedef yükseklik */
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    padding: 15px;
    background: rgba(15, 12, 40, 0.6);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    overflow: hidden;
}

/* Ortak Cam Kart Tasarımı (Glassmorphism) */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Simgeler ve Butonlar */
.bottom-settings {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 100;
    pointer-events: none; /* Altındaki menülere tıklanabilmesi için */
}

.btn-icon {
    pointer-events: auto; /* Butonların kendisi tıklanabilir kalmalı */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.btn-icon:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.btn-danger:hover {
    background: var(--danger);
}

/* Kahraman Bilgi Paneli (HUD) */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid var(--card-border);
    margin-bottom: 20px;
    z-index: 50;
    transition: opacity 0.5s ease;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.character-info {
    cursor: pointer;
}

.hud-avatar-wrapper {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
    border: 2px solid white;
}

.hud-details #hud-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent);
}

.hud-level-badge-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
}

.hud-level-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 110px;
    height: 18px;
}

.hud-level-badge .xp-bar-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 0;
    border: none;
    z-index: 1;
}

.hud-level-badge .xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
    width: 0%;
    transition: width 0.5s ease-out;
}

.hud-level-text {
    position: relative;
    z-index: 2;
    font-weight: bold;
    color: white;
    display: block;
    line-height: 12px;
}

.gold-container {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent);
}

.gold-icon {
    font-size: 1.3rem;
    color: #ffd700;
}

/* Genel Ekran Tanımları */
.screen {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#screen-welcome, #screen-class-select {
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* Hoşgeldiniz & Karakter Seçim Ekranı */
.welcome-box {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.game-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(to right, #fdcb6e, #e17055, #6c5ce7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 5px;
    animation: floating 3s ease-in-out infinite;
}

.game-subtitle {
    font-size: 1.6rem;
    color: var(--secondary);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.welcome-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    width: 100%;
}

.input-group label {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--accent);
}

.input-group input {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--card-border);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-family: var(--font-family);
    font-size: 1.2rem;
    text-align: center;
    width: 80%;
    max-width: 300px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
}

.selection-title {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.class-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
}

.class-card {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.class-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary);
}

.class-card.selected {
    background: rgba(108, 92, 231, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

.class-avatar {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.class-card h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.class-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-bottom: 8px;
}

.special-ability {
    display: inline-block;
    font-size: 0.7rem;
    background: rgba(253, 203, 110, 0.2);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: bold;
}

/* Buton Tasarımları */
.btn {
    font-family: var(--font-family);
    font-weight: bold;
    border: none;
    border-radius: 30px;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.2s ease-out;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #8e2de2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #4a00e0 100%);
    box-shadow: 0 6px 15px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #f39c12 100%);
    color: #2c3e50;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #f1c40f 0%, #e67e22 100%);
    box-shadow: 0 6px 15px rgba(253, 203, 110, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-large {
    padding: 14px 40px;
    font-size: 1.2rem;
}

.map-container {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    height: 100%;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Harita Tahtası (Adventure Board) */
.map-adventure-board {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: auto;
    aspect-ratio: 1 / 1;
    background: url('fantasy_math_map.png') no-repeat center center;
    background-size: 100% 100%;
    border-radius: var(--border-radius);
    border: 4px solid #d4af37; /* Efsanevi Altın Çerçeve */
    overflow: hidden;
    margin: 10px auto;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.85), 0 10px 25px rgba(0,0,0,0.5);
}

.map-svg-paths {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.map-path-line {
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 6;
    stroke-dasharray: 10 8;
    transition: stroke 0.5s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.map-path-line.active-path {
    stroke: #ffd700; /* Büyülü Altın Akış Yolu */
    animation: dashPath 12s linear infinite;
    filter: drop-shadow(0 0 8px #ffd700);
}

@keyframes dashPath {
    to {
        stroke-dashoffset: -100;
    }
}

/* Kahraman Simgesi Haritada - Büyülü Halka Efekti */
.hero-token {
    position: absolute;
    width: 58px;
    height: 58px;
    background: radial-gradient(circle, var(--primary) 0%, #311042 100%);
    border: 3px solid #ffd700; /* Altın kaplama */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    z-index: 10;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 25px rgba(253, 203, 110, 0.9);
    transition: left 1.2s cubic-bezier(0.25, 0.8, 0.25, 1), top 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

/* Kahramanın altındaki döner büyü halkası */
.hero-token::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px dashed #ffd700;
    border-radius: 50%;
    animation: rotateAura 6s linear infinite;
    opacity: 0.8;
}

@keyframes rotateAura {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Krallık Noktaları (Kingdom Nodes) - Şövalye Kalkanı Tasarımı */
.kingdom-node {
    position: absolute;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    z-index: 5;
    cursor: pointer;
}

.kingdom-icon-wrapper {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border: 3px solid #bdc3c7;
    border-radius: 12px 12px 50% 50%; /* Kalkan Şekli */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
}

.kingdom-node:hover:not(.locked) .kingdom-icon-wrapper {
    transform: scale(1.2) translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 10px 25px rgba(253, 203, 110, 0.8);
}

/* Krallıklara Özel Aktif Durum Işıması */
.kingdom-node.active-node:not(.locked) .kingdom-icon-wrapper {
    border-color: #ffd700;
}

.node-toplama.active-node .kingdom-icon-wrapper { box-shadow: 0 0 20px rgba(253, 203, 110, 0.7); }
.node-cikarma.active-node .kingdom-icon-wrapper { box-shadow: 0 0 20px rgba(0, 206, 201, 0.7); }
.node-carpim.active-node .kingdom-icon-wrapper { box-shadow: 0 0 20px rgba(46, 204, 113, 0.7); }
.node-bolme.active-node .kingdom-icon-wrapper { box-shadow: 0 0 20px rgba(155, 89, 182, 0.7); }

/* Kilitli Düğüm */
.kingdom-node.locked {
    cursor: not-allowed;
}

.kingdom-node.locked .kingdom-icon-wrapper {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-color: #7f8c8d;
    border-style: solid;
    filter: grayscale(1) brightness(0.6);
    opacity: 0.75;
}

.kingdom-node.locked .kingdom-pulse {
    display: none;
}

/* Düğüm Etrafındaki Dalgalanma Efekti */
.kingdom-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(253, 203, 110, 0.3);
    animation: nodePulse 2.2s infinite;
    z-index: -1;
    pointer-events: none;
}

.node-cikarma .kingdom-pulse { background: rgba(0, 206, 201, 0.3); }
.node-carpim .kingdom-pulse { background: rgba(46, 204, 113, 0.3); }
.node-bolme .kingdom-pulse { background: rgba(155, 89, 182, 0.3); }

@keyframes nodePulse {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Tooltip (Bilgilendirme Kutusu) */
.kingdom-tooltip {
    position: absolute;
    bottom: 66px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 12, 40, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px 15px;
    width: 160px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    z-index: 15;
}

.kingdom-tooltip h3 {
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: var(--accent);
}

.kingdom-tooltip p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.tooltip-action {
    display: block;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--secondary);
    background: rgba(0, 206, 201, 0.15);
    padding: 2px 5px;
    border-radius: 5px;
}

.kingdom-node:hover .kingdom-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.animate-floating-slow {
    animation: floating 4s ease-in-out infinite;
}

/* Harita Kontrolleri */
.map-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

/* Savaş Ekranı */
.battle-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.battle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent);
    padding: 0 10px 10px 10px;
    border-bottom: 1px solid var(--card-border);
}

.combat-arena {
    display: grid;
    grid-template-columns: 1fr 0.6fr 1fr;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    position: relative;
}



.combat-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.unit-sprite {
    font-size: 4rem;
    margin-bottom: 0;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.3));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.unit-name {
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.unit-hp-bar {
    width: 100%;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hp-text {
    font-size: 0.75rem;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
}

.hp-fill-outer {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.hp-fill {
    height: 100%;
    transition: width 0.3s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.bg-green {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.bg-red {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.combat-middle {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.vs-badge {
    background: var(--danger);
    font-size: 1.2rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#combat-log {
    font-size: 0.85rem;
    background: rgba(0,0,0,0.4);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    max-width: 180px;
    color: var(--accent);
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ekipman ve Evcil Hayvan Görselleri */
.equipped-pet {
    font-size: 1.8rem;
    position: absolute;
    bottom: 50px;
    right: 10px;
    animation: floating 2s ease-in-out infinite;
}

/* Efektler (Hasar alma vb) */
.unit-effect {
    position: absolute;
    top: 20%;
    font-size: 2rem;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: all 0.8s ease-out;
}

.effect-damage {
    color: var(--danger);
    transform: translateY(0);
    animation: textUpFade 0.8s forwards;
}

.effect-heal {
    color: var(--success);
    animation: textUpFade 0.8s forwards;
}

/* Soru Bölümü */
.question-container {
    margin-top: 15px;
    text-align: center;
}

.question-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.timer-wrapper {
    color: var(--accent);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.question-text {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.btn-option {
    font-family: var(--font-family);
    font-size: 1.4rem;
    font-weight: bold;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--card-border);
    color: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-option:hover {
    background: var(--primary);
    border-color: white;
    transform: scale(1.02);
}

.btn-option.correct {
    background: var(--success) !important;
    border-color: white !important;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
}

.btn-option.wrong {
    background: var(--danger) !important;
    border-color: white !important;
    box-shadow: 0 0 15px rgba(255, 118, 117, 0.5);
}

/* Market ve Stats Ekranları */
.shop-container, .stats-container {
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shop-header, .stats-header {
    text-align: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.shop-header h2, .stats-header h2 {
    font-size: 1.8rem;
    color: var(--accent);
}

.shop-header p, .stats-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.shop-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.shop-tab {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-family: var(--font-family);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-tab.active {
    background: var(--primary);
    border-color: white;
}

.shop-scrollable-content {
    flex-grow: 1;
    height: 0;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 5px;
}

.shop-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.shop-item-card {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-between;
}

.shop-item-card:hover {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.07);
}

.item-visual {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: floating 3s ease-in-out infinite;
}

.shop-item-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.item-benefit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.3;
}

.item-price {
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.btn-buy {
    font-family: var(--font-family);
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-buy:hover {
    background: var(--primary-hover);
}

.btn-buy.owned {
    background: var(--success);
    cursor: default;
}

.shop-footer, .stats-footer {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    border-top: 1px solid var(--card-border);
    padding-top: 15px;
}

.stats-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
    height: 0;
    min-height: 0;
    overflow-y: auto;
}

.stats-attributes, .stats-crystals, .stats-inventory {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 15px;
}

.stats-content h3 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}

.attribute-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.crystal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.crystal-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    text-align: center;
}

.crystal-item.locked {
    opacity: 0.3;
}

.crystal-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.crystal-item span {
    font-size: 0.75rem;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
}

.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.btn-equip {
    background: var(--primary);
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: bold;
}

.btn-equip.active-equip {
    background: var(--success);
}

.empty-inventory-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

/* Modallar */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
}

.modal-content {
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-banner {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 15px;
}

.modal-visual {
    font-size: 4rem;
    margin-bottom: 15px;
}

.modal-rewards {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.reward-box {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--card-border);
    padding: 8px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

/* Animasyonlar */
@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes textUpFade {
    0% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-40px); }
}

.animate-idle {
    animation: floating 3s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.3s ease-in-out;
}

.animate-bounce-in {
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.hidden-tab-content {
    display: none !important;
}

.active-tab-content {
    display: grid !important;
}

/* Savaşçı & Canavar Görseli Taşıyıcısı */
.unit-sprite-container {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 10px;
}

.battle-monster-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.4));
    transition: transform 0.2s ease;
}

/* Hikaye Diyalog Kutusu (Story Box) */
.story-box {
    width: 90%;
    max-width: 540px;
    padding: 25px;
    border: 3px solid #d4af37; /* Altın kaplama */
}

.story-header {
    border-bottom: 2px dashed rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.story-header #story-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent);
    letter-spacing: 1px;
}

.story-content {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    min-height: 120px;
}

@media (max-width: 500px) {
    .story-content {
        flex-direction: column;
        text-align: center;
    }
}

.story-speaker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.story-avatar-wrapper {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, var(--primary) 0%, #311042 100%);
    border: 2px solid #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

.story-speaker strong {
    font-size: 0.95rem;
    color: var(--accent);
    max-width: 100px;
    text-align: center;
    line-height: 1.2;
}

.story-text-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 15px;
    flex-grow: 1;
    height: 100%;
    display: flex;
    align-items: center;
}

.story-text-container p {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-color);
}

.story-footer {
    display: flex;
    justify-content: flex-end;
}

/* Ada Alt Haritası (Sub-map Board) */
.island-map-board {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: auto;
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle, rgba(15, 12, 40, 0.9) 0%, rgba(31, 16, 66, 0.95) 100%);
    border-radius: var(--border-radius);
    border: 3px solid #d4af37;
    overflow: hidden;
    margin: 10px auto;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.85);
}

.island-svg-paths {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.island-path-line {
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 4;
    stroke-dasharray: 8 6;
    transition: stroke 0.3s;
}

.island-path-line.active-path {
    stroke: var(--secondary);
    filter: drop-shadow(0 0 4px var(--secondary));
}

.island-node {
    position: absolute;
    width: 38px;
    height: 38px;
    transform: translate(-50%, -50%);
    z-index: 5;
    cursor: pointer;
    border-radius: 50%;
    background: #34495e;
    border: 3px solid #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: bold;
    color: #bdc3c7;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.island-node:hover:not(.locked) {
    transform: translate(-50%, -50%) scale(1.15);
    border-color: white;
}

.island-node.passed {
    background: var(--success);
    border-color: white;
    color: white;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.7);
}

.island-node.active-step {
    background: var(--secondary);
    border-color: #ffd700; /* Altın kaplama */
    color: white;
    box-shadow: 0 0 20px var(--secondary);
    transform: translate(-50%, -50%) scale(1.22);
}

.island-node.boss-step {
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
    border-radius: 12px 12px 50% 50%; /* Kalkan */
    background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%);
    border-color: #ffd700;
}

.island-node.locked {
    cursor: not-allowed;
    opacity: 0.45;
}

/* Savaş Animasyonu Efekti (Projectile) */
.combat-projectile {
    position: absolute;
    font-size: 2.5rem;
    z-index: 100;
    pointer-events: none;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), top 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

/* Liderlik Tablosu Stilleri */
.leaderboard-table th, .leaderboard-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.leaderboard-table td {
    color: rgba(255, 255, 255, 0.9);
}

.leaderboard-table tbody tr:first-child td {
    font-weight: bold;
    color: #ffd700; /* Birinciye altın renk */
}

/* Mobil Duyarlılık (Responsive Fixes) */
@media (max-width: 520px) {
    .class-selector {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .class-card {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 12px;
        padding: 10px 15px;
    }
    .class-avatar {
        font-size: 2rem;
        margin-bottom: 0;
    }
    .class-card p {
        display: none; /* Mobilde yer kazanmak için açıklamayı gizle */
    }
}
