/* sirala.css - SADECE SIRALA OYUN TASARIMI */

/* Sirala oyunu için özel değişkenler */
.sirala-game { --gap: 10px; --radius: 10px; }

/* Sadece oyun alanını etkileyen stiller */
.sirala-game * { box-sizing: border-box; }

/* iki sütun: sol oyun, sağ panel - sadece sirala alanında */
.sirala-game .layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
@media (max-width: 900px) { .sirala-game .layout { grid-template-columns: 1fr; } }


.sirala-game .bilgi_sag {
    position: relative;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    padding: 16px;
}


.sirala-game .bilgi_sag {
    padding: 12px;
}

.sirala-game .btn {
    border: 0; padding: 10px 14px; border-radius: var(--radius);
    color: #fff; background: #2e6cff; cursor: pointer; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.sirala-game .btn:disabled { opacity: .5; cursor: not-allowed; }

/* BAŞLAT BUTONU */
.sirala-game .start-game-btn {
    width: 100%; padding: 18px; font-size: 18px;
    background: #22c55e; margin-bottom: 20px;
}

/* BAŞLAT BUTONU HER ZAMAN AKTİF */
.sirala-game .game-not-started .start-game-btn,
.sirala-game .game-not-started #startGameBtn {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* OYUN DURUMU - SLOTS VE FEEDBACK PAZİF AMA KELİMELER AKTİF */
.sirala-game .game-not-started .slots {
    opacity: 0.6;
    pointer-events: none;
}

.sirala-game .game-not-started .feedback {
    opacity: 0.6;
    pointer-events: none;
}

.sirala-game .game-not-started .dock,
.sirala-game .game-not-started .targets,
.sirala-game .game-not-started .timewrap {
    display: none !important;
}

/* Oyun başlamamış ise gizlenecek alanlar */
.sirala-game .game-not-started #dock,
.sirala-game .game-not-started #targets,
.sirala-game .game-not-started #timebar,
.sirala-game .game-not-started .timewrap {
    display: none !important;
}

.sirala-game .rule-item {
    margin-bottom: 8px;
    font-size: 14px;
}


/* ÜST ALAN */
.sirala-game .slots {
    display: flex; gap: var(--gap); justify-content: center; flex-wrap: wrap; margin-bottom: 14px;
}
.sirala-game .slot {
    position: relative; padding: 2px; flex: 0 0 auto; width: 120px; height: 48px;
    border: 1px dashed #d7d7d7; border-radius: var(--radius); background: #fafafa;
    display: flex; align-items: stretch; justify-content: stretch;
    transition: border-color .15s, background .15s, transform .15s;
    overflow: hidden; box-sizing: border-box; will-change: transform, background-color, border-color;
    margin: 0 1px; /* Sağda ve solda biraz margin ekle taşmayı önle */
}
.sirala-game .slot.over   { border-color: #999; background: #eef3ff; font-weight: 100; font-size: 15px; }
.sirala-game .slot.filled { border-style: solid; }
.sirala-game .slot.magnet { border-color: #2e6cff; background: #eef3ff; transform: scale(1.02); }

.sirala-game .slot .word {
    width: 100%; height: 100%; margin: 0; border-radius: inherit;
    display: flex; align-items: center; justify-content: center;
    border: 0; box-shadow: none; transform: translateZ(0); cursor: pointer;
    font-weight: 600;
}
.sirala-game .slot .word.snap-in { transform: scale(0.85); opacity: 0; transition: transform .18s ease, opacity .18s ease; }

.sirala-game .slot .ghost {
    width: 100%; height: 100%; border-radius: inherit; display:flex; align-items:center; justify-content:center;
    pointer-events: none; opacity: .35; border: 1px dashed #9aaee6; background: #dfe9ff;
    font-weight: 100; font-size: 15px; user-select: none;
}
.sirala-game .slot .ghost { pointer-events: none; }

/* Bırakınca renk (klon) - Turuncu */
.sirala-game .word.in-slot { background: #f97316 !important; color: #fff !important; }
.sirala-game .word.in-slot.snap-in { background: #f97316 !important; color: #fff !important; }
.sirala-game .word.used { opacity: .45; filter: grayscale(40%); cursor: default; }

/* ALT ALAN */
.sirala-game .pool {
    display: flex; flex-wrap: wrap; gap: var(--gap); justify-content: center; margin: 26px 0 4px;
}
.sirala-game .pool .word { min-width: 110px; }

/* kelime butonu (kaynak) */
.sirala-game .word {
    user-select: none; border: 1px solid #cfd7ff; background: #f0f4ff;
    padding: 10px 12px; border-radius: var(--radius); font-weight: 100; font-size: 15px;
    cursor: grab; text-align: center; outline: none; min-width: 110px;
}
.sirala-game .word:focus, .sirala-game .word:focus-visible { outline: none; }
.sirala-game .word:active { cursor: grabbing; }
.sirala-game .word.dragging { background: #ddd !important; opacity: 0.5; }

/* Tıklama ile yerleştirme için hover efekti */
.sirala-game .word:not(.used):hover { background: #e0e7ff; border-color: #a5b4fc; }


/* Sağ panel - dock ve HUD */
.sirala-game .dock { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; justify-content: center; width: 100%; }
.sirala-game .dock .msg { flex-basis: 100%; text-align: center; margin-top: 4px; font-weight: 700; }
.sirala-game .ok { color: #0a7a28; text-align: center; font-size: 16px; width: 100%; display: block; padding: 50px 0; font-weight: 500; }
.sirala-game .no { color: #b4002f; text-align: center; font-size: 16px; width: 100%; display: block; padding: 50px 0; font-weight: 500; }
.sirala-game .legend { font-size: 13px; color: #555; margin: 8px 0 0; text-align: center; margin-top: 40px; }
.sirala-game .mark-ok  { outline: 2px solid #22c55e; background: #ecfdf5; }
.sirala-game .mark-bad { outline: 2px solid #ef4444; background: #fef2f2; }

/* Sidebar istatistik kartları (Taboo stili) */
.sirala-game .target-card {
    background: #f8f9fa;
    border: 1px solid #e7e7e7;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.sirala-game .target-card .k {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
}
.sirala-game .target-card .v {
    font-weight: 800;
    font-size: 20px;
    word-break: break-word;
    color: #667eea;
}


/* Overlay (loading) - ESKİ OVERLAY, KALDIRILACAK */
.sirala-game .area .overlay {
    position: absolute; inset: 0; background: rgba(255,255,255,.8); backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 3; text-align: center; padding: 16px;
}
.sirala-game .area.busy .overlay { display: flex; }
.sirala-game .overlay .spinner {
    width: 36px; height: 36px; border: 3px solid #cfd7ff; border-top-color: #2e6cff;
    border-radius: 50%; animation: spin 0.9s linear infinite; margin-bottom: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sirala-game .overlay .txt { font-weight: 700; color: #1e2a5a; }
.sirala-game .area.busy .slots, .sirala-game .area.busy .pool { pointer-events: none; user-select: none; filter: grayscale(15%) contrast(95%); }
.sirala-game .buttons-busy .btn { pointer-events: none; }

/* SOL ALAN BİTTİ DIV'İ */
.sirala-game .game-end-div {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 0px;
    text-align: center;
    padding-bottom: 5px;
}

.sirala-game .game-end-title {
    font-size: 20px;
    font-weight: 700;
    color: #2e6cff;
    margin-bottom: 10px;
}


.sirala-game .game-end-reason {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.sirala-game .game-end-stats {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto;
    max-width: 400px;
}

/* === ZORLUK SEÇİMİ STILLERI === */
.sirala-game .difficulty-selection {
    padding: 15px;
    text-align: center;
}

.sirala-game .difficulty-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.sirala-game .difficulty-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.sirala-game .difficulty-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}

.sirala-game .difficulty-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 600px) {
    .sirala-game .difficulty-card {
        padding: 10px 12px;
        gap: 8px;
    }
}

.sirala-game .difficulty-card:hover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: translateY(-1px);
}

.sirala-game .difficulty-card.selected {
    border-color: #28a745;
    background: #d4edda;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.sirala-game .difficulty-card-champion {
    background: #fff3cd;
    border-color: #ffc107;
}

.sirala-game .difficulty-card-champion:hover {
    border-color: #ff8c00;
    background: #ffeaa7;
}

.sirala-game .difficulty-card-champion.selected {
    background: #ffeaa7;
    border-color: #ff8c00;
}

.sirala-game .difficulty-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.sirala-game .difficulty-content {
    flex: 1;
}

.sirala-game .difficulty-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.sirala-game .difficulty-description {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

/* === OYUN KONTROL STİLLERİ === */
.sirala-game .game-controls {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    padding-top: 20px;
}

.sirala-game .game-controls .dock {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.sirala-game .game-controls .btn {
    flex: 1;
    max-width: 120px;
}


/* SOL ALAN BAŞLA DIV'İ */
.sirala-game .game-start-div {
    display: none;

}

.sirala-game .game-start-title {
    font-size: 18px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 10px;
}

.sirala-game .game-start-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.sirala-game .game-start-info {
    font-size: 12px;
    color: #888;
    text-align: left;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    line-height: 1.5;
}

/* SOL ALAN OYUN DIV'İ */
.sirala-game .game-play-div {
    display: none;
}

/* Loading Overlay */
.sirala-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 40px 20px;
}

.sirala-loading-content {
    text-align: center;
}

.sirala-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: sirala-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes sirala-spin {
    to { transform: rotate(360deg); }
}

.sirala-loading-text {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

