/* Speech Practicer Plugin Styles */

/* ============================================
   GENERAL
   ============================================ */
.sp-dashboard, .sp-teacher-dashboard, .sp-admin-dashboard, .sp-settings {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ============================================
   BUTTONS
   ============================================ */
.sp-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sp-btn-primary {
    background-color: #4CAF50;
    color: white;
}

.sp-btn-primary:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.sp-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.sp-btn-secondary:hover {
    background-color: #5a6268;
}

.sp-btn-danger {
    background-color: #f44336;
    color: white;
}

.sp-btn-danger:hover {
    background-color: #da190b;
}

.sp-btn-warning {
    background-color: #ff9800;
    color: white;
}

.sp-btn-warning:hover {
    background-color: #e68900;
}

.sp-btn-success {
    background-color: #28a745;
    color: white;
}

.sp-btn-success:hover {
    background-color: #218838;
}

.sp-btn-purple {
    background-color: #9C27B0;
    color: white;
}

.sp-btn-purple:hover {
    background-color: #7B1FA2;
}

.sp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   INPUTS
   ============================================ */
.sp-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.sp-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.sp-input-dark {
    background: #1a1a2e;
    color: #eee;
    border-color: #3a3a5a;
}

.sp-input-dark:focus {
    border-color: #4CAF50;
}

/* ============================================
   CARDS
   ============================================ */
.sp-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.sp-card-dark {
    background: #1e1e2f;
    color: #eee;
    border: 1px solid #3a3a5a;
}

/* ============================================
   TABLES
   ============================================ */
.sp-table {
    width: 100%;
    border-collapse: collapse;
}

.sp-table th,
.sp-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.sp-table th {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
}

.sp-table tr:hover {
    background-color: #f5f5f5;
}

.sp-table-dark th {
    background-color: #0f3460;
}

.sp-table-dark tr:hover {
    background-color: #1a1a2e;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.sp-progress-bar {
    background-color: #e0e0e0;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.sp-progress-fill {
    background-color: #4CAF50;
    height: 100%;
    transition: width 0.3s ease;
}

/* ============================================
   MODULES
   ============================================ */
.sp-module-1 { background: #4CAF50; color: white; }
.sp-module-2 { background: #9c27b0; color: white; }
.sp-module-3 { background: #4A90D9; color: white; }
.sp-module-4 { background: #FF6B35; color: white; }
.sp-module-5 { background: #00BCD4; color: white; }
.sp-module-6 { background: #E91E63; color: white; }

/* ============================================
   RECORDING BUTTON
   ============================================ */
.sp-record-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sp-record-btn.recording {
    background: #f44336;
    color: white;
    animation: sp-pulse 1.5s infinite;
}

.sp-record-btn.idle {
    background: #4CAF50;
    color: white;
}

.sp-record-btn.idle:hover {
    background: #45a049;
    transform: scale(1.02);
}

.sp-record-btn.completed {
    background: #2196F3;
    color: white;
}

.sp-record-btn .sp-record-icon {
    font-size: 20px;
}

@keyframes sp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(244, 67, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

/* ============================================
   TIMER DISPLAY
   ============================================ */
.sp-timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5em;
    font-weight: bold;
    padding: 8px 20px;
    background: rgba(0,0,0,0.05);
    border-radius: 30px;
    display: inline-block;
}

.sp-timer-display-dark {
    background: rgba(255,255,255,0.05);
    color: #eee;
}

/* ============================================
   SCORE DISPLAY
   ============================================ */
.sp-score-display {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    color: #2c3e50;
}

.sp-score-display .sp-score-number {
    color: #4CAF50;
}

.sp-score-display-dark {
    color: #eee;
}

/* ============================================
   VOICE BAR
   ============================================ */
.sp-voice-bar {
    padding: 12px 20px;
    background: #f5f7fa;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
}

.sp-voice-bar-dark {
    background: #1a1a2e;
    border-bottom-color: #3a3a5a;
}

.sp-voice-bar select {
    padding: 8px 12px;
    border-radius: 30px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    font-size: 14px;
}

.sp-voice-bar-dark select {
    background: #2d2d44;
    color: #eee;
    border-color: #3a3a5a;
}

.sp-voice-bar button {
    padding: 8px 18px;
    border-radius: 30px;
    background: #ff9800;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.sp-voice-bar button:hover {
    background: #e68900;
}

.sp-voice-bar .sp-stop-btn {
    background: #f44336;
}

.sp-voice-bar .sp-stop-btn:hover {
    background: #da190b;
}

.sp-voice-bar .lang-label {
    font-size: 12px;
    color: #888;
    margin-left: 5px;
}

.sp-voice-bar .sp-voice-status {
    font-size: 12px;
    color: #888;
    margin-left: 10px;
}

.sp-voice-bar .sp-voice-status.success {
    color: #4CAF50;
}

.sp-voice-bar .sp-voice-status.error {
    color: #f44336;
}

.sp-voice-bar .sp-voice-status.speaking {
    color: #ff9800;
}

/* ============================================
   HEADER
   ============================================ */
.sp-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: white;
}

.sp-header h2 {
    margin: 0;
}

.sp-timer {
    background: rgba(0,0,0,0.3);
    padding: 6px 18px;
    border-radius: 30px;
    font-family: monospace;
    font-size: 1.2em;
}

/* ============================================
   CONTAINER
   ============================================ */
.sp-container {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.sp-container-dark {
    background: #1e1e2f;
    color: #eee;
}

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */
.sp-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: transparent;
    color: #333;
}

.sp-nav-btn:hover {
    transform: scale(1.1);
}

.sp-nav-btn.current {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    transform: scale(1.15);
}

.sp-nav-btn.answered {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.sp-nav-btn.skipped {
    background: #f0ad4e;
    color: white;
    border-color: #f0ad4e;
}

.sp-nav-btn.unanswered {
    border-color: #ddd;
    color: #333;
}

.sp-nav-btn-dark {
    border-color: #3a3a5a;
    color: #eee;
    background: #2d2d44;
}

.sp-nav-btn-dark.current {
    background: #4CAF50;
    border-color: #4CAF50;
}

.sp-nav-btn-dark.answered {
    background: #4CAF50;
    border-color: #4CAF50;
}

.sp-nav-btn-dark.skipped {
    background: #f0ad4e;
    border-color: #f0ad4e;
}

.sp-nav-btn-dark.unanswered {
    border-color: #3a3a5a;
    color: #eee;
}

/* ============================================
   QUESTION CARD
   ============================================ */
.sp-question-card {
    border: 1px solid #e0e4e8;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.sp-question-card.active {
    display: block;
}

.sp-question-card-dark {
    border-color: #3a3a5a;
    background: #2d2d44;
}

/* ============================================
   TRANSCRIPT AREA
   ============================================ */
.sp-transcript-area {
    margin: 15px 0;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    display: block;
}

.sp-transcript-area-dark {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-transcript-area h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.sp-transcript-area-dark h4 {
    color: #eee;
}

.sp-transcript-text {
    padding: 10px;
    background: white;
    border-radius: 8px;
    min-height: 50px;
    font-size: 1.05em;
    line-height: 1.6;
}

.sp-transcript-text-dark {
    background: rgba(255,255,255,0.05);
    color: #eee;
}

.sp-transcript-text .sp-placeholder {
    color: #999;
    font-style: italic;
}

/* ============================================
   RECORDING AREA
   ============================================ */
.sp-recording-area {
    margin: 15px 0;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.sp-recording-area-dark {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-record-status {
    margin-top: 10px;
    font-size: 0.9em;
    color: #888;
}

.sp-status-text.idle { color: #4CAF50; }
.sp-status-text.recording { color: #f44336; }
.sp-status-text.completed { color: #2196F3; }
.sp-status-text.error { color: #f44336; }

/* ============================================
   IMAGE CONTAINER
   ============================================ */
.sp-image-container {
    margin: 15px 0;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.sp-image-container-dark {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-image-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
}

/* ============================================
   STORY GRID
   ============================================ */
.sp-story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 15px 0;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.sp-story-grid-dark {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-story-grid .sp-image-item {
    text-align: center;
}

.sp-story-grid .sp-image-item img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    object-fit: contain;
}

.sp-story-grid .sp-image-item .sp-image-number {
    display: block;
    font-weight: bold;
    margin-top: 8px;
    color: #666;
}

.sp-story-grid-dark .sp-image-item .sp-image-number {
    color: #aaa;
}

/* ============================================
   TOPIC GRID
   ============================================ */
.sp-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 15px 0;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.sp-topic-grid-dark {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-topic-item {
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #ddd;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.sp-topic-item-dark {
    border-color: #3a3a5a;
    background: #2d2d44;
}

.sp-topic-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sp-topic-item.selected {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
    border-color: #E91E63;
    background: #fce4ec;
}

.sp-topic-item-dark.selected {
    border-color: #E91E63;
    background: #3a1a2a;
}

.sp-topic-item .sp-topic-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 10px;
}

.sp-topic-item img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: contain;
}

/* ============================================
   TEXT DISPLAY
   ============================================ */
.sp-text-display {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin: 15px 0;
    font-size: 1.1em;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

.sp-text-display-dark {
    border-color: #3a3a5a;
    background: #1a1a2e;
    color: #eee;
}

.sp-text-display h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.sp-text-display-dark h4 {
    color: #eee;
}

/* ============================================
   INTERVIEW NAV
   ============================================ */
.sp-question-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.sp-question-nav .sp-q-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    color: #333;
    transition: all 0.2s;
}

.sp-question-nav .sp-q-btn-dark {
    border-color: #3a3a5a;
    color: #eee;
}

.sp-question-nav .sp-q-btn:hover {
    border-color: #4A90D9;
}

.sp-question-nav .sp-q-btn.active {
    border-color: #00BCD4;
    background: #00BCD4;
    color: white;
}

.sp-question-nav .sp-q-btn.answered {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
}

.sp-question-nav .sp-q-btn.skipped {
    border-color: #f0ad4e;
    background: #f0ad4e;
    color: white;
}

/* ============================================
   INTERVIEW ITEM
   ============================================ */
.sp-question-item {
    display: none;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

.sp-question-item-dark {
    border-color: #3a3a5a;
    background: #2d2d44;
}

.sp-question-item.active {
    display: block;
}

.sp-question-text {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
}

/* ============================================
   READ TEXT BUTTON
   ============================================ */
.sp-read-text-btn {
    background: #4A90D9;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 4px 14px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.sp-read-text-btn:hover {
    background: #357ABD;
}

/* ============================================
   COMPLETION SCREEN
   ============================================ */
.sp-complete {
    text-align: center;
    padding: 40px;
    margin: 20px;
    border-radius: 24px;
    display: none;
}

.sp-score-large {
    font-size: 2.5em;
    font-weight: bold;
    margin: 15px 0;
    color: #4CAF50;
}

.sp-answers-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    background: #f8f9fa;
}

.sp-answers-box-dark {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-answer-row {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-answer-row-dark {
    border-bottom-color: #3a3a5a;
}

.sp-answer-row:last-child {
    border-bottom: none;
}

.sp-answer-status {
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 12px;
}

.sp-answer-status.correct {
    background: #d4edda;
    color: #155724;
}

.sp-answer-status.incorrect {
    background: #f8d7da;
    color: #721c24;
}

.sp-answer-status.partial {
    background: #fff3cd;
    color: #856404;
}

/* ============================================
   DASHBOARD
   ============================================ */
.sp-dashboard {
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}

.sp-login-card {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.sp-login-card h2 {
    margin-bottom: 20px;
    color: #333;
}

.sp-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.sp-dashboard-header h1 {
    margin: 0;
    color: #2c3e50;
}

.sp-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sp-logout-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
}

.sp-language-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    justify-content: center;
}

.sp-lang-btn {
    padding: 10px 24px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
}

.sp-lang-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.sp-lang-btn:hover {
    transform: translateY(-2px);
}

.sp-exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.sp-exercise-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.sp-exercise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.sp-exercise-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.sp-exercise-desc {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.sp-exercise-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #888;
}

.sp-exercise-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sp-module-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.sp-module-btn:hover {
    transform: scale(1.02);
}

.sp-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* ============================================
   MODAL
   ============================================ */
.sp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.sp-modal-content {
    background: white;
    border-radius: 16px;
    padding: 25px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.sp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sp-modal-header h2 {
    margin: 0;
}

.sp-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.sp-modal-close:hover {
    color: #333;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.sp-form-group {
    margin-bottom: 15px;
}

.sp-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.sp-form-group input,
.sp-form-group select,
.sp-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.sp-form-group textarea {
    resize: vertical;
}

.sp-form-group input:focus,
.sp-form-group select:focus,
.sp-form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

/* ============================================
   TEACHER DASHBOARD
   ============================================ */
.sp-teacher-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.sp-teacher-header {
    background: white;
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sp-teacher-header h1 {
    margin: 0;
    color: #2c3e50;
}

.sp-toolbar {
    background: white;
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sp-panel {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sp-panel h3 {
    margin-top: 0;
}

.sp-panel.hidden {
    display: none;
}

.sp-exercise-list {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sp-exercise-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.sp-exercise-item:hover {
    background: #f9f9f9;
}

.sp-exercise-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.sp-exercise-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.sp-exercise-desc {
    font-size: 0.9em;
    color: #888;
}

.sp-module-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.sp-module-btn-teach {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.sp-module-btn-teach:hover {
    background: #1976D2;
}

.sp-delete-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    margin-left: 10px;
    transition: background 0.2s;
}

.sp-delete-btn:hover {
    background: #da190b;
}

.sp-question-count {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

/* ============================================
   ADMIN DASHBOARD
   ============================================ */
.sp-admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.sp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.sp-stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sp-stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
}

.sp-stat-label {
    color: #888;
    font-size: 0.9em;
    margin-top: 5px;
}

.sp-danger-zone {
    border: 2px solid #f44336;
    border-radius: 12px;
    padding: 20px;
    background: #fff5f5;
    margin-top: 20px;
}

.sp-danger-zone h3 {
    color: #f44336;
    margin-top: 0;
}

/* ============================================
   SETTINGS
   ============================================ */
.sp-settings {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.sp-settings-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.sp-preview {
    transition: all 0.3s;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: center;
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sp-dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sp-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sp-exercises-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .sp-voice-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sp-voice-bar select {
        width: 100%;
    }
    
    .sp-story-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-topic-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-module-buttons {
        flex-direction: column;
    }
    
    .sp-delete-btn {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .sp-modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .sp-image-container img {
        max-height: 250px;
    }
    
    .sp-record-btn {
        padding: 12px 30px;
        font-size: 1em;
    }
    
    .sp-text-display {
        font-size: 1em;
    }
    
    .sp-question-nav {
        justify-content: center;
    }
    
    .sp-answer-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .sp-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-stat-number {
        font-size: 2em;
    }
    
    .sp-exercise-card {
        padding: 15px;
    }
    
    .sp-login-card {
        padding: 25px;
        margin: 20px;
    }
    
    .sp-timer {
        font-size: 1em;
        padding: 4px 12px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.sp-text-center {
    text-align: center;
}

.sp-text-left {
    text-align: left;
}

.sp-text-right {
    text-align: right;
}

.sp-mt-10 { margin-top: 10px; }
.sp-mt-20 { margin-top: 20px; }
.sp-mt-30 { margin-top: 30px; }
.sp-mb-10 { margin-bottom: 10px; }
.sp-mb-20 { margin-bottom: 20px; }
.sp-mb-30 { margin-bottom: 30px; }

.sp-flex {
    display: flex;
}

.sp-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sp-flex-wrap {
    flex-wrap: wrap;
}

.sp-gap-10 { gap: 10px; }
.sp-gap-20 { gap: 20px; }

.sp-hidden {
    display: none !important;
}

.sp-visible {
    display: block !important;
}

/* ============================================
   DARK MODE OVERRIDES
   ============================================ */
.sp-dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #eee;
}

.sp-dark-mode .sp-card {
    background: #1e1e2f;
    color: #eee;
    border: 1px solid #3a3a5a;
}

.sp-dark-mode .sp-exercise-card {
    background: #1e1e2f;
    color: #eee;
    border: 1px solid #3a3a5a;
}

.sp-dark-mode .sp-exercise-title {
    color: #eee;
}

.sp-dark-mode .sp-exercise-desc {
    color: #aaa;
}

.sp-dark-mode .sp-exercise-meta {
    color: #888;
}

.sp-dark-mode .sp-login-card {
    background: #1e1e2f;
    color: #eee;
}

.sp-dark-mode .sp-login-card h2 {
    color: #eee;
}

.sp-dark-mode .sp-input {
    background: #1a1a2e;
    color: #eee;
    border-color: #3a3a5a;
}

.sp-dark-mode .sp-dashboard-header h1 {
    color: #eee;
}

.sp-dark-mode .sp-lang-btn {
    background: #1e1e2f;
    color: #eee;
    border-color: #3a3a5a;
}

.sp-dark-mode .sp-lang-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.sp-dark-mode .sp-modal-content {
    background: #1e1e2f;
    color: #eee;
}

.sp-dark-mode .sp-modal-header {
    border-bottom-color: #3a3a5a;
}

.sp-dark-mode .sp-modal-close {
    color: #aaa;
}

.sp-dark-mode .sp-modal-close:hover {
    color: #fff;
}

.sp-dark-mode .sp-form-group input,
.sp-dark-mode .sp-form-group select,
.sp-dark-mode .sp-form-group textarea {
    background: #1a1a2e;
    color: #eee;
    border-color: #3a3a5a;
}

.sp-dark-mode .sp-form-group label {
    color: #eee;
}

.sp-dark-mode .sp-panel {
    background: #1e1e2f;
    color: #eee;
}

.sp-dark-mode .sp-exercise-item {
    background: #1a1a2e;
    border-color: #3a3a5a;
}

.sp-dark-mode .sp-exercise-item:hover {
    background: #2d2d44;
}

.sp-dark-mode .sp-stat-card {
    background: #1e1e2f;
    color: #eee;
}

.sp-dark-mode .sp-stat-number {
    color: #eee;
}

.sp-dark-mode .sp-stat-label {
    color: #aaa;
}

.sp-dark-mode .sp-teacher-header {
    background: #1e1e2f;
    color: #eee;
}

.sp-dark-mode .sp-teacher-header h1 {
    color: #eee;
}

.sp-dark-mode .sp-toolbar {
    background: #1e1e2f;
}

.sp-dark-mode .sp-settings-card {
    background: #1e1e2f;
    color: #eee;
}

.sp-dark-mode .sp-answers-box {
    background: #1a1a2e;
    border-color: #3a3a5a;
    color: #eee;
}

.sp-dark-mode .sp-answer-row {
    border-bottom-color: #3a3a5a;
}

.sp-dark-mode .sp-answer-status.correct {
    background: #1a3a2a;
    color: #8bc34a;
}

.sp-dark-mode .sp-answer-status.incorrect {
    background: #3a1a1a;
    color: #ef9a9a;
}

.sp-dark-mode .sp-answer-status.partial {
    background: #3a2a1a;
    color: #ffcc80;
}

.sp-dark-mode .sp-question-card {
    border-color: #3a3a5a;
    background: #2d2d44;
}

.sp-dark-mode .sp-question-item {
    border-color: #3a3a5a;
    background: #2d2d44;
}

.sp-dark-mode .sp-text-display {
    border-color: #3a3a5a;
    background: #1a1a2e;
    color: #eee;
}

.sp-dark-mode .sp-text-display h4 {
    color: #eee;
}

.sp-dark-mode .sp-transcript-area {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-dark-mode .sp-transcript-area h4 {
    color: #eee;
}

.sp-dark-mode .sp-transcript-text {
    background: rgba(255,255,255,0.05);
    color: #eee;
}

.sp-dark-mode .sp-recording-area {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-dark-mode .sp-image-container {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-dark-mode .sp-story-grid {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-dark-mode .sp-story-grid .sp-image-item .sp-image-number {
    color: #aaa;
}

.sp-dark-mode .sp-topic-grid {
    border-color: #3a3a5a;
    background: #1a1a2e;
}

.sp-dark-mode .sp-topic-item {
    border-color: #3a3a5a;
    background: #2d2d44;
}

.sp-dark-mode .sp-topic-item.selected {
    border-color: #E91E63;
    background: #3a1a2a;
}

.sp-dark-mode .sp-question-nav .sp-q-btn {
    border-color: #3a3a5a;
    color: #eee;
}

.sp-dark-mode .sp-question-nav .sp-q-btn.active {
    border-color: #00BCD4;
    background: #00BCD4;
}

.sp-dark-mode .sp-question-nav .sp-q-btn.answered {
    border-color: #4CAF50;
    background: #4CAF50;
}

.sp-dark-mode .sp-question-nav .sp-q-btn.skipped {
    border-color: #f0ad4e;
    background: #f0ad4e;
}


