@font-face {
    font-family: 'BpmfZihiKaiStd-Regular';
    src: url('https://cdn.jsdelivr.net/gh/tadlearn/webfonts/BpmfZihiKaiStd-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --bg-color: #f5f7fa;
    --text-color: #333;
    --border-color: #ddd;
    --card-bg: #fff;
    --core-color: #ff9800;
    --extra-color: #4caf50;
    --focus-ring: 0 0 0 3px rgba(74, 144, 226, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "BpmfZihiKaiStd-Regular", "字嗨注音標楷體", "Helvetica Neue", Helvetica, Arial, "PingFang TC", "Heiti TC", "Microsoft JhengHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header styles removed, replaced by main-title */
.main-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

/* Removed old select filters styles */

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.filter-panel-container {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.filter-panel-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.filter-columns {
    display: flex;
    gap: 2rem;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
}

.filter-col {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.filter-label {
    font-weight: bold;
    min-width: 60px;
    text-align: right;
    padding-top: 0.5rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.filter-buttons button {
    padding: 0.5rem 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
}

.filter-buttons button:hover {
    background-color: #e9ecef;
}

.filter-buttons button:focus {
    box-shadow: var(--focus-ring);
}

.filter-buttons button[aria-pressed="true"] {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.volume-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.volume-row {
    display: flex;
    gap: 0.5rem;
}

.game-area {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-height: 300px;
}

.game-section {
    margin-bottom: 2.5rem;
}

.game-section:last-child {
    margin-bottom: 0;
}

.game-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.25rem;
}

.game-section.core h3 {
    color: var(--core-color);
    border-bottom-color: var(--core-color);
}

.game-section.extra h3 {
    color: var(--extra-color);
    border-bottom-color: var(--extra-color);
}

.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.game-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s;
    outline: none;
}

.game-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #fff;
    border-color: var(--primary-hover);
}

.game-link:focus {
    box-shadow: var(--focus-ring);
}

.game-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.core .game-number {
    background-color: var(--core-color);
}

.extra .game-number {
    background-color: var(--extra-color);
}

.empty-state, .error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    font-size: 1.1rem;
}

.error-state {
    color: #d32f2f;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .filter-columns {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .filter-col {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .filter-row {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .filter-label {
        text-align: center;
        padding-top: 0;
    }
    .volume-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    .filter-buttons {
        justify-content: center;
    }
    .game-area {
        padding: 1rem;
    }
    .game-list {
        grid-template-columns: 1fr;
    }
}

/* Progress Tracker Styles */
.game-link.completed-today {
    background-color: #fff3e0; /* light orange */
    border-color: #ff9800;
}

.game-link.completed-today:hover {
    background-color: #ffe0b2;
}

.game-link.completed-week {
    background-color: #e8f5e9; /* light green */
    border-color: #4caf50;
}

.game-link.completed-week:hover {
    background-color: #c8e6c9;
}

.completion-badge {
    margin-left: auto; /* push to right */
    background-color: #ff9800;
    color: white;
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-link.completed-week .completion-badge {
    background-color: #4caf50;
}

.encouragement-text {
    font-size: 1rem;
    color: #e65100;
    margin-left: 15px;
    font-weight: normal;
}
