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

body {
    background: linear-gradient(145deg, #f0f7ff 0%, #e9eef5 100%);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    padding: 2rem 1.5rem;
    color: #1a2c3e;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 2rem;
}

/* Navigation styles */
.exercise-nav {
    background: #1e3a5f;
    padding: 12px 20px;
    border-radius: 40px;
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

.exercise-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 18px;
    border-radius: 30px;
    background-color: #2c5a7a;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.exercise-nav a:hover {
    background-color: #e67e22;
    color: white;
}

.exercise-nav .nav-divider {
    color: rgba(255,255,255,0.5);
    font-weight: normal;
}

.back-to-exercises {
    background-color: #1e3a5f !important;
}

.go-to-lesson {
    background-color: #2c7a4d !important;
}

h1 {
    font-size: 1.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3a5f, #2c7a4d);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.subhead {
    color: #2c5a6e;
    border-left: 4px solid #2c7a4d;
    padding-left: 1rem;
    margin: 0.75rem 0 1.5rem 0;
    font-weight: 500;
    font-size: 1rem;
    background: #f8fafc;
    border-radius: 0 1rem 1rem 0;
    width: fit-content;
}

.info-example {
    background: #eef3f8;
    border-radius: 1rem;
    padding: 0.6rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    display: inline-block;
    color: #1e3a5f;
    border: 1px solid #cde0e8;
}

.stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 60px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2edf2;
}

.score-badge {
    background: #1e3a5f;
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.2rem;
}

.btn-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

button {
    background: #f0f4f9;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    color: #1e3a5f;
    border: 1px solid #cbdde6;
}

button.primary-btn {
    background: #2c7a4d;
    border-color: #1f5e3a;
    color: white;
}

button.primary-btn:hover {
    background: #23683f;
    transform: translateY(-1px);
}

button.secondary-btn {
    background: #fff4e0;
    border-color: #f3d9a4;
    color: #a4662c;
}

button.secondary-btn:hover {
    background: #ffedcf;
}

button.danger-btn {
    background: #fef2f0;
    border-color: #f3cdc4;
    color: #bc5a3c;
}

button.danger-btn:hover {
    background: #ffe6e2;
}

button:hover {
    transform: translateY(-1px);
}

.exercise-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.phrase-card {
    background: white;
    border-radius: 1.25rem;
    padding: 0.75rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    border: 1px solid #e2edf2;
}

.sentence-prompt, .noun-prompt {
    flex: 1.2;
    min-width: 200px;
    font-weight: 600;
    font-size: 1rem;
    color: #1f3e4b;
}

.input-area {
    flex: 1.5;
    min-width: 250px;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.article-input, .translation-input {
    flex: 2;
    min-width: 180px;
    padding: 0.65rem 1rem;
    border-radius: 60px;
    border: 1.5px solid #cfdfe8;
    font-size: 0.9rem;
    font-family: 'Segoe UI', Consolas, monospace;
    background: #fefefe;
    transition: all 0.2s ease;
}

.article-input:focus, .translation-input:focus {
    outline: none;
    border-color: #2c7a4d;
    box-shadow: 0 0 0 3px rgba(44, 122, 77, 0.2);
}

.check-btn {
    background: #eef2fa;
    padding: 0.55rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    border: 1px solid #bed0db;
    white-space: nowrap;
}

.status {
    min-width: 140px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status.correct {
    color: #1f8a4c;
}

.status.incorrect {
    color: #c95a3f;
}

footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: #6f8f9e;
    border-top: 1px solid #d9e5ec;
    padding-top: 1.2rem;
}

@media (max-width: 720px) {
    .container {
        padding: 1.2rem;
    }
    .phrase-card {
        flex-direction: column;
        align-items: stretch;
    }
    .input-area {
        justify-content: center;
    }
    .status {
        justify-content: center;
    }
}