/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header h1 i {
    margin-right: 10px;
    color: #6dd5ed;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Dashboard */
.dashboard {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    min-width: 120px;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2.2rem;
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: #4b6cb7;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: linear-gradient(90deg, #4b6cb7, #6dd5ed);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(75, 108, 183, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-3px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

/* Tabs */
.tabs {
    display: flex;
    background: white;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
}

.tab {
    flex: 1;
    padding: 1.2rem;
    background: #f8f9fa;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 4px solid transparent;
}

.tab:hover {
    background: #e9ecef;
}

.tab.active {
    background: white;
    color: #4b6cb7;
    border-bottom: 4px solid #4b6cb7;
}

/* Tab Content */
.tab-content {
    display: none;
    background: white;
    border-radius: 0 0 16px 16px;
    padding: 2.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.tab-content.active {
    display: block;
}

.technique-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f3f5;
    text-align: center;
}

.technique-header h2 {
    font-size: 2rem;
    color: #182848;
    margin-bottom: 0.5rem;
}

.technique-header h2 i {
    margin-right: 10px;
    color: #4b6cb7;
}

.technique-header p {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Exercise Layout */
.exercise {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 992px) {
    .exercise {
        gap: 1.5rem;
    }
}

/* Skimming Passage */
.text-passage {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 6px solid #4b6cb7;
    line-height: 1.8;
}

.text-passage h3 {
    color: #182848;
    margin-bottom: 1rem;
}

.text-passage strong {
    color: #4b6cb7;
}

.text-passage em {
    background: #fffacd;
    padding: 0 2px;
    font-style: normal;
}

.questions {
    background: #e7f4ff;
    padding: 1.5rem;
    border-radius: 12px;
}

.questions h3 {
    margin-bottom: 1rem;
    color: #0056b3;
}

.questions ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.questions li {
    margin-bottom: 1rem;
}

.questions input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #b3d4fc;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    margin-top: 0.25rem;
}

.questions input:focus {
    outline: none;
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
}

/* Pointer Section */
.pointer-controls, .subvocal-controls {
    background: #fff8e1;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.pointer-controls label, .subvocal-controls label {
    font-weight: 600;
    color: #856404;
}

input[type="range"] {
    width: 200px;
    height: 8px;
    border-radius: 4px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4b6cb7;
    cursor: pointer;
}

.pointer-text {
    position: relative;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

#pointer-highlight {
    position: absolute;
    background: rgba(255, 255, 0, 0.4);
    border-radius: 4px;
    padding: 0 4px;
    transition: all 0.2s ease;
}

/* Subvocalization */
.flash-display {
    background: #182848;
    color: white;
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.flash-display.finished {
    background: linear-gradient(90deg, #155724, #28a745);
}

#flash-word {
    font-size: 5.5rem;
    font-weight: 800;
    font-family: 'Roboto Mono', monospace;
    color: #6dd5ed;
    margin-bottom: 1.5rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#flash-instruction {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.word-list {
    background: #e9ecef;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Text Input */
.text-input {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.text-input label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.text-input textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #c3cfe2;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
}

.text-input textarea:focus {
    outline: none;
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
}

.word-count {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #6c757d;
    text-align: right;
}

/* Instructions */
.instructions {
    background: #d4edda;
    padding: 1.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    margin-top: 1rem;
}

.instructions h4 {
    color: #155724;
    margin-bottom: 0.75rem;
}

.instructions ul {
    margin-left: 1.5rem;
    color: #0c5460;
}

.instructions li {
    margin-bottom: 0.5rem;
}

/* Progress Section */
.progress-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.progress-section h2 {
    margin-bottom: 1.5rem;
    color: #182848;
}

.progress-section h2 i {
    color: #4b6cb7;
    margin-right: 10px;
}

.progress-bars {
    margin-bottom: 2rem;
}

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

.progress-item label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.progress-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4b6cb7, #6dd5ed);
    width: 0%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Speed Controls */
.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.wpm-display {
    font-weight: 600;
    color: #856404;
    font-size: 1.1rem;
}

.button-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-size: 0.95rem;
    border-top: 1px solid #dee2e6;
}

.footer-links a {
    color: #4b6cb7;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Feedback */
#skimming-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.feedback-correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}