/* word_puzzle.css */
/* Kelime bulmaca oyunu – mevcut puzzle.css temasına saygılı, sadece layout ve minimal ek stiller */

/* Ana layout: Sol ızgara, sağda sidebar */
.wp-game-layout {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1.7fr);
    gap: 18px;
}

/* Sol blok: ızgara + ipucu + kurallar */
.wp-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Harf ızgarası kabı – puzzle canvas kutusuna benzer, ama tema r2 üzerinden geliyor */
.wp-grid-inner {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(246, 216, 122, 0.25);
    background: #020402;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

#wpGridCanvas {
    display: block;
    width: 100%;
    height: auto;
}

/* HTML overlay grid – seçilen hücreleri highlight etmek için */
.wp-grid-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    pointer-events: none;
}

.wp-cell-highlight {
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(246, 216, 122, 0.9);
    background: rgba(246, 216, 122, 0.16);
}
.wp-cell-found {
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(246, 216, 122, 0.9);
    background: rgba(246, 216, 122, 0.28); /* Bulunan kelime: daha belirgin */
}

/* Yükleniyor overlay */
.wp-loading {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 3;
}

.wp-loading p {
    margin: 0;
    font-size: 12px;
    color: #f7f4e6;
}

/* Sağ blok: durum, kelime listesi, lore */
.wp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Kart başlıkları biraz küçüldü */
.wp-card-stats h3,
.wp-card-words h3,
.wp-card-info h3 {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--r2-gold, #f6d87a);
}

.wp-words-note {
    margin: 0 0 8px;
    font-size: 11px;
    color: var(--r2-text-muted, #a3b09a);
}

/* Kelime listesi */
.wp-word-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 11px;
}

.wp-word-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.wp-word-item:last-child {
    border-bottom: none;
}

.wp-word-text {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wp-word-status {
    font-size: 9px;
    color: var(--r2-text-muted, #94a3b8);
}

/* Bulunan kelime highlight */
.wp-word-item.found .wp-word-text {
    color: #bbf7d0;
}

.wp-word-item.found .wp-word-status {
    color: #bbf7d0;
}

/* İpucu / kurallar kutuları: var olan r2-hint tasarımını bozma, sadece marjin ver */
.wp-hint {
    margin-top: 4px;
}

.wp-rules {
    margin-top: 6px;
}

/* Buton grubu */
.wp-controls {
    margin-top: 10px;
}

/* Responsive – küçük ekranlarda üst üste */
@media (max-width: 900px) {
    .wp-game-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Etkinlik pasif overlay (ızgarayı karartma) */
.wp-inactive-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(21 30 11), rgba(11 15 7));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    z-index: 4;
}

.wp-inactive-title {
    margin: 0 0 6px;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f6d87a;
}

.wp-inactive-text {
    margin: 0;
    font-size: 12px;
    color: #cbd5f5;
}

/* Sağ kartları hafif karartma */
.wp-card-disabled {
    opacity: 0.6;
    filter: grayscale(0.4);
}

/* --- YENİ EKLENEN ŞIK GİRİŞ EKRANI TASARIMI --- */

.wp-start-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 12, 3, 0.85); /* Hafif karartma */
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: wpFadeIn 0.3s ease-out;
}

@keyframes wpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wp-start-box {
    width: 340px;
    padding: 30px 24px;
    border-radius: 26px;
    /* Altın çerçeve ve koyu yeşil gradyan */
    border: 1px solid rgba(246, 216, 122, 0.35);
    background: radial-gradient(circle at top, rgba(246, 216, 122, 0.12), transparent 70%),
                rgba(10, 16, 4, 0.96);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85),
                0 0 20px rgba(246, 216, 122, 0.1);
    text-align: center;
    position: relative;
}

.wp-start-title {
    margin: 0 0 8px;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    color: #f6d87a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.wp-start-desc {
    margin: 0 0 24px;
    font-size: 13px;
    color: #b8c08f;
    line-height: 1.5;
}

.wp-input-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wp-nick-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(3, 7, 18, 0.6);
    color: #f7f4e6;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
}

.wp-nick-input:focus {
    border-color: #f6d87a;
    box-shadow: 0 0 15px rgba(246, 216, 122, 0.25);
    background: rgba(3, 7, 18, 0.9);
    transform: scale(1.02);
}

.wp-btn-start {
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #0a100c 0%, #0a3c14 100%);
    color: #f7f4e6;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(10, 60, 20, 0.4);
    text-transform: uppercase;
}

.wp-btn-start:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 60, 20, 0.6);
    border-color: rgba(246, 216, 122, 0.4);
}

.wp-btn-start:active {
    transform: translateY(0);
}

/* Liderlik Tablosu Nick Sütunu İçin Ek */
.r2-leaderboard-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    margin-left: 8px;
}
.r2-lb-nick {
    font-size: 13px;
    font-weight: 600;
    color: #f7f4e6;
}
.r2-leaderboard-date {
    font-size: 11px;
    color: #64748b;
    margin-left: auto;
}