/* ============================== */
/* FUN GAMES - Eğlence Bölgesi    */
/* ============================== */

/* Page Container */
.fun-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

/* Header */
.fun-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.fun-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.fun-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.fun-score i {
    width: 18px;
    height: 18px;
}

/* Game Menu */
.fun-menu {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.fun-game-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fun-game-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

.fun-game-card:active {
    transform: scale(0.98);
}

.fun-game-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.fun-game-icon i {
    width: 24px;
    height: 24px;
    color: white;
}

.fun-game-info {
    flex: 1;
    min-width: 0;
}

.fun-game-name {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    margin-bottom: 2px;
}

.fun-game-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fun-game-arrow {
    color: var(--text-muted);
}

.fun-game-arrow i {
    width: 20px;
    height: 20px;
}

/* Game Area */
.fun-game-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.fun-game-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.fun-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.fun-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.fun-back-btn i {
    width: 18px;
    height: 18px;
}

.fun-game-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.fun-game-round {
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(236, 179, 144, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* Loading State */
.fun-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
}

.fun-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: fun-spin 0.8s linear infinite;
}

@keyframes fun-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.fun-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #ef4444;
    text-align: center;
}

.fun-error i {
    width: 48px;
    height: 48px;
}

/* Game Content */
.fun-game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* ========== UNIFIED GAME CARD ========== */
.game-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, rgba(62, 78, 59, 0.8), rgba(43, 58, 40, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.game-badge {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    color: white;
}

.game-question {
    text-align: center;
}

.game-question p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: white;
    margin: 0;
}

.game-big-word {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Blank box */
.blank-box {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px dashed var(--accent);
    border-radius: 6px;
    color: var(--accent);
    font-weight: 700;
    margin: 0 0.25rem;
}

/* Controls */
.game-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.game-input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-align: center;
    transition: all 0.2s;
}

.game-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

.game-input::placeholder {
    color: var(--text-muted);
}

.game-choice-buttons {
    display: flex;
    gap: 0.75rem;
}

.game-choice-buttons .fun-btn {
    flex: 1;
}

/* Buttons */
.fun-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.fun-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.fun-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fun-btn i {
    width: 18px;
    height: 18px;
}

.fun-btn-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.fun-btn-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.fun-btn-purple {
    background: linear-gradient(135deg, #a855f7, #9333ea);
}

.fun-btn-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.fun-btn-next {
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

/* Result */
.game-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    animation: resultPop 0.3s ease;
}

.game-result.correct {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.game-result.wrong {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-icon {
    width: 48px;
    height: 48px;
}

.result-icon i {
    width: 48px;
    height: 48px;
}

.game-result.correct .result-icon {
    color: #22c55e;
}

.game-result.wrong .result-icon {
    color: #ef4444;
}

.result-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: white;
}

@keyframes resultPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (min-width: 600px) {
    .fun-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 600px;
    }

    .fun-game-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .fun-game-arrow {
        display: none;
    }

    .fun-title {
        font-size: 1.75rem;
    }

    .game-card {
        padding: 2rem;
    }

    .game-question p {
        font-size: 1.2rem;
    }
}

/* Desktop */
@media (min-width: 900px) {
    .fun-menu {
        grid-template-columns: repeat(3, 1fr);
        max-width: 800px;
    }

    .game-card {
        max-width: 480px;
    }
}

/* Mobile - Small screens */
@media (max-width: 400px) {
    .fun-page {
        padding: 0.75rem;
    }

    .fun-title {
        font-size: 1.25rem;
    }

    .game-card {
        padding: 1.25rem;
    }

    .game-question p {
        font-size: 1rem;
    }

    .game-big-word {
        font-size: 1.5rem;
    }

    .game-choice-buttons {
        flex-direction: column;
    }

    .fun-btn {
        width: 100%;
        padding: 0.85rem 1rem;
    }
}