body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #1a1a1a;
    color: #ecf0f1;
    text-align: center;
    margin: 0; padding: 20px;
}
.container { max-width: 900px; margin: 0 auto; }
.screen { background: #2c3e50; padding: 30px; border-radius: 10px; margin-top: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.box { background: #34495e; padding: 20px; margin: 15px 0; border-radius: 8px; border: 2px solid #7f8c8d; }
input { padding: 12px; font-size: 16px; border-radius: 5px; border: none; margin-right: 10px; background: #ecf0f1; }
button { padding: 12px 25px; font-size: 16px; cursor: pointer; border: none; border-radius: 5px; font-weight: bold; transition: 0.2s; text-transform: uppercase;}
.btn-primary { background-color: #3498db; color: white; }
.btn-primary:hover { background-color: #2980b9; }
.btn-secondary { background-color: #e67e22; color: white; }
.btn-secondary:hover { background-color: #d35400; }
.btn-primary:disabled { background-color: #7f8c8d; cursor: not-allowed; }

.text-shadow { text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 5px 10px rgba(0,0,0,0.8); }
.main-title { font-size: 32px; color: #e5c07b; letter-spacing: 2px; margin-bottom: 30px;}

/* =========================================
   MODERN LOBİ TASARIMI
========================================= */
.modern-lobby { background: radial-gradient(circle at center, #2a313a 0%, #15181c 100%); border: 3px solid #23282e; box-shadow: inset 0 0 50px rgba(0,0,0,0.8), 0 15px 30px rgba(0,0,0,0.9); }
.premium-box { background: linear-gradient(180deg, rgba(50,58,68,0.7) 0%, rgba(30,35,42,0.9) 100%); border: none; border-top: 2px solid #d88b4a; border-bottom: 2px solid #d88b4a; border-left: 1px solid rgba(255,255,255,0.05); border-right: 1px solid rgba(255,255,255,0.05); box-shadow: inset 0 0 15px rgba(216, 139, 74, 0.15), 0 10px 20px rgba(0,0,0,0.6); padding: 30px 20px; position: relative; backdrop-filter: blur(5px); }
.gold-text { color: #e5c07b; font-size: 20px; margin-top: 0; margin-bottom: 20px; text-shadow: 0 2px 5px rgba(0,0,0,0.8); letter-spacing: 1px; }
.code-display { background: linear-gradient(180deg, #15181c 0%, #0d0f12 100%); border: 2px solid #2c353d; border-radius: 8px; padding: 12px 25px; display: inline-block; box-shadow: inset 0 3px 10px rgba(0,0,0,0.9), 0 2px 5px rgba(255,255,255,0.05); margin: 10px 0 20px 0; }
.code-label { color: #8b9eb3; font-size: 16px; margin-right: 10px; }
#my-id { font-family: 'Courier New', Courier, monospace; font-size: 26px; letter-spacing: 3px; color: #2ecc71; text-shadow: 0 0 10px rgba(46, 204, 113, 0.6); }
.info-text { color: #7f8c8d; font-size: 14px; margin: 0;}
.input-group { display: flex; justify-content: center; align-items: center; gap: 10px; }
#room-input { background: #0d0f12; border: 2px solid #2c353d; color: #ecf0f1; padding: 14px 20px; font-size: 16px; border-radius: 8px; box-shadow: inset 0 3px 8px rgba(0,0,0,0.8); transition: all 0.3s ease; width: 200px; text-align: center; letter-spacing: 2px; }
#room-input:focus { outline: none; border-color: #3498db; box-shadow: inset 0 3px 8px rgba(0,0,0,0.8), 0 0 15px rgba(52, 152, 219, 0.4); }
.btn-modern { background: linear-gradient(180deg, #2980b9 0%, #1a5276 100%); border: 1px solid #4a6b8c; color: white; box-shadow: inset 0 2px 2px rgba(255,255,255,0.2), 0 5px 15px rgba(0,0,0,0.5); border-radius: 8px; padding: 14px 30px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.btn-modern:hover { background: linear-gradient(180deg, #3498db 0%, #21618c 100%); transform: translateY(-2px); box-shadow: inset 0 2px 2px rgba(255,255,255,0.3), 0 8px 20px rgba(0,0,0,0.6); }
#connection-status { margin-top: 20px; font-weight: bold; color: #f1c40f; letter-spacing: 1px; }

/* =========================================
   GENEL VE SAVAŞ EKRANI TASARIMLARI
========================================= */
.scoreboard { font-weight: bold; border-radius: 8px; }
.main-score { display: flex; justify-content: center; align-items: center; gap: 15px; background: #34495e; padding: 15px; border: 2px solid #f1c40f; margin-bottom: 20px; font-size: 18px;}
.score-divider { color: #f1c40f; font-size: 20px; }
.round-score { background: rgba(0,0,0,0.7); padding: 10px 20px; display: inline-block; margin-bottom: 20px; border-radius: 5px; border: 1px solid #7f8c8d;}

.battle-area { background-size: cover; background-position: center; background-repeat: no-repeat; transition: background-image 0.5s ease; border: 4px solid #7f8c8d; position: relative; min-height: 450px; }
.bg-round-1 { background-image: url('bg1.png'); }
.bg-round-2 { background-image: url('bg2.png'); }
.bg-round-3 { background-image: url('bg3.png'); }

/* --- DÜZELTİLEN SÜRÜKLE BIRAK ALANI --- */
.deck { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin: 20px 0; min-height: 110px; }

.char-slot { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    width: 90px; /* Kutuyu sabitleyerek kaymayı önler */
    cursor: grab; 
    padding: 5px; 
    border: 2px solid transparent; 
}
.char-slot:active { cursor: grabbing; border-color: #f1c40f; border-radius: 8px; background: rgba(0,0,0,0.2); }
.char-slot img { width: 80px; height: 80px; background: rgba(255,255,255,0.1); border-radius: 8px; border: 3px solid #bdc3c7; pointer-events: none; }
.char-hp-label { 
    background: #e74c3c; 
    color: white; 
    border-radius: 10px; 
    padding: 2px 8px; 
    font-weight: bold; 
    margin-top: 5px; 
    display: block; /* Yan yana değil alt alta durmasını garantiler */
    font-size: 12px;
    pointer-events: none; /* Yazının sürüklemeyi bozmasını engeller */
}

/* --- ARENA --- */
.arena { display: flex; justify-content: center; align-items: flex-end; gap: 40px; margin: 20px 0 10px 0; min-height: 250px; }
.fighter-frame-wrapper { display: flex; flex-direction: column; align-items: center; width: 160px; transform: translateY(40px); }
.img-wrapper { position: relative; display: flex; justify-content: center; align-items: center; }
.fighter-frame-wrapper img { width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 15px 10px rgba(0,0,0,0.9)); transition: all 0.2s ease; }
.clean-hp-text { font-size: 24px; font-weight: bold; color: #fff; margin-top: 15px; text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 5px 10px rgba(0,0,0,0.8); }
.vs-column { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; margin-bottom: 60px; }

/* --- SAVAŞ EFEKTLERİ --- */
.attacking-right { animation: attackRight 0.5s ease-out; z-index: 100; }
@keyframes attackRight { 0% { transform: translate(0, 0) rotate(0deg) skewX(0deg); } 30% { transform: translate(60px, -20px) rotate(-15deg) skewX(-10deg); } 100% { transform: translate(0, 0) rotate(0deg) skewX(0deg); } }
.attacking-left { animation: attackLeft 0.5s ease-out; z-index: 100; }
@keyframes attackLeft { 0% { transform: translate(0, 0) rotate(0deg) skewX(0deg); } 30% { transform: translate(-60px, -20px) rotate(15deg) skewX(10deg); } 100% { transform: translate(0, 0) rotate(0deg) skewX(0deg); } }
.hit-flash { animation: hitFlash 0.2s ease-in-out; }
@keyframes hitFlash { 0% { filter: brightness(1) sepia(0); } 50% { filter: brightness(2) sepia(1) hue-rotate(-50deg) saturate(5); transform: scale(0.9); } 100% { filter: brightness(1) sepia(0); } }
.dead-img { filter: grayscale(100%) !important; transform: rotate(90deg); opacity: 0.6; }
.winner-img { filter: drop-shadow(0 0 15px #2ecc71) !important; transform: scale(1.1); }
.effect-text { position: absolute; top: 20%; left: 50%; transform: translate(-50%, -50%); font-size: 30px; font-weight: bold; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000; opacity: 0; pointer-events: none; z-index: 110; white-space: nowrap; }
.show-effect { animation: floatUp 1s ease-out forwards; }
@keyframes floatUp { 0% { opacity: 1; transform: translate(-50%, -10px) scale(1.3); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
.crit-color { color: #f1c40f; } .dodge-color { color: #3498db; } .dmg-color { color: #e74c3c; }


/* =========================================
   MOBİL UYUMLULUK (RESPONSIVE TASARIM)
========================================= */
@media screen and (max-width: 768px) {
    body { padding: 10px; }
    .screen { padding: 15px; }
    .main-title { font-size: 22px; }
    
    .main-score { font-size: 14px; flex-direction: column; gap: 5px; padding: 10px; }
    .score-divider { display: none; }
    
    .input-group { flex-direction: column; width: 100%; }
    #room-input { width: 90%; }
    .btn-modern { width: 90%; margin-top: 10px; }
    .code-display { padding: 10px 15px; }
    #my-id { font-size: 20px; }
    
    /* Mobil Dizilim Düzeltmeleri */
    .deck { gap: 5px; }
    .char-slot { width: 65px; padding: 2px; } /* Mobilde kutuyu daraltıyoruz */
    .char-slot img { width: 55px; height: 55px; }
    .char-hp-label { font-size: 11px; padding: 2px 5px; margin-top: 3px; }
    
    /* Mobil Arena Düzeltmeleri */
    .arena { gap: 10px; min-height: 200px; }
    .fighter-frame-wrapper { width: 100px; transform: translateY(20px); }
    .fighter-frame-wrapper img { width: 90px; height: 90px; } 
    .clean-hp-text { font-size: 16px; margin-top: 10px; }
    
    .vs-column { margin-bottom: 30px; }
    #vs-text { font-size: 18px; margin: 0; }
    #round-info { font-size: 16px; margin: 0; }
    #battle-result { font-size: 18px; }
    .effect-text { font-size: 20px; }
    
    @keyframes attackRight {
        0% { transform: translate(0, 0) rotate(0deg) skewX(0deg); }
        30% { transform: translate(30px, -10px) rotate(-15deg) skewX(-10deg); }
        100% { transform: translate(0, 0) rotate(0deg) skewX(0deg); }
    }
    @keyframes attackLeft {
        0% { transform: translate(0, 0) rotate(0deg) skewX(0deg); }
        30% { transform: translate(-30px, -10px) rotate(15deg) skewX(10deg); }
        100% { transform: translate(0, 0) rotate(0deg) skewX(0deg); }
    }
}