/* Game Info */
.game-info {
    text-align: center;
    margin-bottom: 30px;
}

.puzzle-header {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.mode-indicators {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.mode-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    text-align: center;
}

.mode-btn:hover {
    border-color: var(--accent-color);
    background-color: rgba(83, 141, 78, 0.05);
}

.mode-btn.active {
    border-color: var(--accent-color);
    background-color: rgba(83, 141, 78, 0.1);
}

.mode-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--surface-color);
    border-color: var(--border-color);
}

.mode-btn.disabled:hover {
    border-color: var(--border-color);
    background-color: var(--surface-color);
    transform: none;
}

.mode-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.mode-description {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.mode-note {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.8;
    display: block;
    margin-top: 4px;
    font-style: italic;
}

.mode-btn.active .mode-label {
    color: var(--accent-color);
}

.mode-btn.active .mode-description {
    color: var(--accent-color);
    opacity: 0.8;
}

.mode-btn.disabled .mode-label,
.mode-btn.disabled .mode-description {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Chess Grid */
.chess-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 4px;
    max-width: 350px;
    margin: 0 auto 30px;
    aspect-ratio: 1;
    padding: 10px;
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.chess-cell {
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 60px;
}

.chess-cell:hover:not(.blocked):not(.prefilled) {
    border-color: var(--accent-color);
    transform: scale(1.02);
}

.chess-cell.blocked {
    background-color: var(--primary-color);
    cursor: not-allowed;
    border-color: var(--primary-color);
}

.chess-cell.prefilled {
    background-color: var(--secondary-color);
    color: white;
    cursor: not-allowed;
    border-color: var(--secondary-color);
}

.chess-cell.filled {
    background-color: #6BB6FF;
    color: white;
    border-color: #6BB6FF;
}

.chess-cell.hint {
    background-color: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.chess-cell.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(83, 141, 78, 0.3);
    transform: scale(1.05);
}

.chess-cell.invalid {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Letter Pool */
.letter-pool-container {
    margin-bottom: 30px;
}

.letter-pool-container h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-secondary);
}

.letter-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 100px;
    padding: 20px;
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.letter-tile {
    width: 45px;
    height: 45px;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    user-select: none;
}

.letter-tile:hover:not(.used) {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.letter-tile.used {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: var(--surface-color);
}

.letter-tile.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(83, 141, 78, 0.3);
    transform: translateY(-2px) scale(1.05);
    background-color: rgba(83, 141, 78, 0.1);
}

.letter-tile .count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-color);
}

.hard-mode .count-badge {
    display: none;
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.control-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.control-btn:hover {
    background-color: var(--border-color);
    transform: translateY(-1px);
}

.control-btn.primary {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.control-btn.primary:hover {
    background-color: #4a7c47;
    border-color: #4a7c47;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .chess-grid {
        max-width: 300px;
    }
    
    .chess-cell {
        font-size: 20px;
        min-height: 50px;
    }
    
    .letter-tile {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .control-btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .chess-grid {
        max-width: 280px;
    }
    
    .chess-cell {
        font-size: 18px;
        min-height: 45px;
    }
    
    .letter-tile {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}
