body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    color: #222;
    line-height: 1.6;
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  .page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* Hero Section */
  .hero-section {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  }
  
  .hero-section h1 {
    font-size: 3.2em;
    letter-spacing: -1px;
  }
  
  .hero-section p {
    font-size: 1.4em;
    max-width: 700px;
    margin: 0 auto 30px;
  }
  
  /* CTA Buttons */
  .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .cta-button {
    padding: 15px 35px;
    font-size: 1.1em;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .cta-primary {
    background: #28a745;
    color: white;
  }
  
  .cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
  }
  
  .cta-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
  }
  
  .cta-secondary:hover {
    background-color: #f0f2ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
  }
  
  /* Emphasized login button */
  .cta-login {
    background: #667eea;
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    animation: pulse-login 2s infinite;
  }
  
  .cta-login:hover {
    background: #5a67d8;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  }
  
  @keyframes pulse-login {
    0% {
      box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
      box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
  }
  
  /* Login prompt for unauthenticated users */
  .login-prompt {
    background: #f0f7ff;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px 25px;
    margin-bottom: 30px;
    text-align: center;
    animation: slideDown 0.5s ease-out;
  }
  
  .login-prompt p {
    margin: 0;
    color: #333;
    font-size: 1.1em;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Features */
  .features-section {
    padding: 60px 20px;
    background-color: #ffffff;
  }
  
  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
  }
  
  .feature-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s;
  }
  
  .feature-card:hover {
    transform: translateY(-5px);
  }
  
  .feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
  }
  
  /* How it works */
  .how-it-works {
    background-color: #f8f9fa;
    padding: 70px 20px;
    border-top: 1px solid #e0e0e0;
  }
  
  .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .step {
    text-align: center;
  }
  
  .step-number {
    display: inline-block;
    width: 55px;
    height: 55px;
    background-color: #667eea;
    color: white;
    border-radius: 50%;
    line-height: 55px;
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  /* Container styles */
  .container {
    background-color: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
  }

  /* Video detail styles */
  .video-detail-container {
    max-width: 1000px;
    margin: 0 auto;
  }

  .video-player-wrapper {
    margin-bottom: 30px;
  }

  .video-controls-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
    gap: 10px;
  }

  .transcript-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
  }

  .transcript-link:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
  }

  .transcript-icon {
    font-size: 16px;
  }

  .video-player-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
  }

  .video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .video-info h1 {
    text-align: left;
    margin-bottom: 15px;
  }

  .video-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    font-size: 0.9em;
    color: #666;
  }

  .video-summary {
    margin-top: 30px;
  }

  .summary-content {
    line-height: 1.8;
    color: #333;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    background-color: #f9f9f9;
  }
  
  .summary-content::-webkit-scrollbar {
    width: 8px;
  }
  
  .summary-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }
  
  .summary-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }
  
  .summary-content::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

  /* Clickable sentences - IMPORTANT FOR FUNCTIONALITY */
  .clickable-sentence {
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    padding: 2px 4px;
    border-radius: 3px;
    display: inline;
  }

  .clickable-sentence:hover {
    background-color: #e3f2fd;
    color: #1976d2;
  }
  
  /* Clickable words in Sprechübung for mobile */
  .clickable-sentence-word {
    display: inline-block;
    padding: 5px 8px;
    margin: 2px;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    user-select: none;
  }
  
  .clickable-sentence-word:hover {
    background-color: #e3f2fd;
  }
  
  .clickable-sentence-word:active {
    transform: scale(0.95);
  }

  /* Back button */
  .back-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
    margin-bottom: 20px;
  }

  .back-button:hover {
    background-color: #5a6268;
  }

  /* Loading and error states */
  .loading {
    text-align: center;
    color: #666;
    padding: 40px;
  }

  .error {
    text-align: center;
    color: #dc3545;
    padding: 40px;
  }

  /* Dictation Modal Styles */
  .dictation-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
  }

  .dictation-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
  }

  .close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
  }

  .close-button:hover {
    color: #000;
  }

  .sentence-display {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    font-size: 1.2em;
    line-height: 1.6;
    border: 2px solid #e9ecef;
    margin-bottom: 20px;
  }

  .dictation-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
  }
  
  .dictation-controls .control-button {
    padding: 8px 16px;
    font-size: 0.95em;
    flex: 1;
    max-width: 200px;
  }

  .control-button {
    flex: 1;
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
  }

  .control-button:hover {
    background-color: #218838;
  }

  /* Speech button styles */
  .speech-button {
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
  }

  .speech-button:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
  }

  .speech-button.listening {
    background-color: #28a745;
    animation: pulse 1.5s infinite;
  }

  @keyframes pulse {
    0% {
      box-shadow: 0 2px 10px rgba(40, 167, 69, 0.4);
    }
    50% {
      box-shadow: 0 2px 20px rgba(40, 167, 69, 0.6);
    }
    100% {
      box-shadow: 0 2px 10px rgba(40, 167, 69, 0.4);
    }
  }

  .speech-controls {
    text-align: center;
    margin-bottom: 20px;
  }

  .transcribed-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    min-height: 50px;
    font-size: 1.1em;
    line-height: 1.5;
    margin-top: 10px;
  }

  /* Word comparison styles */
  .word-comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-top: 15px;
  }

  .word-correct {
    color: #28a745;
    font-weight: 600;
    padding: 4px 8px;
    background-color: #d4edda;
    border-radius: 4px;
  }

  .word-exists {
    color: #ff9800;
    font-weight: 600;
    padding: 4px 8px;
    background-color: #fff3cd;
    border-radius: 4px;
  }

  .word-incorrect {
    color: #dc3545;
    font-weight: 600;
    padding: 4px 8px;
    background-color: #f8d7da;
    border-radius: 4px;
  }

  /* Search Page Styles */
  .search-container {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
  }

  .search-container input {
    flex-grow: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.2s;
  }

  .search-container input:focus {
    border-color: #007bff;
  }

  .category-filter {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    background-color: white;
    min-width: 150px;
    cursor: pointer;
    font-size: 16px;
    transition: border-color 0.2s;
  }

  .category-filter:focus {
    border-color: #007bff;
  }

  .search-container button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
  }

  .search-container button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  }

  .search-info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #666;
  }

  /* Results Grid */
  .results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
  }

  .video-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
  }

  .video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  }

  .video-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
  }

  .video-card-content {
    padding: 15px;
  }

  .video-card h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #333;
    min-height: 45px;
    line-height: 1.4;
  }

  .video-card p {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .video-channel {
    font-size: 0.85em;
    color: #555;
    font-weight: 500;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .video-channel::before {
    content: "📺";
    font-size: 0.9em;
  }

  .video-category {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-top: 10px;
  }

  /* Pagination */
  .pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
  }

  .pagination-button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
  }

  .pagination-button:hover:not(:disabled) {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
  }

  .pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .pagination-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
  }

  .pagination-info {
    color: #666;
    font-size: 0.9em;
  }

  /* Vocabulary and Cloze Test Sections */
  .vocabulary-section,
  .cloze-section {
    margin-top: 30px;
    padding: 25px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  }

  .vocabulary-container,
  .cloze-container {
    margin-top: 20px;
  }

  .placeholder-text {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
  }

  /* Checkmark indicators for search page */
  .feature-indicators {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }

  .feature-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85em;
    color: #28a745;
  }

  .feature-indicator.inactive {
    color: #ccc;
  }

  .feature-indicator .checkmark {
    font-size: 1.1em;
  }

  /* Feature filters */
  .feature-filters {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.2s;
    user-select: none;
  }

  .filter-checkbox:hover {
    border-color: #007bff;
    background-color: #f0f7ff;
  }

  .filter-checkbox input[type="checkbox"] {
    display: none;
  }

  .filter-checkbox .checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    line-height: 18px;
    font-size: 14px;
    color: transparent;
    transition: all 0.2s;
  }

  .filter-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
  }

  .filter-checkbox input[type="checkbox"]:checked ~ span {
    font-weight: 600;
  }

  /* SpaCy Vocabulary Styles */
  .loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
  }

  .loading-detail {
    font-size: 0.9em;
    color: #999;
    margin-top: 5px;
  }

  /* Spinner animation */
  .spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
  }

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

  .vocab-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
  }

  .stat-item {
    text-align: center;
  }

  .stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
  }

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

  .vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
  }

  .vocab-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .vocab-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }

  .word-main {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
  }

  .word-lemma {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
  }

  .word-pos {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    color: white;
    font-size: 0.75em;
    font-weight: 600;
    margin-bottom: 5px;
  }

  .word-frequency {
    font-size: 0.85em;
    color: #999;
  }

  .word-stop {
    font-size: 0.75em;
    color: #ff6b6b;
    font-style: italic;
    margin-top: 5px;
  }

  .word-translation-small {
    font-size: 1.1em;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 8px;
    padding: 5px;
    background: #e3f2fd;
    border-radius: 4px;
    text-align: center;
  }

  /* Cloze Test Styles */
  .cloze-test {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
  }

  .cloze-sentence {
    font-size: 1.2em;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
  }

  .cloze-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }

  .cloze-option-btn {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
  }

  .cloze-option-btn:hover:not(:disabled) {
    border-color: #007bff;
    background-color: #f0f7ff;
  }

  .cloze-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
  }

  .cloze-option-btn.correct {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
  }

  .cloze-option-btn.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
  }

  .cloze-result {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 15px;
  }

  .cloze-result.correct {
    background-color: #d4edda;
    color: #155724;
  }

  .cloze-result.incorrect {
    background-color: #f8d7da;
    color: #721c24;
  }

  .cloze-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #e9ecef;
    border-radius: 8px;
    font-size: 0.9em;
  }

  .cloze-final-results {
    text-align: center;
    padding: 40px;
  }

  .cloze-final-results h3 {
    color: #333;
    margin-bottom: 20px;
  }

  .cloze-final-results p {
    font-size: 1.2em;
    margin-bottom: 15px;
  }

  /* Word context modal styles */
  .word-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
  }

  .word-info p {
    margin: 5px 0;
  }

  .example-sentences {
    margin-top: 20px;
  }

  .example-sentence {
    padding: 10px;
    margin: 10px 0;
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    border-radius: 4px;
    line-height: 1.6;
  }

