* {
    box-sizing: border-box;
}

.ludo-container {
    width: 450px;
    margin: 20px auto;
}

.ludo-container .ludo {

    height: 450px;
    width: 100%;
    background-image: url('./ludo-bg.jpg');
    background-size: contain;
    position: relative;
}

.player-pieces {
    height: 100%;
    width: 100%;
}

.player-piece {
    width: 3%;
    height: 3%;
    border: 2px solid;
    border-radius: 10px;
    position: absolute;
    transform: translate(50%, 50%);
    transition: all .2s;

    z-index: 1;

    /* top: 15%;
    left: 50%; */
}
.player-piece.highlight {
    cursor: pointer;
    border: 2px dashed;
    animation: spin 1s infinite linear;
}
@keyframes spin {
    0% {
        transform: translate(50%, 50%) rotate(0deg);
    }
    50% {
        transform: translate(50%, 50%) rotate(180deg) scale(1.4);
    }
    100% {
        transform: translate(50%, 50%) rotate(360deg);
    }
}

[player-id="P1"].player-piece {
    background-color: #2eafff;
}

[player-id="P2"].player-piece {
    background-color: #00b550;
}


[player-id="P3"].player-piece {
    background-color: #e51e25; 
}

[player-id="P4"].player-piece {
    background-color: #f7d618; 
}


.player-bases [player-id="P3"].player-base {
    bottom: 0;
    right: 0;
    border-color: #c41318; 
}

.player-bases [player-id="P4"].player-base {
    top: 0;
    left: 0;
    border-color: #d1b40d; 
}

.player-base {
    width: 40%;
    height: 40%;
    border: 30px solid;
    position: absolute;
}

.player-bases [player-id="P1"].player-base {
    bottom: 0;
    left: 0;
    border-color: #1295e7;
}

.player-bases [player-id="P2"].player-base {
    top: 0;
    right: 0;
    border-color: #049645;
}

.player-base.highlight {
    animation: border-blink .7s infinite ease-in-out;
}

@keyframes border-blink {
    50% {
        border-color: rgba(255, 255, 255, 0.8);
    }
}

.btn {
    padding: 8px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.5;
}

.btn-dice {
    background-color: #009d60;
    color: white;
}

.row {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.dice-value {
    font-size: 24px;
    font-weight: bold;
}

/* --- LOBİ VE GİRİŞ EKRANI TASARIMI --- */
body {
    background-color: #1a1a2e; /* Arka planı koyu ve modern bir renge çevirdik */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.hidden {
    display: none !important;
}

.lobby-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: white;
}

.game-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #f1c40f;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.lobby-box {
    background-color: #16213e;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 350px;
    text-align: center;
}

.lobby-box input, .lobby-box select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    outline: none;
}

.team-selection {
    text-align: left;
    margin-bottom: 10px;
}

.team-selection label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #bdc3c7;
}

.btn-create {
    background-color: #27ae60;
    color: white;
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    padding: 12px;
}

.join-section {
    border-top: 1px solid #4a4a4a;
    margin-top: 25px;
    padding-top: 15px;
}

.join-section p {
    color: #bdc3c7;
    margin: 0 0 15px 0;
    font-size: 14px;
}

.btn-join {
    background-color: #2980b9;
    color: white;
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    padding: 12px;
}


.room-info {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    background-color: #16213e;
    padding: 10px;
    border-radius: 8px;
}

/* Lobi Ekranını Tam Sayfa Yapıp İçeriği Merkeze Alıyoruz */
#lobby-screen {
    display: flex;
    justify-content: center; /* Yatay olarak ortala */
    align-items: center;     /* Dikey olarak ortala */
    min-height: 100vh;       /* Ekranın tüm yüksekliğini kapla */
    width: 100vw;            /* Ekranın tüm genişliğini kapla */
    background-color: #12141e; /* İsteğe bağlı: Arka planı lobiden bir tık daha koyu yap */
}

/* --- YENİ AKILLI LOBİ TASARIMI --- */
.lobby-container {
    background-color: #1e2235; /* Arka plan koyu lacivert */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.6);
    width: 350px;
    text-align: center;
    color: white;
}

.lobby-container h1 {
    color: #f1c40f; /* Altın sarısı başlık */
    margin-bottom: 20px;
}

.lobby-container h3 {
    color: #ecf0f1;
    font-size: 16px;
    margin-bottom: 10px;
}

/* Girdi ve Seçim Kutuları */
.lobby-container input[type="text"],
.lobby-container select {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #2a2f4c;
    background-color: #2a2f4c;
    color: white;
    font-size: 15px;
    box-sizing: border-box;
    outline: none;
}

.lobby-container input[type="text"]:focus,
.lobby-container select:focus {
    border: 1px solid #28a745; /* Tıklanınca yeşil sınır */
}

/* Butonlar */
.lobby-container button {
    width: 100%;
    padding: 12px;
    background-color: #28a745; /* Tatlı bir yeşil */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.lobby-container button:hover {
    background-color: #218838;
}

.lobby-container button:active {
    transform: scale(0.98); /* Tıklama efekti */
}

/* Araya Çekilen Çizgi */
.lobby-container hr {
    border: 0;
    height: 1px;
    background-color: #3b4261;
    margin: 25px 0;
}

/* Kilitli (Disabled) Input Görünümü */
.lobby-container input:disabled {
    background-color: #151828;
    color: #7f8c8d;
    cursor: not-allowed;
}