.app {
    width: 100%;
    max-width: 650px;
    background: white;
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

/* -------------------------
    DASHBOARD
------------------------- */

.dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.stat-card {
    background: #f6f7ff;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
}

.stat-number {
    font-size: 26px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #777;
    font-size: 13px;
    margin-top: 4px;
}

/* -------------------------
    SETUP
------------------------- */

.setup h2 {
    text-align: center;
    margin-bottom: 15px;
}

.tables {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 9px;
    margin-bottom: 20px;
}

.table-button {
    border: none;
    padding: 11px 5px;
    border-radius: 12px;
    background: #f0f0f0;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.table-button:hover {
    transform: translateY(-2px);
    background: #e2e2ff;
}

.table-button.selected {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 10px rgba(102,126,234,0.4);
}

.button-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.small-button {
    border: none;
    background: #eee;
    padding: 9px 15px;
    border-radius: 20px;
    cursor: pointer;
}

.start-button,
.next-button,
.restart-button {
    border: none;
    background: #667eea;
    color: white;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.start-button:hover,
.next-button:hover,
.restart-button:hover {
    transform: scale(1.05);
    background: #5568d9;
}

/* -------------------------
    GAME
------------------------- */

.game {
    display: none;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #666;
    font-weight: bold;
}

.progress-container {
    height: 10px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 35px;
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
}

.question-card {
    text-align: center;
}

.question {
    font-size: 58px;
    font-weight: bold;
    margin: 20px 0 30px;
}

.answer-input {
    width: 180px;
    padding: 15px;
    border: 3px solid #ddd;
    border-radius: 15px;
    font-size: 30px;
    text-align: center;
    outline: none;
}

.answer-input:focus {
    border-color: #667eea;
}

.submit-button {
    display: block;
    margin: 20px auto;
    border: none;
    background: #22c55e;
    color: white;
    padding: 13px 35px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.submit-button:hover {
    background: #16a34a;
}

.feedback {
    min-height: 55px;
    font-size: 21px;
    font-weight: bold;
    margin: 15px 0;
}

.correct {
    color: #16a34a;
}

.wrong {
    color: #dc2626;
}

.next-button {
    display: none;
    margin: 15px auto;
}

.score-board {
    display: flex;
    justify-content: space-around;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.score-item {
    text-align: center;
}

.score-number {
    font-size: 25px;
    font-weight: bold;
}

.score-label {
    font-size: 13px;
    color: #888;
}

/* -------------------------
    RESULTS
------------------------- */

.results {
    display: none;
    text-align: center;
}

.results-emoji {
    font-size: 70px;
    margin: 10px;
}

.final-score {
    font-size: 50px;
    font-weight: bold;
    color: #667eea;
    margin: 10px;
}

.final-message {
    font-size: 22px;
    margin: 20px 0;
}

.new-best {
    display: none;
    background: #fff7d6;
    border-radius: 15px;
    padding: 12px;
    margin: 15px 0;
    font-weight: bold;
}

/* -------------------------
    PROGRESS SECTION
------------------------- */

.progress-section {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.progress-section h3 {
    text-align: center;
}

.table-progress {
    margin: 12px 0;
}

.table-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 5px;
}

.bar-container {
    height: 9px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: #667eea;
    border-radius: 10px;
}

.reset-button {
    display: block;
    margin: 25px auto 0;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 12px;
}

.reset-button:hover {
    color: #dc2626;
}

@media (max-width: 500px) {

    .app {
        padding: 20px;
    }

    h1 {
        font-size: 27px;
    }

    .tables {
        grid-template-columns: repeat(4, 1fr);
    }

    .question {
        font-size: 45px;
    }
}