/* 
 * Listening Application CSS
 */

/* Base layout and reset */
.lten-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #343a40;
}

.lten-container * {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Accessibility enhancement styles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.lten-answer-option:focus,
.lten-btn:focus {
    outline: 1px solid #4dabf7;
    outline-offset: 2px;
}

/* Typography */
.lten-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #343a40;
    margin: 15px 0;
    text-align: center;
    background: linear-gradient(120deg, #3498db, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.lten-subtitle {
    font-size: 1.75rem;
    font-weight: 600;
    color: #343a40;
    margin: 2.5rem 0 1.5rem;
    display: flex;
    align-items: center;
}

.lten-subtitle::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: #dee2e6;
    margin-left: 1rem;
}

.lten-text {
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #6c757d;
    text-align: center;
    margin: 2rem 0;
    font-size: 1.1rem;
}

.lten-topic-count {
    text-align: center;
    display: block;
    margin-bottom: 1.5rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Header Row */
.lten-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.lten-back-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lten-back-btn:hover {
    background-color: #dee2e6;
    color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===== Header Container Styles ===== */
.lten-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

/* ===== Filter Container Styles (matching post app style) ===== */
.lten-filters-container {
    background-color: #ffffff;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.lten-filters-container:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.lten-filters-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Search filter styling */
.lten-search-filter {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 460px;
}

.lten-search-filter input {
    padding: 10px 16px;
    padding-left: 38px; /* Space for icon */
    padding-right: 80px; /* Space for button */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    width: 100%;
    color: #333;
    background-color: #f9f9f9;
}

/* Search icon */
.lten-search-filter::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #9e9e9e;
    pointer-events: none;
    z-index: 1;
}

.lten-search-filter input:focus {
    border-color: #3498db;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    outline: none;
}

.lten-search-filter .lten-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    font-size: 14px;
}

.lten-search-filter .lten-search-btn:hover {
    background-color: #2980b9;
}

/* Filters group styling */
.lten-filters-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Individual filter containers */
.lten-level-filter, .lten-sort-filter, .lten-access-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
}

/* Label styling */
.lten-filters-group label {
    white-space: nowrap;
    font-weight: 500;
    color: #555;
    font-size: 14px;
    margin: 0;
}

/* Select inputs styling */
.lten-filters-group select {
    appearance: none;
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 30px 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    transition: all 0.3s ease;
    flex: 1;
}

.lten-filters-group select:hover {
    border-color: #bdbdbd;
}

.lten-filters-group select:focus {
    border-color: #3498db;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* Active filter indication */
select:not([value=""]) {
    border-left: 3px solid #3498db;
}

/* ===== Topic Card Redesign ===== */
.lten-topics-grid {
    display: grid;      
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.lten-topic-card {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 350px;
}

.lten-topic-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.lten-topic-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.lten-topic-image {
    height: 180px;
    overflow: hidden;
}

.lten-topic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lten-topic-card:hover .lten-topic-image img {
    transform: scale(1.03);
}

.lten-topic-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lten-topic-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.lten-topic-description {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 10px;
    flex-grow: 1;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lten-topic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.8rem;
}

/* ===== Badge Positioning ===== */
/* Premium/Free Badge - Top left */
.lten-premium-badge,
.lten-free-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.lten-premium-badge {
    background-color: #9C27B0;
    color: white;
}

.lten-free-badge {
    background-color: #2196F3;
    color: white;
}

/* Card Badges Container - Top right */
.lten-card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Completed/In Progress badges */
.lten-completed-badge,
.lten-in-progress-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    white-space: nowrap;
    text-align: center;
}

.lten-completed-badge {
    background-color: #4CAF50;
    color: white;
}

.lten-in-progress-badge {
    background-color: #FF9800;
    color: white;
}

/* Score indicator */
.lten-card-score {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-top: 5px;
}

.lten-card-score.high {
    background-color: #4CAF50;
    color: white;
}

.lten-card-score.medium {
    background-color: #FF9800;
    color: white;
}

.lten-card-score.low {
    background-color: #F44336;
    color: white;
}

/* Level indicator - Bottom left */
.lten-topic-level {
    padding: 3px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background-color: #e9f7ef;
    color: #27ae60;
}

/* Questions count - Bottom right */
.lten-questions-count {
    font-size: 0.75rem;
    color: #7f8c8d;
}

/* Level-specific styling */
.lten-topic-level.beginner {
    background-color: #e9f7ef;
    color: #27ae60;
}

.lten-topic-level.elementary {
    background-color: #eafaf1;
    color: #2ecc71;
}

.lten-topic-level.intermediate {
    background-color: #e8f8f5;
    color: #1abc9c;
}

.lten-topic-level.upper_intermediate {
    background-color: #ebf5fb;
    color: #3498db;
}

.lten-topic-level.advanced {
    background-color: #eeebea;
    color: #e67a22;
}

.lten-topic-level.proficient {
    background-color: #ffe7d8;
    color: #e622ab;
}

/* Progress Widget */
.lten-progress-widget {
    margin-left: auto;
}

.lten-progress-btn {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background-color 0.2s;
}

.lten-progress-btn:hover {
    background-color: #e0e0e0;
}

.lten-progress-icon {
    margin-right: 6px;
    font-size: 16px;
}

.lten-progress-text {
    font-size: 14px;
}

.lten-progress-badge {
    margin-left: 6px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* No topics message */
.lten-no-topics {
    text-align: center;
    padding: 2rem 0;
    color: #888;
    font-size: 1rem;
}

/* Pagination styles */
.lten-pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.lten-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.lten-pagination li {
    margin: 0 2px;
}

.lten-pagination a {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lten-pagination a:hover {
    background-color: #e9ecef;
    color: #212529;
}

.lten-current-page {
    padding: 8px 12px;
    background-color: #3498db;
    color: #fff;
    border-radius: 4px;
}

/* Topic Detail Page */
.lten-topic-header {
    margin-bottom: 30px;
    text-align: center;
}

.lten-cover-image {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin: 0 auto 25px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.lten-cover-image img {
    width: 100%;
    height: auto;
    display: block;
}

.lten-audio-player {
    max-width: 500px;
    margin: 0 auto 25px;
}

.lten-audio-player audio {
    width: 100%;
}

.lten-controls {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.lten-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background-color: #3498db;
    color: white;
}

.lten-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    filter: brightness(1.1);
}

.lten-btn.lten-btn-success {
    background-color: #2ecc71;
}

.lten-btn.lten-btn-success:hover {
    background-color: #27ae60;
}

.lten-btn.lten-btn-danger {
    background-color: #e74c3c;
}

.lten-btn.lten-btn-danger:hover {
    background-color: #c0392b;
}

.lten-btn.lten-btn-warning {
    background-color: #f39c12;
}

.lten-btn.lten-btn-warning:hover {
    background-color: #d35400;
}

.lten-btn.lten-btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

.lten-btn.lten-btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.lten-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Intro box styling */
.lten-intro-box {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 280px;
}

/* Previous attempts section styling */
.lten-previous-attempts {
    margin: 25px 0;
}

/* Loading and error states */
.lten-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    position: relative;
}

.lten-loading:after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    margin: 15px auto 0;
    animation: spin 1s linear infinite;
}

.lten-error {
    color: #dc3545;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    background-color: #f8d7da;
}

.lten-retry-btn {
    display: block;
    margin: 15px auto 0;
}

/* Exercise interface */
.lten-exercise-container {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 280px;
}

.lten-question-box {
    margin-bottom: 25px;
    min-width: 260px;
}

.lten-question-text {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #212529;
    line-height: 1.5;
}

.lten-answers-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.lten-answer-option {
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.lten-answer-option:hover {
    background-color: #e9ecef;
    border-color: #4dabf7;
    border-width: 1px;
}

.lten-answer-letter {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 600;
    margin-right: 15px;
    transition: all 0.2s ease;
}

.lten-answer-text {
    flex: 1;
    font-size: 1.1rem;
    color: #212529;
}

.lten-answer-option.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
    border-width: 1px;
}

.lten-answer-option.correct .lten-answer-letter {
    background-color: #28a745;
    color: #fff;
}

.lten-answer-option.wrong {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    border-width: 1px;
}

.lten-answer-option.wrong .lten-answer-letter {
    background-color: #dc3545;
    color: #fff;
}

.lten-answer-option.selected {
    border-color: #4dabf7;
    border-width: 1px;
    transform: translateY(0);
    transition: transform 0.2s ease;
}

.lten-control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.lten-progress-container {
    width: 100%;
    margin-bottom: 25px;
}

.lten-progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.lten-progress-bar-outer {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.lten-progress-bar-inner {
    height: 100%;
    background-color: #4dabf7;
    transition: width 0.3s ease;
}

/* Swipe hint for mobile users */
.lten-swipe-hint {
    display: none;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
}

/* Touch active state for mobile */
.lten-touch-active,
.lten-answer-option:active {
    transform: scale(0.98);
    background-color: #e2e6ea;
}

/* Results screen */
.lten-results-container {
    display: none;
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 280px;
}

.lten-results-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.lten-results-score {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.lten-results-details {
    margin-bottom: 30px;
}

.lten-results-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.lten-results-detail:last-child {
    border-bottom: none;
}

.lten-results-label {
    font-weight: 600;
    color: #495057;
}

.lten-results-value {
    color: #6c757d;
}

.lten-results-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* Topic Detail Navigation */
.lten-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.lten-back-btn, 
.lten-topic-progress-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lten-back-btn:hover, 
.lten-topic-progress-btn:hover {
    background-color: #e9ecef;
    color: #212529;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
}

/* User progress page */
.lten-progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.lten-progress-card {
    position: relative;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 2rem;
    transition: all 0.3s ease;
    overflow: hidden;
    text-align: center;
}

.lten-progress-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.lten-progress-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2196F3);
}

.lten-progress-card-title {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 500;
}

.lten-progress-card-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: #343a40;
    line-height: 1;
}

.lten-progress-card-value.percentage::after {
    content: "%";
    font-size: 1.75rem;
    vertical-align: super;
    margin-left: 0.25rem;
    opacity: 0.7;
}

.lten-level-progress {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 2rem;
    margin-bottom: 3rem;
}

.lten-level-progress-item {
    margin-bottom: 1.5rem;
}

.lten-level-progress-item:last-child {
    margin-bottom: 0;
}

.lten-level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.lten-level-name {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.lten-level-stats {
    font-size: 0.9rem;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.lten-level-progress-bar-outer {
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.lten-level-progress-bar-inner {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #3498db, #2196F3);
    transition: width 1s ease-in-out;
}

/* Level-specific progress bar colors */
.lten-level-beginner { background: linear-gradient(90deg, #4CAF50, #8BC34A); }
.lten-level-elementary { background: linear-gradient(90deg, #8BC34A, #CDDC39); }
.lten-level-intermediate { background: linear-gradient(90deg, #2196F3, #03A9F4); }
.lten-level-upper_intermediate { background: linear-gradient(90deg, #03A9F4, #00BCD4); }
.lten-level-advanced { background: linear-gradient(90deg, #9C27B0, #673AB7); }
.lten-level-proficient { background: linear-gradient(90deg, #673AB7, #3F51B5); }

.lten-recent-attempts {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 2rem;
    margin-bottom: 3rem;
}

.lten-attempts-list {
    display: grid;
    gap: 1rem;
}

.lten-attempt-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    align-items: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.lten-attempt-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.lten-attempt-topic {
    font-weight: 500;
}

.lten-attempt-topic a {
    color: #343a40;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
    display: inline-block;
}

.lten-attempt-topic a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s;
}

.lten-attempt-topic a:hover {
    color: #3498db;
}

.lten-attempt-topic a:hover::after {
    width: 100%;
}

.lten-attempt-date {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.lten-attempt-score {
    margin-left: auto;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    text-align: center;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.lten-attempt-score::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
    z-index: -1;
    border-radius: inherit;
}

.lten-attempt-score.high {
    color: #4CAF50;
}

.lten-attempt-score.high::before {
    background-color: #4CAF50;
}

.lten-attempt-score.medium {
    color: #FF9800;
}

.lten-attempt-score.medium::before {
    background-color: #FF9800;
}

.lten-attempt-score.low {
    color: #F44336;
}

.lten-attempt-score.low::before {
    background-color: #F44336;
}

.lten-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.lten-progress-overview,
.lten-level-progress,
.lten-recent-attempts {
    animation: fadeIn 0.5s ease-out forwards;
}

.lten-progress-overview {
    animation-delay: 0.1s;
}

.lten-recent-attempts {
    animation-delay: 0.3s;
}

.lten-level-progress {
    animation-delay: 0.5s;
}

.lten-attempt-item {
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.lten-attempt-item:nth-child(1) { animation-delay: 0.6s; }
.lten-attempt-item:nth-child(2) { animation-delay: 0.7s; }
.lten-attempt-item:nth-child(3) { animation-delay: 0.8s; }
.lten-attempt-item:nth-child(4) { animation-delay: 0.9s; }
.lten-attempt-item:nth-child(5) { animation-delay: 1.0s; }

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

.lten-pulse {
    animation: pulse 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.lten-shake {
    animation: shake 0.5s ease;
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.lten-slide-up {
    animation: slideInUp 0.4s ease-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Responsive Adjustments ===== */
@media (min-width: 768px) {
    .lten-exercise-container {
        min-width: 500px;
    }
    
    .lten-intro-box {
        min-width: 500px;
    }
    
    .lten-results-container {
        min-width: 400px;
    }
}

@media (max-width: 992px) {
    .lten-progress-card {
        flex: 1 1 calc(50% - 20px);
        min-width: calc(50% - 20px);
    }
    
    .lten-filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lten-search-filter {
        max-width: none;
        width: 100%;
    }
    
    .lten-filters-group {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .lten-container {
        max-width: 90%;
    }
    
    .lten-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .lten-back-btn {
        align-self: flex-start;
    }
    
    .lten-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .lten-progress-widget {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .lten-level-filter, .lten-sort-filter, .lten-access-filter {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .lten-filters-group select {
        width: 100%;
    }
    
    .lten-topics-grid {
        justify-content: center;
    }

    .lten-topic-card {
        width: 100%;
        max-width: 100%;
    }
    
    .lten-title {
        font-size: 2rem;
    }

    .lten-subtitle {
        font-size: 1.5rem;
    }
    
    .lten-control-panel {
        display: flex;
        flex-direction: column;
        gap: 15px;
        justify-content: space-between;
        align-items: center;
        margin-top: 20px;
    }

    .lten-control-panel .lten-btn {
        width: 100%;
        flex: 1;
    }

    .lten-results-buttons {
        flex-direction: column;
    }

    .lten-attempt-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .lten-attempt-date,
    .lten-attempt-score {
        text-align: left;
    }
    
    .lten-attempt-score {
        margin-left: 0;
    }
    
    .lten-answer-option {
        padding: 20px 15px; /* Larger padding for better touch targets */
    }

    .lten-answer-letter {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .lten-btn {
        min-height: 50px; /* Ensure buttons are large enough to tap easily */
    }
    
    .lten-swipe-hint {
        display: block;
    }
}

@media (max-width: 576px) {
    .lten-container {
        max-width: 95%;
        padding: 5px;
        margin-left:0;
        margin-right:0;

    }
    
    .lten-progress-overview {
        grid-template-columns: 1fr;
    }
    
    .lten-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .lten-btn {
        width: 100%;
    }
    
    .lten-progress-card {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .lten-cover-image {
        max-width: 100%;
    }

    .lten-audio-player, 
    .lten-controls {
        max-width: 100%;
    }
    
    .lten-control-panel {
        flex-direction: column;
    }
    
    .lten-control-panel .lten-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .lten-container {
        max-width: 95%;
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .lten-exercise-container,
    .lten-intro-box,
    .lten-results-container {
        padding: 15px 10px;
    }
    .lten-intro-box {
        box-shadow: none;
    }
}