@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header */
#header {
    width: 100%;
    background: #2c3e50;
    color: white;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Kategori Kartları */
.category-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    width: 80%;
    margin-top: 40px;
}

.category-card {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    font-weight: 600;
}

.category-card:hover {
    transform: translateY(-5px);
    background: #3498db;
    color: white;
}

.category-card.finished {
    opacity: 0.5;
    background: #bdc3c7;
    cursor: not-allowed;
    filter: grayscale(1);
    pointer-events: none; /* Tıklamayı engeller */
}

.category-card small {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #7f8c8d;
}
/* Oyun Alanı */
#game-screen {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 90%;
    margin-top: 50px;
    text-align: center;
}

#definition {
    font-size: 1.2rem;
    color: #34495e;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Harf Kutucukları */
.letter-box {
    width: 45px;
    height: 50px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 5px;
    text-align: center;
    text-transform: uppercase;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.letter-box:focus {
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
    outline: none;
}

/* Butonlar */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    margin: 10px;
}

.btn-primary { background: #2ecc71; color: white; }
.btn-primary:hover { background: #27ae60; }
.btn-hint { background: #f1c40f; color: #2c3e50; }
.btn-hint:hover { background: #d4ac0d; }

/* Animasyonlar */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.wrong-answer {
    animation: shake 0.4s ease-in-out;
    border-color: #e74c3c !important;
}

.correct-answer {
    background: #2ecc71 !important;
    color: white !important;
    border-color: #27ae60 !important;
}
#leaderboard-table th, #leaderboard-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}
#leaderboard-table tr:nth-child(even) { background: #f9f9f9; }
#leaderboard-table th { background: #2c3e50; color: white; }
/* Süre Çubuğu Konteynırı */
.timer-wrapper {
    width: 100%;
    height: 12px;
    background-color: #ecf0f1; /* Arka plan gri */
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #ddd;
}

/* Azalan Renkli Çubuk */
#timer-bar {
    width: 100%; /* Başlangıçta tam dolu */
    height: 100%;
    background-color: #27ae60; /* Başlangıçta yeşil */
    transition: width 1s linear, background-color 0.5s; /* Geçiş animasyonu */
}

/* Süre azaldığında çubuk rengini değiştirmek için (Opsiyonel) */
.timer-low {
    background-color: #e74c3c !important; /* Son saniyelerde kırmızı */
}

.timer-medium {
    background-color: #f1c40f !important; /* Orta saniyelerde sarı */
}
/* Doğru cevapta harflerin zıplama efekti */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.correct-anim {
    animation: bounce 0.5s ease infinite;
    background-color: #2ecc71 !important;
    color: white !important;
    border-color: #27ae60 !important;
}

/* Yanlış cevapta kutucukların sallanma efekti */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.wrong-shake {
    animation: shake 0.4s ease-in-out;
    border-color: #e74c3c !important;
}

/* Süre azalırken tiktak efekti (Nabız) */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.timer-critical {
    animation: pulse 0.5s infinite;
    color: #e74c3c !important;
}
/* Mobil İçin Genel Düzenlemeler */
@media (max-width: 600px) {
    #header { padding: 10px; font-size: 14px; flex-direction: column; gap: 10px; text-align: center; }
    .category-container { grid-template-columns: 1fr 1fr; gap: 10px; width: 95%; }
    .letter-box { width: 35px; height: 40px; font-size: 1.2rem; margin: 2px; }
    #game-screen { padding: 15px; width: 95%; margin-top: 10px; }
}

/* Sanal Klavye Stilleri */
.keyboard-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    margin-top: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.key {
    background: #ffffff;
    border: 1px solid #ccc;
    padding: 12px 5px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 0 #ddd;
}

.key:active {
    transform: translateY(2px);
    box-shadow: none;
    background: #eee;
}

.key.wide { grid-column: span 1.5; background: #bdc3c7; }
.key.delete { background: #e74c3c; color: white; }
