/* --- GENEL AYARLAR --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle, #3e0000, #111);
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-table {
    width: 100%;
    max-width: 1000px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    box-sizing: border-box;
}

/* --- KART TASARIMI --- */
.card {
    width: 65px;   
    height: 95px;  
    border-radius: 6px;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.5em;
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    cursor: pointer;
    position: absolute; 
    transition: transform 0.2s ease, left 0.2s ease;
    user-select: none;
    transform-origin: bottom center;
}

/* Renkler */
.red { background: #e53935; text-shadow: 1px 1px 0 #000; }
.yellow { background: #ffeb3b; color: #333; text-shadow: none; border-color: #fff9c4; }
.green { background: #43a047; text-shadow: 1px 1px 0 #000; }
.blue { background: #1e88e5; text-shadow: 1px 1px 0 #000; }
.wild { background: linear-gradient(135deg, #e53935, #ffeb3b, #43a047, #1e88e5); text-shadow: 1px 1px 2px black; }

.back { 
    background: #b71c1c; 
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(0,0,0,0.1) 5px, rgba(0,0,0,0.1) 10px);
    color: white; 
    border: 2px solid white;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    text-align: center;
    line-height: 1;
    z-index: 5;
}

.card:not(.back):hover {
    transform: translateY(-25px) scale(1.2) !important;
    z-index: 9999 !important; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
}

.playable {
    box-shadow: 0 0 15px #ffeb3b;
    border-color: #ffeb3b;
}

/* --- OYUNCU İSİM VE KART BİLGİLERİ --- */
.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 10px auto;
    box-sizing: border-box;
    padding: 0 15px;
}

.player-name {
    font-size: 1.4em;
    font-weight: 900;
    margin: 5px 0;
    padding: 5px 15px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-count-badge {
    background: #e91e63; /* Canlı Renk */
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Konumlandırma */
.bot-info {
    justify-content: flex-start; /* Sevgilim (Sol) - Kart Sayısı (Sağ) */
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 8px;
}

.user-info {
    justify-content: flex-end; /* Kart Sayısı (Sol) - Sen (Sağ) */
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 8px;
}
.user-info .player-name {
    order: 2; /* İsim sağa gitsin */
}
.user-info .card-count-badge {
    order: 1; /* Badge sola gitsin */
}

/* --- KART ALANLARI VE MASA --- */
.hand-container {
    width: 100%;
    max-width: 800px;
    height: 110px;
    position: relative; 
    margin: 5px auto; 
    display: flex;
    justify-content: center;
    align-items: center;
}
.card-row {
    position: relative; 
    width: 100%; 
    height: 100%;
}

#center-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#piles {
    display: flex;
    gap: 100px; 
    margin-bottom: 20px;
    align-items: center;
}

.pile {
    width: 75px;
    height: 105px;
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#status-bar {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 25px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
    min-width: 200px;
}

/* --- BUTONLAR ve MODAL --- */
button {
    background: #e91e63;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    margin: 0 5px;
    transition: 0.2s;
}
button:hover:not(:disabled) { transform: scale(1.05); background: #d81b60; }
button:disabled { background: #666; cursor: not-allowed; }
.restart-btn { background: #1976d2; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 3000; justify-content: center; align-items: center; }
.modal-content { background: #222; padding: 25px; border-radius: 10px; text-align: center; border: 1px solid #444; }
.colors { display: flex; gap: 15px; margin-top: 15px; }
.c-btn { width: 50px; height: 50px; border-radius: 50%; cursor: pointer; border: 3px solid white; transition: 0.2s; }
.c-btn:hover { transform: scale(1.1); }

/* --- ANİMASYONLAR --- */
.playing-card {
    transition: all 0.5s ease-in-out !important;
    transform: translateY(-150px) scale(0.8) rotate(10deg) !important;
    opacity: 0;
}
.bot-playing-card {
    transition: all 0.5s ease-in-out !important;
    transform: translateY(150px) scale(0.8) rotate(-10deg) !important;
    opacity: 0;
}
.drawing-card { animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }