/* 問題選択画面専用CSS */

/* 言語切り替えボタン */
.lang-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lang-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.lang-toggle:active {
    transform: scale(0.95);
}

.difficulty-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s;
    color: #666;
}

.tab-btn .progress-text {
    font-size: 0.8em;
    font-weight: normal;
    color: #999;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.tab-btn.active .progress-text {
    color: rgba(255,255,255,0.8);
}

.tab-btn:hover:not(.active) {
    background: #e3f2fd;
    border-color: #667eea;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.puzzle-card {
    aspect-ratio: 1;
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.puzzle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.puzzle-card.cleared {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #4caf50;
}

.puzzle-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.puzzle-card.cleared .puzzle-number {
    color: #2e7d32;
}

.clear-badge {
    font-size: 2em;
    margin-bottom: 5px;
}

.best-time {
    font-size: 0.9em;
    color: #666;
    font-weight: bold;
}

.puzzle-card.cleared .best-time {
    color: #2e7d32;
}

.not-cleared {
    font-size: 0.8em;
    color: #999;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .puzzle-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .difficulty-tabs {
        gap: 5px;
    }

    .tab-btn {
        padding: 8px 5px;
        font-size: 0.75em;
        border-radius: 8px;
    }

    .tab-btn .progress-text {
        font-size: 0.85em;
    }

    .puzzle-number {
        font-size: 1.2em;
    }

    .best-time {
        font-size: 0.8em;
    }
}
