/* uc.css - SADECE UÇ (Kelime Bulma) OYUN TASARIMI */

/* Uc oyunu için özel değişkenler */
.uc-game {
    --primary-glow: #FFD700; /* Altın sarısı */
    --secondary-glow: #FFA500; /* Turuncu destek */
    --letter-bg: #f0f0f3;
    --letter-shadow-light: #ffffff;
    --letter-shadow-dark: #aeaec0;
}


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

/* Oyun alanı (area) stilleri */
.uc-game .area {
    position: relative;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    padding: 20px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Üstte Kelime Oluşma Alanı */
.uc-game #word-container {
    height: 70px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    width: 100%;
}

.uc-game .current-word {
    font-size: 36px;
    font-weight: 800;
    color: #333;
    padding: 12px 30px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    min-width: 180px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 2px;
    border: 2px solid #e0e0e0;
}

/* Başarılı/Hatalı Durumları */
.uc-game .current-word.success {
    background-color: #43A047 !important;
    color: white !important;
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 15px 30px rgba(67, 160, 71, 0.4);
    border-color: #43A047;
}

.uc-game .current-word.error {
    background-color: #E53935 !important;
    color: white !important;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #E53935;
}


@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Oyun Alanı (Daire) - Border kaldırıldı */
.uc-game #game-area {
    position: relative;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: transparent;
    margin: auto;
}

/* Çizgi Katmanı (SVG) */
.uc-game #line-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    filter: url(#glow-filter);
}

/* Çizgi Stilleri */
.uc-game .connector-line {
    fill: none;
    stroke: #FFA500;
    stroke-width: 14;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
    transition: all 0.1s ease;
}

/* Harfler (Neumorphism) */
.uc-game .letter-node {
    width: 80px;
    height: 80px;
    background: var(--letter-bg);
    box-shadow: 8px 8px 16px var(--letter-shadow-dark),
                -8px -8px 16px var(--letter-shadow-light);
    border-radius: 50%;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 34px;
    font-weight: 700;
    color: #444;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    border: 4px solid transparent;
    touch-action: none;
    user-select: none;
}

.uc-game .letter-node:hover {
    transform: scale(1.05);
}

/* Seçili Harf */
.uc-game .letter-node.selected {
    color: #fff;
    background: var(--secondary-glow);
    border-color: var(--primary-glow);
    box-shadow: 0 0 15px var(--primary-glow),
                inset 0 0 10px rgba(0,0,0,0.2);
    transform: scale(1.15);
}

/* Kullanılmış/Tamamlanmış Harf */
.uc-game .letter-node.used {
    opacity: 0.3;
    pointer-events: none;
    background: #d0d0d0;
}

/* Tahmin Edilebilir Kelimeler Listesi (Oyun alanının altında) */
.uc-game .target-words-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    width: 100%;
    max-width: 400px;
    margin: 20px auto 0 auto;
}

.uc-game .target-words-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.uc-game .target-words-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.uc-game .target-word-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 14px;
    background: #fff;
    border-radius: 20px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    min-height: 38px;
}

.uc-game .target-word-item.found {
    background: #d4edda;
    border-color: #28a745;
}

.uc-game .target-word-item.found .word-letter {
    color: #155724;
    font-weight: 700;
}

.uc-game .word-letter {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    display: inline-block;
}

.uc-game .word-dot {
    width: 10px;
    height: 10px;
    background: #adb5bd;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
}

.uc-game .target-word-item.found .word-dot {
    display: none;
}

/* SVG Definitions (gradient and filter) */
.uc-game svg#svg-defs {
    position: absolute;
    width: 0;
    height: 0;
}

/* Responsive - 500px altı */
@media (max-width: 500px) {
    .uc-game .area {
        padding: 15px 5px;
    }

    .uc-game #game-area {
        width: 100%;
        height: calc(100vw - 30px);
        max-width: none;
        max-height: none;
        min-width: 200px;
        min-height: 200px;
    }

    .uc-game .letter-node {
        width: clamp(50px, 14vw, 70px);
        height: clamp(50px, 14vw, 70px);
        font-size: clamp(20px, 6vw, 28px);
    }

    .uc-game .current-word {
        font-size: 24px;
        min-width: 120px;
        padding: 8px 16px;
    }


    .uc-game #word-container {
        height: 60px;
        margin-bottom: 20px;
    }

    .uc-game .target-words-container {
        margin-top: 20px;
        padding: 15px;
        max-width: 100%;
    }

    .uc-game .target-word-item {
        padding: 6px 10px;
        gap: 3px;
    }

    .uc-game .word-dot {
        width: 8px;
        height: 8px;
        margin: 3px 0;
    }

    .uc-game .word-letter {
        font-size: 12px;
        width: 14px;
        height: 14px;
        line-height: 14px;
    }
}

