/**
 * ÇİZ OYUNU CSS
 */

.ciz-game { --gap: 10px; --radius: 10px; }
.ciz-game * { box-sizing: border-box; }
.ciz-game .wrap {
    margin-bottom: 10px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #222;
}
.ciz-game .area {
    position: relative;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    padding: 16px;
}

/* Konu Başlığı */
.ciz-topic-header {
    margin-bottom: 15px;
}

.ciz-topic-title {
    background-color: #f2f2f2;
    padding: 18px 0px;
    border-radius: 10px;
    font-size: 28px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    color: #1f2937;
}

/* Hata Mesajı Alanı */
.ciz-game .error-message-area {
    min-height: 24px;
    margin-bottom: 10px;
}

.ciz-game .error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: 10px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    animation: shakeError 0.5s ease;
}

.ciz-game .error-message i {
    font-size: 16px;
}

.ciz-game .error-message.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
    color: #b45309;
}

.ciz-game .error-message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #6ee7b7;
    color: #059669;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Kelime Listesi */
.ciz-word-list-container {
    margin-bottom: 15px;
}

.ciz-word-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.ciz-word-list li {
    padding: 8px 14px;
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ciz-word-list li.found {
    color: #9ca3af;
    background: #f3f4f6;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

/* Izgara (Grid) Bölümü */
#grid-area {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    padding: 0px;
    position: relative;
    width: 100%;
    border-radius: 10px;
    aspect-ratio: 1;
    background-color: #ffffff;
}

/* SVG overlay for drawing lines */
#line-overlay,
#select-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

#select-overlay {
    z-index: 10;
}

/* Bulunan kelimelerin çizgileri */
.word-line {
    fill: none;
    stroke-width: 44;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
}

/* Seçim çizgisi */
.word-line.selecting {
    stroke: rgba(102, 126, 234, 0.6);
    stroke-width: 44;
}

.word-line.color-1 { stroke: #ff6b6b; }
.word-line.color-2 { stroke: #4ecdc4; }
.word-line.color-3 { stroke: #a78bfa; }
.word-line.color-4 { stroke: #34d399; }
.word-line.color-5 { stroke: #f472b6; }

.cell {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(14px, 3.5vw, 28px);
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    background-color: #f8f9fa;
    color: #1f2937;
    transition: all 0.15s ease;
}

.cell:hover {
    background-color: #e9ecef;
    transform: scale(1.02);
}

.cell.selected {
    background-color: rgba(102, 126, 234, 0.3) !important;
    color: #1f2937;
    transform: scale(1.02);
}

.cell.found {
    background-color: #f8f9fa;
    color: #1f2937;
    font-weight: 800;
}

.cell.found:hover {
    background-color: #e9ecef;
    transform: scale(1.02);
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes lineDraw {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

.word-line.animate {
    stroke-dasharray: 1000;
    animation: lineDraw 0.4s ease forwards;
}

/* Game Container */
.ciz-game .game-container {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    user-select: none;
}

/* Responsive */
@media (max-width: 768px) {
    .cell {
        font-size: clamp(12px, 4vw, 20px);
    }

    .word-line {
        stroke-width: 30;
    }

    .word-line.selecting {
        stroke-width: 30;
    }
}

/* === MOLA EKRANI === */
.ciz-game .break-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.ciz-game .break-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ciz-game .break-title {
    font-size: 28px;
    font-weight: 700;
    color: #22c55e;
    margin: 0 0 10px 0;
}

.ciz-game .break-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 30px 0;
}

.ciz-game .break-subtitle span {
    font-weight: 700;
    color: #3b82f6;
}

.ciz-game .break-timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.ciz-game .break-timer-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 10px 30px rgba(59, 130, 246, 0.6); }
}

.ciz-game .break-timer-circle span {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
}

.ciz-game .break-timer-text {
    margin-top: 10px;
    font-size: 14px;
    color: #9ca3af;
}

.ciz-game .break-skip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.ciz-game .break-skip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.ciz-game .break-skip-btn:active {
    transform: translateY(0);
}


