/* Import HSE Sans fonts */
@font-face {
    font-family: 'HSE Sans';
    src: url('fonts/HSESans-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'HSE Sans';
    src: url('fonts/HSESans-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'HSE Sans';
    src: url('fonts/HSESans-Italic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
}
@font-face {
    font-family: 'HSE Sans';
    src: url('fonts/HSESans-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}
/*
 * Basic styling for the LexTALE web application. The goal of this CSS is to
 * provide a clean and responsive interface without relying on external
 * frameworks. Feel free to adjust colours and spacing to match your
 * organisation’s branding guidelines.
 */

body {
    font-family: 'HSE Sans', Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-height: 60vh;
}

.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    max-height: 90vh;
    overflow-y: auto;
    width: min(700px, 92vw);
}

.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.close-top {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 1002;
    text-decoration: none;
    font-size: 28px;
    line-height: 1;
    color: #ffffff;
    background: rgba(0,0,0,0.4);
    border-radius: 4px;
    padding: 4px 10px;
}

h2 {
    margin-top: 0;
}

form {
    margin-top: 20px;
}

.language-options label,
.language-option label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

button,
.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #ffffff;
    display: inline-block;
    text-decoration: none;
}

button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/*
 * Primary and secondary action buttons
 *
 * The Higher School of Economics (HSE University) brandbook specifies a rich
 * dark blue as the main corporate colour. To align with this style the
 * primary buttons are coloured with the dark blue (#0F2D69) and secondary
 * buttons use a slightly lighter shade (#374B9B). These colours come from
 * the HSE corporate palette published on the university portal【61640036017674†L96-L104】.
 */
.btn-primary {
    background-color: #0F2D69;
}

.btn-secondary {
    background-color: #374B9B;
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-yes {
    background-color: #28a745;
    color: #ffffff;
    flex: 1;
    margin-left: 10px;
    font-size: 24px;
    padding: 18px;
}

.btn-no {
    background-color: #dc3545;
    color: #ffffff;
    flex: 1;
    margin-right: 10px;
    font-size: 24px;
    padding: 18px;
}

.test-container h2 {
    text-align: center;
    font-size: 48px;
    margin: 60px 0;
}

.practice-word {
    text-align: center;
    font-size: 48px;
    margin: 60px 0;
}

.practice-feedback {
    text-align: center;
    margin-top: 20px;
}

.practice-next {
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.practice-next form {
    margin-top: 0;
}

.practice-intro-screen {
    margin-top: 80px;
    gap: 24px;
}

.practice-intro-screen h2 {
    margin: 0;
}

.practice-ready-title {
    margin: 0;
}

/* Simple attention-grabbing animations for feedback */
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1.0); opacity: 1; }
}

.feedback-correct.animate,
.feedback-incorrect.animate {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    animation: popIn 300ms ease-out;
}

.feedback-correct.animate { background: rgba(40, 167, 69, 0.12); }
.feedback-incorrect.animate { background: rgba(220, 53, 69, 0.12); }

.title-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.app-title {
    font-size: 64px;
    margin: 40px 0 20px;
    letter-spacing: 3px;
}

.btn-large {
    font-size: 20px;
    padding: 14px 24px;
}

.feedback-correct { color: #28a745; font-weight: 600; }
.feedback-incorrect { color: #dc3545; font-weight: 600; }

/* Progress bar styling
 *
 * To echo the university palette in the interactive elements, the progress
 * bar now uses the same dark blue as the primary buttons. The background of
 * the bar is a light neutral tone (#E6E7E8) taken from the HSE palette to
 * ensure sufficient contrast【61640036017674†L96-L104】.
 */
.progress-container {
    position: relative;
    width: 100%;
    height: 12px;
    background-color: #E6E7E8;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #0F2D69;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: -22px;
    right: 0;
    font-size: 14px;
    color: #333;
}

.flash-messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    border: 1px solid #f5c6cb;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
}

.flash-messages li {
    padding: 10px;
}