/* Practice Modal for Vocabulary */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    position: relative;
}

.modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.modal .close:hover,
.modal .close:focus {
    color: #000;
    text-decoration: none;
}

.practice-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
}

.vocab-practice-container {
    min-height: 400px;
}

.vocab-card-side {
    display: none;
}

.vocab-card-side:first-child {
    display: block;
}

.word-main-large {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.word-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.word-details p {
    margin: 8px 0;
    font-size: 1.1em;
}

.example-sentences {
    margin: 20px 0;
}

.example-sentences h4 {
    color: #495057;
    margin-bottom: 10px;
}

.example-sentence {
    background: #e9ecef;
    padding: 10px;
    margin: 8px 0;
    border-radius: 5px;
    font-style: italic;
}

.word-hint {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.example-with-blank {
    font-size: 1.2em;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.recall-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.recall-input input {
    flex: 1;
    padding: 10px;
    font-size: 1.1em;
    border: 2px solid #ced4da;
    border-radius: 5px;
}

.recall-input input:focus {
    outline: none;
    border-color: #80bdff;
}

.recall-result {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

.recall-result.partial {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

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

.difficulty-buttons {
    text-align: center;
    padding: 20px 0;
}

.difficulty-buttons p {
    margin-bottom: 15px;
    font-weight: 600;
}

.diff-btn {
    padding: 10px 20px;
    margin: 0 5px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.diff-btn:nth-child(2) {
    background: #28a745;
    color: white;
}

.diff-btn:nth-child(3) {
    background: #17a2b8;
    color: white;
}

.diff-btn:nth-child(4) {
    background: #ffc107;
    color: #212529;
}

.diff-btn:nth-child(5) {
    background: #dc3545;
    color: white;
}

.diff-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#wordStats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#wordStats p {
    margin: 10px 0;
    font-size: 1.1em;
}

/* Translation styles */
.word-translation {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
}

.translation-text {
    font-size: 1.8em;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 5px;
}

.translation-lang {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.pronunciation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* Test prompt styles */
.test-prompt {
    margin-bottom: 30px;
}

.translation-prompt {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.prompt-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.prompt-text {
    font-size: 1.5em;
    font-weight: 600;
    color: #1976d2;
}

.prompt-lang {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.prompt-instruction {
    font-size: 0.95em;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

.context-prompt {
    margin-bottom: 20px;
}

/* No translation available styles */
.word-translation.no-translation {
    background: #fff3cd;
    border: 1px solid #ffeeba;
}

.word-translation.no-translation .translation-text {
    color: #856404;
    font-size: 1.3em;
}

.translation-note {
    font-size: 0.85em;
    color: #856404;
    font-style: italic;
    margin-top: 5px;
}

/* Vocabulary dictation section */
.vocab-dictation-section {
    text-align: center;
    padding: 20px 0;
}

#vocabTranscribedText {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    min-height: 50px;
    font-size: 1.1em;
    line-height: 1.5;
    margin-top: 10px;
    margin-bottom: 20px;
    color: #333;
}

.listening-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.listening-animation {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.pulse {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse-animation 1.4s infinite ease-in-out;
}

.pulse:nth-child(1) {
    animation-delay: -0.32s;
}

.pulse:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pulse-animation {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Vocabulary Card Inline Dictation Styles */
.word-main-translation {
    font-size: 1.4em;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.word-main-translation:hover {
    background-color: rgba(25, 118, 210, 0.1);
}

/* Cloze Type Selection Styles */
.cloze-type-selector {
    margin-bottom: 20px;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
}

.cloze-type-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.cloze-type-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cloze-type-btn {
    padding: 6px 14px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.cloze-type-btn:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

.cloze-type-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.cloze-type-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cloze dictation controls */
.cloze-dictation-controls {
    margin-bottom: 20px;
    text-align: center;
}

.cloze-dictation-controls .btn-speech {
    background: #f39c12;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.cloze-dictation-controls .btn-speech:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.word-dictation-area {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dictate-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dictate-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.dictate-btn.listening {
    background: #dc3545;
}

.dictate-btn.listening:hover {
    background: #c82333;
}

.dictation-result {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.dictation-feedback p {
    margin: 5px 0;
}

.dictation-feedback p strong {
    color: #495057;
}

.rating-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.rate-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.rate-btn.easy {
    border-color: #28a745;
}

.rate-btn.easy:hover {
    background: #28a745;
    color: white;
}

.rate-btn.good {
    border-color: #17a2b8;
}

.rate-btn.good:hover {
    background: #17a2b8;
    color: white;
}

.rate-btn.hard {
    border-color: #ffc107;
}

.rate-btn.hard:hover {
    background: #ffc107;
    color: #212529;
}

.rate-btn.again {
    border-color: #dc3545;
}

.rate-btn.again:hover {
    background: #dc3545;
    color: white;
}

.rating-feedback {
    margin-top: 15px;
    padding: 10px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
}

.rating-feedback .success {
    margin: 0 0 5px 0;
    font-weight: 600;
}

.word-details-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.85em;
}

.word-pos-small {
    padding: 3px 8px;
    border-radius: 4px;
    color: white;
    font-size: 0.8em;
    font-weight: 500;
}

.word-freq {
    color: #6c757d;
    font-weight: 500;
}

/* Practice Mode Selector Styles */
.vocab-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.practice-mode-selector {
    padding: 8px 16px;
    font-size: 1em;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.practice-mode-selector:hover {
    border-color: #1976d2;
}

.practice-mode-selector:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Sentences List Styles */
.sentences-list {
    max-width: 800px;
    margin: 0 auto;
}

.sentence-card {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.sentence-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sentence-number {
    font-weight: 600;
    color: #6c757d;
    margin-right: 20px;
    font-size: 0.9em;
}

.sentence-content {
    flex: 1;
}

.sentence-translation {
    font-size: 1.1em;
    color: #1976d2;
    margin-bottom: 5px;
}

.sentence-original {
    font-size: 0.9em;
    color: #6c757d;
}

.practice-sentence-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.practice-sentence-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

/* Word Selection List Styles */
.word-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refresh-words-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-words-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.selected-words-list {
    display: grid;
    gap: 10px;
}

.selected-word-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s ease;
}

.selected-word-item:hover {
    background: #f8f9fa;
}

.word-number {
    font-weight: 600;
    color: #6c757d;
    margin-right: 15px;
    min-width: 30px;
}

.word-translation {
    flex: 1;
    font-size: 1.1em;
    color: #1976d2;
}

.mini-practice-btn {
    background: #28a745;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-practice-btn:hover {
    background: #218838;
    transform: scale(1.1);
}

/* Word Selection Display */
.word-selection-display {
    font-size: 1.3em;
    line-height: 2;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.word-selection-item {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px 0;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #1976d2;
}

.word-selection-item:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    transform: scale(1.05);
}

.word-selection-item.practiced {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.word-separator {
    color: #6c757d;
    margin: 0 4px;
}

/* Word Practice Modal */
.word-practice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.word-practice-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.practice-word-display {
    text-align: center;
    margin-bottom: 30px;
}

.translation-large {
    font-size: 2.5em;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 10px;
}

.instruction {
    font-size: 1.1em;
    color: #666;
}

.dictation-section {
    text-align: center;
    margin-bottom: 30px;
}

.dictate-btn.large {
    font-size: 1.2em;
    padding: 15px 30px;
}

.word-result {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.result-text {
    font-size: 1.3em;
    color: #333;
    margin: 0;
}

.listening-text {
    color: #6c757d;
    font-style: italic;
}

.error-text {
    color: #dc3545;
}

.word-feedback {
    margin-top: 20px;
}

.feedback-success,
.feedback-error {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.feedback-success {
    background: #d4edda;
    color: #155724;
}

.feedback-error {
    background: #f8d7da;
    color: #721c24;
}

.word-hint {
    text-align: center;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.hint-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hint-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.german-reveal {
    margin-top: 15px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
}

.german-reveal p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.play-word-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-word-btn:hover {
    background: #218838;
}

.try-again-btn {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.try-again-btn:hover {
    background: #e0a800;
}

/* Sentences Modal Styles for Word Context */
.sentences-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.sentences-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sentences-modal-content h2 {
    padding: 20px 30px;
    margin: 0;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.5em;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 20px;
}

.close-modal:hover {
    color: #000;
}

.word-sentences-list {
    padding: 20px 30px;
    overflow-y: auto;
    flex: 1;
}

.word-sentence-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.word-sentence-item:hover {
    background: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.word-sentence-item .sentence-number {
    font-weight: 600;
    color: #6c757d;
    min-width: 25px;
}

.word-sentence-item .sentence-content {
    flex: 1;
}

.word-sentence-item .sentence-translation {
    font-size: 1.1em;
    color: #1976d2;
    margin-bottom: 8px;
    line-height: 1.5;
}

.word-sentence-item .sentence-original {
    font-size: 0.95em;
    color: #495057;
    line-height: 1.5;
}

.highlighted-word {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.word-sentence-item .practice-sentence-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.95em;
}

.word-sentence-item .practice-sentence-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

/* Word Search Header Styles */
.word-search-header {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.search-word-display {
    font-size: 2em;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 10px;
}

.search-instruction {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

/* Clickable Words in Sentences */
.sentence-clickable {
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
}

.clickable-word {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.clickable-word:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.clickable-word.wrong-selection {
    background: #ff9800;
    color: white;
    animation: shake 0.5s ease-in-out;
}

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

/* Other Videos Note */
.other-videos-note {
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
}

/* Sentences from Other Videos */
.word-sentence-item.from-other-video {
    background: #f0f7ff;
    border-color: #b8daff;
}

.video-source {
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
}

/* Sentence Controls */
.sentence-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.mini-play-btn,
.mini-play-slow-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #28a745;
    background: white;
    color: #28a745;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-play-btn:hover,
.mini-play-slow-btn:hover {
    background: #28a745;
    color: white;
    transform: scale(1.1);
}

.mini-play-slow-btn {
    border-color: #17a2b8;
    color: #17a2b8;
}

.mini-play-slow-btn:hover {
    background: #17a2b8;
    color: white;
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease-in-out;
}

.success-modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-in-out;
}

.success-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: checkmark 0.5s ease-in-out;
}

.success-modal-content h3 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.success-modal-content p {
    font-size: 1.2em;
    margin-bottom: 25px;
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Word Selection Modal Styles */
.word-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.word-selection-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.word-selection-header {
    padding: 25px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.selection-word-display {
    font-size: 2.5em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.selection-instruction {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

.word-options-grid {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    overflow-y: auto;
    flex: 1;
}

.word-option {
    padding: 15px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.word-option:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.word-option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    animation: correctPulse 0.5s ease-in-out;
}

.word-option.wrong {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
    animation: shake 0.5s ease-in-out;
}

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

/* Speech result styling for better visibility */
.speech-result {
    margin: 20px 0;
    padding: 20px;
    background-color: #f0f7ff;
    border-radius: 8px;
    min-height: 100px;
    border: 2px solid #d0e3ff;
}

.speech-result .result-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.transcribed-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    min-height: 50px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.speech-controls {
    text-align: center;
    margin: 15px 0;
}

/* Questions Section Styles */
.questions-section {
    margin-top: 40px;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.questions-container {
    margin-top: 20px;
}

.question-test {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.6;
}

/* Question Header with Info Button */
.question-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.question-header .question-text {
    flex: 1;
    margin-bottom: 0;
}

.context-info-btn {
    background: none;
    border: 2px solid #667eea;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.context-info-btn:hover {
    background: #667eea;
    transform: scale(1.1);
}

/* Context Modal */
.context-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.context-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

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

.context-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.context-modal-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.context-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.context-modal-close:hover {
    opacity: 1;
}

.context-modal-body {
    padding: 20px;
}

.context-chunk-info {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.context-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.8;
    color: #333;
    font-size: 1em;
    white-space: pre-wrap;
}

.question-options {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.question-option-btn {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    border-radius: 8px;
    font-size: 1em;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.question-option-btn:hover:not(:disabled) {
    border-color: #007bff;
    background-color: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
}

.question-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.question-option-btn.correct {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.question-option-btn.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.question-result {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.question-result .correct {
    color: #28a745;
    font-size: 1.2em;
    font-weight: 600;
}

.question-result .incorrect {
    color: #dc3545;
    font-size: 1.2em;
    font-weight: 600;
}

.question-result .explanation {
    margin-top: 10px;
    padding: 15px;
    background-color: #f0f7ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    font-size: 0.95em;
    line-height: 1.5;
}

.question-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9em;
    color: #666;
}

.question-final-results {
    text-align: center;
    padding: 40px;
}

.question-final-results h3 {
    color: #007bff;
    margin-bottom: 20px;
}

.question-final-results p {
    font-size: 1.1em;
    margin: 10px 0;
}


/* AI Summary Enhancements */
.ai-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 10px;
}

.ai-processing {
    display: inline-block;
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.ai-summary {
    background: linear-gradient(to right, #f3f4f6, #ffffff);
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.short-summary {
    font-size: 1.1em;
    line-height: 1.6;
    color: #374151;
}
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.ai-summary {
    background: linear-gradient(to right, #f3f4f6, #ffffff);
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.short-summary {
    font-size: 1.1em;
    line-height: 1.6;
    color: #374151;
}


/* Navigation buttons for dictation modal */
.nav-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    margin: 0 5px;
}

.nav-button:hover {
    background-color: #0056b3;
}

.nav-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.history-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    margin: 0 5px;
}

.history-button:hover {
    background-color: #5a6268;
}

/* Clickable headers */
.clickable-header {
    color: #2c3e50;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.clickable-header:hover {
    color: #3498db;
}

.clickable-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.clickable-header:hover::after {
    width: 100%;
}

/* Side-by-side sections layout */
.sections-row {
    display: flex;
    gap: 20px;
    margin: 0 -10px;
}

.half-section {
    flex: 1;
    margin: 0 10px;
}

/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    .sections-row {
        flex-direction: column;
        margin: 0;
    }
    
    .half-section {
        margin: 0 0 20px 0;
    }
}

/* Search options */
.search-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 15px 0;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label:hover,
.radio-label:hover {
    color: #007bff;
}

.subtitle-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.subtitle-filter label {
    color: #333;
    font-weight: 500;
}

.subtitle-quality-filter {
    padding: 6px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s;
}

.subtitle-quality-filter:hover,
.subtitle-quality-filter:focus {
    border-color: #007bff;
    outline: none;
}

/* Subtitle quality badges */
.video-metadata {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.subtitle-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.subtitle-badge.manual {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.subtitle-badge.auto-generated {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Video tag badges */
.tag-badge {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px 4px 2px 0;
    font-size: 0.75em;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tag-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Specific tag styles */
.tag-badge.tag-topvideos {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tag-badge.tag-featured {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #333;
}

.tag-badge.tag-beginner {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

.tag-badge.tag-intermediate {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    color: #333;
}

.tag-badge.tag-advanced {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

/* Channel search styles */
.channels-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.channel-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.channel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.channel-card-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.channel-icon {
    font-size: 2.5em;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-name {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.channel-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.video-count {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.channel-category {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.75em;
    background-color: #e7f3ff;
    color: #0066cc;
    border-radius: 10px;
    font-weight: 600;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options label {
    font-weight: 500;
    color: #555;
}

.sort-filter {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95em;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-filter:hover {
    border-color: #667eea;
}

.sort-filter:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Channel filter info */
.channel-filter-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f7ff 100%);
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.channel-filter-info strong {
    color: #0066cc;
}

.clear-filter-btn {
    background-color: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s;
}

.clear-filter-btn:hover {
    background-color: #5a67d8;
}

/* Bewerbungsservice Feature Card Highlight */
.bewerbung-highlight {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.bewerbung-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

.bewerbung-highlight h3,
.bewerbung-highlight p {
    color: white;
    position: relative;
    z-index: 1;
}

.bewerbung-highlight .feature-icon {
    position: relative;
    z-index: 1;
}

.bewerbung-highlight .feature-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.bewerbung-highlight .feature-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}