/* 400px altı ekranlar */
@media (max-width: 400px) {
    .uc-game .area {
        padding: 12px 5px;
    }

    .uc-game #game-area {
        width: 100%;
        height: calc(100vw - 25px);
        max-width: none;
        max-height: none;
        min-width: 180px;
        min-height: 180px;
    }

    .uc-game .letter-node {
        width: clamp(44px, 12vw, 60px);
        height: clamp(44px, 12vw, 60px);
        font-size: clamp(18px, 5vw, 24px);
        border-width: 2px;
    }

    .uc-game .connector-line {
        stroke-width: 10;
    }

    .uc-game .current-word {
        font-size: 20px;
        min-width: 100px;
        padding: 6px 12px;
    }

    .uc-game #word-container {
        height: 50px;
        margin-bottom: 15px;
    }

    .uc-game .target-words-container {
        margin-top: 15px;
        padding: 12px;
    }

    .uc-game .target-word-item {
        padding: 5px 8px;
        gap: 2px;
    }

    .uc-game .word-dot {
        width: 5px;
        height: 5px;
    }

    .uc-game .word-letter {
        font-size: 12px;
        min-width: 8px;
    }

    .uc-game .target-words-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
}

/* 320px altı (çok küçük ekranlar) */
@media (max-width: 320px) {
    .uc-game .area {
        padding: 10px 3px;
    }

    .uc-game #game-area {
        width: 100%;
        height: calc(100vw - 20px);
        max-width: none;
        max-height: none;
        min-width: 160px;
        min-height: 160px;
    }

    .uc-game .letter-node {
        width: clamp(38px, 11vw, 50px);
        height: clamp(38px, 11vw, 50px);
        font-size: clamp(16px, 4.5vw, 22px);
        border-width: 2px;
    }

    .uc-game .connector-line {
        stroke-width: 8;
    }

    .uc-game .current-word {
        font-size: 18px;
        min-width: 80px;
        padding: 5px 10px;
        letter-spacing: 1px;
    }

    .uc-game #word-container {
        height: 45px;
        margin-bottom: 10px;
    }

    .uc-game .target-words-container {
        margin-top: 12px;
        padding: 10px;
    }

    .uc-game .target-word-item {
        padding: 4px 6px;
        gap: 2px;
        border-radius: 15px;
    }

    .uc-game .word-dot {
        width: 4px;
        height: 4px;
    }

    .uc-game .word-letter {
        font-size: 11px;
        min-width: 7px;
    }

    .uc-game .target-words-title {
        font-size: 13px;
        margin-bottom: 8px;
    }
}

/* 280px altı (en küçük ekranlar) */
@media (max-width: 280px) {
    .uc-game .area {
        padding: 8px 4px;
    }

    .uc-game #game-area {
        width: calc(100vw - 30px);
        height: calc(100vw - 30px);
        max-width: 220px;
        max-height: 220px;
        min-width: 140px;
        min-height: 140px;
    }

    .uc-game .letter-node {
        width: clamp(28px, 8vw, 36px);
        height: clamp(28px, 8vw, 36px);
        font-size: clamp(10px, 3vw, 14px);
        border-width: 1px;
        box-shadow: 3px 3px 6px var(--letter-shadow-dark),
                    -3px -3px 6px var(--letter-shadow-light);
    }

    .uc-game .connector-line {
        stroke-width: 6;
    }

    .uc-game .current-word {
        font-size: 16px;
        min-width: 70px;
        padding: 4px 8px;
        letter-spacing: 0;
        border-radius: 10px;
    }

    .uc-game #word-container {
        height: 40px;
        margin-bottom: 8px;
    }

    .uc-game .target-words-container {
        margin-top: 10px;
        padding: 8px;
        border-radius: 8px;
    }

    .uc-game .target-word-item {
        padding: 3px 5px;
        gap: 1px;
        border-radius: 12px;
        border-width: 1px;
    }

    .uc-game .word-dot {
        width: 3px;
        height: 3px;
    }

    .uc-game .word-letter {
        font-size: 10px;
        min-width: 6px;
    }

    .uc-game .target-words-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .uc-game .target-words-grid {
        gap: 6px;
    }
}

/* Bonus Popup Animasyonu */
@keyframes bonusPopup {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%) scale(0.8);
    }
}

/* İpucu Popup Animasyonu */
@keyframes hintPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%) scale(0.8);
    }
}

/* İpucu ile açılan harf stili */
.uc-game .word-letter.hint-revealed {
    color: #10b981;
    animation: hintLetterReveal 0.5s ease-out;
}

@keyframes hintLetterReveal {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Zorluk Seçimi Stilleri */
.uc-game .difficulty-selection {
    padding: 15px 0;
}

.uc-game .difficulty-title {
    font-size: 16px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center;
}

.uc-game .difficulty-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uc-game .difficulty-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.uc-game .difficulty-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.uc-game .difficulty-card.selected {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.uc-game .difficulty-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.uc-game .difficulty-icon {
    font-size: 24px;
    margin-right: 12px;
}

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

.uc-game .difficulty-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.uc-game .difficulty-description {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* Ceza Animasyonu */
@keyframes penaltyShake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-50%, -50%) rotate(-5deg); }
    20%, 40%, 60%, 80% { transform: translate(-50%, -50%) rotate(5deg); }
}

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

/* Cezalı Harf Durumu */
.uc-game .letter-node.penalized {
    opacity: 0.4;
    transform: scale(0.9);
    pointer-events: none;
    background: linear-gradient(145deg, #ffcccc, #ff9999) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
}

/* Karıştır Butonu */
.uc-game .shuffle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.uc-game .shuffle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.uc-game .shuffle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.uc-game .shuffle-btn i {
    font-size: 16px;
}

@media (max-width: 480px) {
    .uc-game .shuffle-btn {
        padding: 8px 18px;
        font-size: 13px;
    }
}
