* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fb, #e9eef7);
    color: #1f2937;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none;
}

.hero {
    background: linear-gradient(135deg, #1f2937, #334155);
    color: white;
    border-radius: 0 0 28px 28px;
    padding: 24px 20px 28px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.22);
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.user-select {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.userButton,
.ghost-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}

.userButton {
    background: rgba(255, 255, 255, 0.16);
    color: white;
}

.user-badge,
.streak-pill,
.phase-pill,
.icon-pill {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-pill {
    border: none;
    cursor: pointer;
    color: white;
    font-size: 16px;
}

.logo {
    font-size: 52px;
    text-align: center;
    margin: 18px 0 6px;
}

h1 {
    text-align: center;
    font-size: 34px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.subtitle {
    text-align: center;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
}

.content {
    padding: 24px 0 40px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.stats-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.stats-overlay.hidden {
    display: none;
}

.stats-card {
    width: min(520px, 100%);
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
}

.stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stats-panel {
    display: grid;
    gap: 10px;
}

.stats-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0 8px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 700;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0 4px;
}

.stat-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.stat-bar>div {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    border-radius: 999px;
}

.stats-section-title {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stats-empty {
    color: #64748b;
    font-size: 14px;
}

.category-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.category-progress-label {
    font-weight: 600;
}

.category-progress-value {
    color: #16a34a;
    font-weight: 700;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.category {
    background: white;
    border: none;
    border-radius: 22px;
    padding: 18px 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.categoryIcon {
    font-size: 36px;
}

.categoryTitle {
    font-weight: 700;
    text-align: center;
}

.categoryCount {
    color: #64748b;
    font-size: 13px;
}

.categoryProgressWrap {
    width: 100%;
    display: grid;
    gap: 4px;
}

.categoryProgressBar {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.categoryProgressBar>div {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    border-radius: 999px;
}

.categoryProgressLabel {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
}

.allButton,
#check,
#next {
    display: block;
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 15px;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.allButton {
    background: #1f2937;
    color: white;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 16px;
}

.ghost-btn {
    background: white;
    color: #111827;
}

.progress {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 18px;
}

#progressFill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    transition: width 0.3s ease;
}

.card {
    background: white;
    border-radius: 24px;
    padding: 44px 18px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 16px;
}

#germanWord {
    font-size: 34px;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

#check {
    background: #16a34a;
    color: white;
}

#next {
    background: #334155;
    color: white;
}

#feedback {
    text-align: center;
    margin: 14px 0 4px;
    font-weight: 700;
}

.correct {
    color: #15803d;
}

.wrong {
    color: #dc2626;
}

@media (max-width: 560px) {
    .hero-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 14px;
    }
}