/* ==================== GENERAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.progress-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 1.1em;
    font-weight: 600;
}

.progress-text {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
}

.progress-separator {
    opacity: 0.5;
}

.main-content {
    flex: 1;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.exercise-section {
    text-align: center;
}

.exercise-display {
    font-size: 1.8em;
    color: #333;
    font-weight: 500;
    line-height: 1.6;
}

.exercise-large {
    font-size: 2.5em;
    color: #333;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.operator {
    font-size: 1.2em;
    color: #333;
    font-weight: 700;
    margin: 0 10px;
}

.number-separator {
    width: 2px;
    height: 60px;
    background: #ddd;
}

.number {
    font-weight: 700;
    font-size: 1.3em;
    color: #667eea;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

input[type="number"] {
    width: 100px;
    padding: 15px;
    font-size: 1.3em;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

input[type="number"].error {
    border-color: #e74c3c;
    background-color: #fff5f5;
    animation: shake 0.4s ease-in-out;
}

input[type="number"].success {
    border-color: #27ae60;
    background-color: #f0fff4;
}

.submit-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.feedback-section {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.feedback-message {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 20px;
    min-height: 40px;
}

.feedback-message.error { color: #e74c3c; }
.feedback-message.success { color: #27ae60; animation: popIn 0.5s ease-out; }
.feedback-message.hint { color: #f39c12; }

.hint-container {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.hint-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.session-summary-card {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.session-summary-card h2 {
    margin-bottom: 12px;
    color: #333;
}

.summary-evaluation {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.summary-evaluation.success {
    color: #1e7e34;
    background: #e9f9ef;
}

.summary-evaluation.error {
    color: #c0392b;
    background: #fdecec;
}

.session-summary-card p {
    margin: 8px 0;
    color: #444;
}

.wagon {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    background: #f9f9f9;
    flex-shrink: 0;
}

.wagon-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn-next {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-next:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #ddd;
}

.btn-reset {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 1em;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    50% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .header h1 { font-size: 2em; }
    .progress-bar { gap: 10px; font-size: 0.95em; }
    .progress-text { padding: 6px 12px; }
    .main-content { padding: 25px 15px; gap: 20px; }
    .exercise-display { font-size: 1.5em; }
    input[type="number"] { width: 80px; padding: 12px; font-size: 1.1em; }
    .submit-button { padding: 10px 25px; font-size: 1em; }
    .btn-next { padding: 12px 30px; font-size: 1.1em; }
}

@media (max-width: 480px) {
    .container { border-radius: 0; min-height: 100vh; }
    .header { padding: 15px; }
    .header h1 { font-size: 1.6em; margin-bottom: 10px; }
    .progress-bar { gap: 8px; font-size: 0.85em; }
    .main-content { padding: 15px; gap: 15px; }
    .exercise-display { font-size: 1.3em; }
    .input-group { gap: 10px; }
    input[type="number"] { width: 70px; padding: 10px; font-size: 1em; }
}
.problem-list-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e5e5e5;
}

.problem-list-block h3 {
    margin-bottom: 10px;
    font-size: 1em;
    color: #333;
}

.problem-list {
    margin-left: 20px;
    color: #444;
}

.problem-list li {
    margin: 6px 0;
}

/* ==================== MINIMAL SESSION SUMMARY (VARIANT 1) ==================== */

.session-summary-minimal {
    background: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 550px;
    margin: 0 auto;
    font-size: 1.05em;
}

.summary-header {
    text-align: center;
    margin-bottom: 25px;
}

.evaluation-label {
    display: inline-block;
    font-size: 1.8em;
    font-weight: 700;
    padding: 15px 25px;
    border-radius: 12px;
    margin: 0;
    letter-spacing: 0.05em;
}

.evaluation-label.success {
    color: #1e7e34;
    background: #e9f9ef;
}

.evaluation-label.error {
    color: #c0392b;
    background: #fdecec;
}

.summary-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 2px solid #f0f0f0;
}

.stat-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 0.95em;
    color: #666;
    font-weight: 600;
}

.stat-value {
    font-size: 1.6em;
    font-weight: 700;
    color: #333;
}

.attempts-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 2px solid #f0f0f0;
}

.attempt-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.attempt-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.attempt-condition {
    display: flex;
    align-items: center;
    gap: 8px;
}

.condition-badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.condition-met .condition-badge {
    background: #e9f9ef;
    color: #1e7e34;
    border: 1px solid #1e7e34;
}

.condition-not-met .condition-badge {
    background: #fdecec;
    color: #c0392b;
    border: 1px solid #c0392b;
}

.attempt-label {
    font-size: 1.1em;
    font-weight: 600;
    width: 75px;
    color: #333;
    flex-shrink: 0;
}

.attempt-bar-container {
    flex: 1;
    height: 30px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    min-width: 80px;
}

.attempt-bar {
    height: 100%;
    min-width: 5px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.attempt-bar.success {
    background: linear-gradient(90deg, #27ae60, #1e7e34);
}

.attempt-bar.warning {
    background: linear-gradient(90deg, #f39c12, #d68910);
}

.attempt-bar.info {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.attempt-bar.error {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.attempt-count {
    font-weight: 700;
    color: #333;
    font-size: 1em;
    width: 50px;
    text-align: right;
}

.streak-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #fff5e6, #ffe6cc);
    border-radius: 10px;
}

.streak-icon {
    font-size: 2em;
}

.streak-label {
    font-weight: 600;
    color: #666;
    font-size: 0.95em;
}

.streak-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #d68910;
}

.problems-section {
    padding-top: 15px;
}

.problems-section h3 {
    margin-bottom: 12px;
    font-size: 1.1em;
    color: #333;
    font-weight: 700;
}

.problems-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 0;
}

.problem-item {
    padding: 10px 12px;
    background: #f9f9f9;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    color: #444;
    font-size: 0.95em;
    line-height: 1.4;
}

.problem-item:empty {
    display: none;
}
