/* Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: auto;
}

/* Ekran Stilleri */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    display: none;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow-y: auto;
}

.screen.active {
    display: flex;
}

/* Ana Menü */
.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 20px;
}

.menu-content h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #f8c555;
    text-shadow: 0 0 10px rgba(248, 197, 85, 0.5);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 40px;
}

.btn-menu {
    background: linear-gradient(to right, #0f3460, #1a5fb4);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 18px 25px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-menu:hover, .btn-menu:active {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(to right, #1a5fb4, #2a7de0);
}

.player-info {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-info i {
    color: #f8c555;
    margin-right: 8px;
}

/* Ekran Başlıkları */
.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(248, 197, 85, 0.5);
}

.screen-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #f8c555;
}

.btn-back {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 10px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

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

/* Irk Seçimi */
.races-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.race-card {
    background: rgba(15, 52, 96, 0.7);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.race-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.race-card.selected {
    border-color: #f8c555;
    background: rgba(15, 52, 96, 0.9);
    box-shadow: 0 0 20px rgba(248, 197, 85, 0.3);
}

.race-icon {
    font-size: 3rem;
    color: #f8c555;
}

.race-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #fff;
}

.race-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.stat-label {
    color: #aaa;
}

.stat-value {
    color: #f8c555;
    font-weight: bold;
}

.race-desc {
    font-size: 0.9rem;
    color: #ccc;
    font-style: italic;
    margin-top: 10px;
}

.difficulty-selection {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.difficulty-selection h3 {
    margin-bottom: 15px;
    color: #f8c555;
    font-family: 'Cinzel', serif;
}

.difficulty-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-difficulty {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 150px;
}

.btn-difficulty.active {
    background: linear-gradient(to right, #0f3460, #1a5fb4);
    box-shadow: 0 0 10px rgba(26, 95, 180, 0.5);
}

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

.btn-confirm {
    width: 100%;
    padding: 18px;
    background: linear-gradient(to right, #e63946, #ff6b6b);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-confirm:hover, .btn-confirm:active {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

/* Oyun Ekranı */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(248, 197, 85, 0.5);
}

.game-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.info-item i {
    color: #f8c555;
}

.battle-container {
    display: flex;
    flex: 1;
    margin-bottom: 20px;
    gap: 20px;
}

.player-side, .enemy-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.battle-middle {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.castle {
    font-size: 4rem;
    color: #f8c555;
    position: relative;
    text-shadow: 0 0 10px rgba(248, 197, 85, 0.5);
}

.castle-health {
    width: 150px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.health-bar {
    height: 100%;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    width: 100%;
    border-radius: 10px;
    transition: width 0.5s;
}

.enemy-side .castle {
    color: #e63946;
    text-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
}

.enemy-side .health-bar {
    background: linear-gradient(to right, #e63946, #ff6b6b);
}

.unit-display {
    min-height: 100px;
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.unit-icon {
    font-size: 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.battle-log {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 15px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.btn-attack {
    padding: 15px 30px;
    background: linear-gradient(to right, #e63946, #ff6b6b);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-attack:hover, .btn-attack:active {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.6);
}

.game-controls {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.units-panel h4 {
    margin-bottom: 10px;
    color: #f8c555;
    font-family: 'Cinzel', serif;
}

.units-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.unit-item {
    background: rgba(15, 52, 96, 0.7);
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.unit-item i {
    color: #f8c555;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-action {
    flex: 1;
    padding: 15px;
    background: linear-gradient(to right, #0f3460, #1a5fb4);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-action:hover, .btn-action:active {
    background: linear-gradient(to right, #1a5fb4, #2a7de0);
    transform: translateY(-3px);
}

/* Mağaza */
.shop-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.tab-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(to right, #0f3460, #1a5fb4);
    box-shadow: 0 0 10px rgba(26, 95, 180, 0.5);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.shop-item {
    background: rgba(15, 52, 96, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-item-info h4 {
    color: #f8c555;
    margin-bottom: 5px;
}

.shop-item-info p {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 10px;
}

.shop-item-price {
    color: #f8c555;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-buy {
    padding: 10px 20px;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-buy:hover, .btn-buy:active {
    background: linear-gradient(to right, #45a049, #7cb342);
}

.btn-buy:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Skor Tablosu */
.scores-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.score-tab-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.score-tab-btn.active {
    background: linear-gradient(to right, #0f3460, #1a5fb4);
    box-shadow: 0 0 10px rgba(26, 95, 180, 0.5);
}

.score-tab-content {
    display: none;
}

.score-tab-content.active {
    display: block;
}

.score-entry {
    background: rgba(15, 52, 96, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f8c555;
    width: 50px;
    text-align: center;
}

.score-info {
    flex: 1;
}

.score-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.score-details {
    font-size: 0.9rem;
    color: #ccc;
}

.score-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f8c555;
}

.medal-item {
    background: rgba(15, 52, 96, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.medal-icon {
    font-size: 2rem;
    color: #f8c555;
}

.medal-info h4 {
    color: #f8c555;
    margin-bottom: 5px;
}

.medal-info p {
    font-size: 0.9rem;
    color: #ccc;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 80%;
    overflow-y: auto;
    border: 2px solid rgba(248, 197, 85, 0.5);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.modal-content h3 {
    color: #f8c555;
    font-family: 'Cinzel', serif;
    margin-bottom: 20px;
    text-align: center;
}

#username-input {
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.note {
    font-size: 0.9rem;
    color: #aaa;
    font-style: italic;
    margin-bottom: 20px;
}

.btn-close-modal {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    margin-top: 20px;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .menu-content h1 {
        font-size: 2rem;
    }
    
    .races-container {
        grid-template-columns: 1fr;
    }
    
    .battle-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .player-side, .enemy-side {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .castle {
        font-size: 3rem;
    }
    
    .game-info {
        gap: 10px;
    }
    
    .info-item {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .shop-tabs, .scores-tabs {
        flex-wrap: wrap;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Tam Ekran Modu */
body.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}