/**
 * WP Audio Tracks - Frontend Styles
 * 
 * Styles for the audio recording plugin frontend display
 */

/* Main Container */
.wp-audio-tracks-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 1.2em;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.theme-toggle-icon {
    transition: opacity 0.3s ease;
}

.theme-toggle-icon.dark-icon {
    opacity: 0;
    position: absolute;
}

.theme-toggle-icon.light-icon {
    opacity: 1;
}

/* System theme indicator */
.theme-toggle.system-mode .theme-toggle-icon {
    opacity: 0.6;
}

.theme-toggle.system-mode::after {
    content: '🔄';
    position: absolute;
    font-size: 0.8em;
    bottom: -2px;
    right: -2px;
    opacity: 0.7;
}

/* Dark mode styles */
.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.dark-mode .theme-toggle {
    background: #333;
    border-color: #555;
    color: #fff;
}

.dark-mode .theme-toggle-icon.light-icon {
    opacity: 0;
}

.dark-mode .theme-toggle-icon.dark-icon {
    opacity: 1;
}

/* Single Recording Styles */
.recording-single {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.recording-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

.recording-title {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.2;
    font-weight: 600;
}


.recording-thumbnail {
    margin: 20px 30px;
}

.recording-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Recording Details Section */
.recording-details {
    padding: 0 30px 30px;
    margin-bottom: 20px;
}

.recording-session,
.recording-speaker,
.recording-sections {
    margin-bottom: 15px;
    color: #666;
    font-size: 1.1em;
}

.recording-session strong,
.recording-speaker strong,
.recording-sections strong {
    color: #333;
    margin-right: 8px;
}

.recording-sections a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recording-sections a:hover {
    color: #005177;
    text-decoration: underline;
}

.recording-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #444;
    margin-top: 20px;
}

.recording-description p {
    margin-bottom: 15px;
}

/* Audio Player Container */
.recording-player-container {
    background: #f8f9fa;
    padding: 30px;
    margin: 20px 30px 30px 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recording-player-container h3 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.security-icon {
    font-size: 1.2em;
    color: #666;
    opacity: 0.8;
}

.secure-audio-player {
    position: relative;
}

.secure-audio-player audio {
    width: 100%;
    max-width: 600px;
    height: 54px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
    border: 1px solid #ddd;
}

/* Custom Secure Audio Player Styles */
.secure-audio-player-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.play-pause-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.play-pause-btn:hover {
    background: #005177;
    transform: scale(1.05);
}

.play-pause-btn:active {
    transform: scale(0.95);
}

.play-pause-btn.preloading {
    position: relative;
    background: #ffa500;
}

.play-pause-btn.preloading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.wake-lock-indicator {
    display: inline-block;
    margin-left: 10px;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    cursor: help;
    vertical-align: middle;
}

.wake-lock-indicator:hover {
    opacity: 1;
}

/* Resume Progress Styles */
.resume-prompt {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.resume-prompt-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.resume-prompt p {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #333;
}

.resume-indicator {
    animation: slideIn 0.3s ease-out;
}

/* Network Error Styles */
.offline-message,
.retry-message,
.permanent-error {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.offline-icon,
.retry-icon,
.error-icon {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.retry-spinner {
    animation: spin 1s linear infinite;
}

/* Responsive error messages */
@media (max-width: 768px) {
    .offline-content,
    .retry-content,
    .error-content {
        padding: 20px !important;
        max-width: 280px !important;
    }
    
    .offline-icon,
    .retry-icon,
    .error-icon {
        font-size: 36px !important;
    }
    
    .error-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-bar {
    position: relative;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0 10px;
}

.progress-bar:hover {
    background: #ddd;
}

/* Mobile-friendly progress bar */
@media (max-width: 768px) {
    .progress-bar {
        height: 12px;
        border-radius: 6px;
        margin: 0 8px;
    }
    
    .progress-bar:hover {
        background: #ccc;
    }
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005177);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
}

@media (max-width: 768px) {
    .progress-fill {
        border-radius: 6px;
    }
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 20px;
    height: 20px;
    background: #0073aa;
    border: 3px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.progress-handle:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    background: #005177;
}

.progress-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
    background: #003d5c;
}

/* Mobile-friendly progress handle */
@media (max-width: 768px) {
    .progress-handle {
        width: 24px;
        height: 24px;
        border: 4px solid #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
    
    .progress-handle:hover {
        transform: translate(-50%, -50%) scale(1.4);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    }
    
    .progress-handle:active {
        transform: translate(-50%, -50%) scale(1.3);
    }
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #666;
    font-family: monospace;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mute-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.mute-btn:hover {
    background: #f8f9fa;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: #0073aa;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #0073aa;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

.security-notice {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background: #d1ecf1;
    color: #0c5460;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Responsive player */
@media (max-width: 768px) {
    .secure-audio-player-wrapper {
        padding: 15px;
    }
    
    .player-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-container {
        width: 100%;
    }
    
    .volume-control {
        justify-content: center;
    }
    
    .volume-slider {
        width: 120px;
    }
}


.no-recording-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 30px;
}

.recording-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    color: #666;
}

.recording-meta {
    font-size: 0.9em;
}

/* Recording Navigation */
.recording-navigation {
    margin: 30px 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #f8f9fa;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-subtitle {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

/* Section Archive Styles */
.section-archive-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.page-header {
    padding: 40px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.page-title {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.section-name {
    color: #ffd700;
    font-weight: 700;
}

.section-description {
    font-size: 1.1em;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Recordings Grid */
.recordings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 30px;
}

.recording-item {
    margin: 0;
}

.recording-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.recording-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #0073aa;
}

.recording-card .recording-thumbnail {
    margin: 0;
    position: relative;
    overflow: hidden;
}

.recording-card .recording-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 0;
    box-shadow: none;
}

.recording-card:hover .recording-thumbnail img {
    transform: scale(1.05);
}

.recording-card .recording-thumbnail.no-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.default-thumbnail {
    color: #fff;
    font-size: 3em;
    opacity: 0.8;
}

.recording-card .recording-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.recording-card .recording-title {
    font-size: 1.3em;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.recording-card .recording-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recording-card .recording-title a:hover {
    color: #0073aa;
}

.recording-card .recording-session,
.recording-card .recording-speaker {
    font-size: 0.9em;
    margin-bottom: 15px;
    color: #666;
}

.recording-excerpt {
    flex-grow: 1;
    margin-bottom: 20px;
    color: #555;
    line-height: 1.5;
    font-size: 0.95em;
}

.recording-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85em;
    color: #666;
}

.recording-plays {
    display: flex;
    align-items: center;
    gap: 5px;
}

.play-count {
    font-weight: bold;
    color: #0073aa;
    background: #f0f8ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.play-count.updated {
    background: #e8f5e8;
    color: #2e7d32;
    transform: scale(1.1);
}

.recording-has-audio {
    display: flex;
    align-items: center;
}

.audio-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #28a745;
    font-weight: 500;
}

.audio-indicator .dashicons {
    font-size: 16px;
}

.recording-actions {
    margin-top: auto;
}

.recording-actions .button {
    width: 100%;
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-size: 1em;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.recording-actions .button:hover {
    background: #005177;
    color: #fff;
}

/* No Recordings Message */
.no-recordings {
    text-align: center;
    padding: 60px 30px;
    color: #666;
}

.no-recordings h2 {
    color: #333;
    margin-bottom: 15px;
}

.back-to-sections {
    margin-top: 20px;
}

/* All Sections Navigation */
.all-sections-navigation {
    background: #f8f9fa;
    padding: 30px;
    border-top: 1px solid #eee;
}

.all-sections-navigation h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.3em;
}

.sections-hierarchy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-group {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.parent-section {
    margin: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.parent-section .section-link {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.parent-section .section-link:hover,
.parent-section .section-link.current-section {
    color: #0073aa;
}

.child-sections {
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.section-link {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    text-decoration: none;
    color: #666;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.section-link:hover,
.section-link.current-section {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.child-link {
    font-size: 0.8em;
    padding: 4px 10px;
}

.section-count {
    opacity: 0.7;
    margin-left: 5px;
    font-size: 0.85em;
}

/* Responsive hierarchy */
@media (max-width: 768px) {
    .sections-hierarchy {
        gap: 15px;
    }
    
    .section-group {
        margin: 0 -5px;
    }
    
    .parent-section {
        padding: 12px 15px;
    }
    
    .child-sections {
        padding: 12px 15px;
        gap: 6px;
    }
    
    .section-link {
        font-size: 0.8em;
        padding: 5px 10px;
    }
}

/* Pagination */
.wp-audio-tracks-container .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.wp-audio-tracks-container .page-numbers:hover,
.wp-audio-tracks-container .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-audio-tracks-container {
        padding: 15px;
    }
    
    .recording-title {
        font-size: 2em;
    }
    
    .recording-header,
    .recording-details,
    .recording-player-container,
    .recording-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .player-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .security-icon {
        align-self: flex-end;
    }
    
    .theme-toggle-container {
        top: 15px;
        right: 15px;
    }
    
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }
    
    .recordings-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .page-header {
        padding: 30px 20px;
    }
    
    .page-title {
        font-size: 2em;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .sections-list {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .recording-title {
        font-size: 1.5em;
    }
    
    .page-title {
        font-size: 1.5em;
    }
    
    .recording-card .recording-thumbnail {
        height: 150px;
    }
    
    .recording-card .recording-thumbnail.no-image {
        height: 150px;
    }
    
    .default-thumbnail {
        font-size: 2em;
    }
}

/* Security Enhancements */
.secure-audio-player {
    position: relative;
}

.secure-audio-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: transparent;
}

/* Disable text selection on audio controls */
.secure-audio-player audio {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Dark Mode Styles */
.dark-mode .recording-single {
    background: #2a2a2a;
    border: 1px solid #444;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .recording-title {
    color: #f0f0f0;
}

.dark-mode .recording-session,
.dark-mode .recording-speaker,
.dark-mode .recording-sections {
    color: #bbb;
}

.dark-mode .recording-session strong,
.dark-mode .recording-speaker strong,
.dark-mode .recording-sections strong {
    color: #e0e0e0;
}

.dark-mode .recording-sections a {
    color: #4a9eff;
}

.dark-mode .recording-sections a:hover {
    color: #6bb6ff;
}

.dark-mode .recording-description {
    color: #d0d0d0;
}

.dark-mode .recording-player-container {
    background: #333;
    border: 1px solid #555;
}

.dark-mode .recording-player-container h3 {
    color: #f0f0f0;
}

.dark-mode .recording-footer {
    background: #333;
    border-top: 1px solid #555;
    color: #bbb;
}

.dark-mode .no-recording-message {
    background: #4a2c2c;
    border: 1px solid #6b3e3e;
    color: #ffcccc;
}

.dark-mode .nav-previous a,
.dark-mode .nav-next a {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #e0e0e0;
}

.dark-mode .nav-previous a:hover,
.dark-mode .nav-next a:hover {
    background: #333;
    border-color: #4a9eff;
}

.dark-mode .nav-subtitle {
    color: #bbb;
}

.dark-mode .nav-title {
    color: #f0f0f0;
}

/* Section Archive Dark Mode */
.dark-mode .section-archive-content {
    background: #2a2a2a;
    border: 1px solid #444;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .page-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-bottom: 1px solid #444;
}

.dark-mode .page-title {
    color: #f0f0f0;
}

.dark-mode .section-name {
    color: #ffd700;
}

.dark-mode .section-description {
    color: #bbb;
}

.dark-mode .recording-card {
    background: #333;
    border: 1px solid #555;
}

.dark-mode .recording-card:hover {
    border-color: #4a9eff;
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.2);
}

.dark-mode .recording-card .recording-title a {
    color: #f0f0f0;
}

.dark-mode .recording-card .recording-title a:hover {
    color: #4a9eff;
}

.dark-mode .recording-card .recording-session,
.dark-mode .recording-card .recording-speaker {
    color: #bbb;
}

.dark-mode .recording-card .recording-excerpt {
    color: #d0d0d0;
}

.dark-mode .recording-card .recording-meta {
    color: #aaa;
}

.dark-mode .play-count {
    background: #2a4a6b;
    color: #6bb6ff;
}

.dark-mode .play-count.updated {
    background: #2d5a2d;
    color: #81c784;
}

.dark-mode .recording-card .recording-has-audio {
    color: #4caf50;
}

.dark-mode .recording-card .recording-actions .button {
    background: #4a9eff;
    color: #fff;
}

.dark-mode .recording-card .recording-actions .button:hover {
    background: #6bb6ff;
}

.dark-mode .no-recordings {
    color: #bbb;
}

.dark-mode .no-recordings h2 {
    color: #f0f0f0;
}

.dark-mode .all-sections-navigation {
    background: #333;
    border-top: 1px solid #555;
}

.dark-mode .all-sections-navigation h3 {
    color: #f0f0f0;
}

.dark-mode .section-group {
    background: #2a2a2a;
    border: 1px solid #444;
}

.dark-mode .parent-section {
    background: #333;
    border-bottom: 1px solid #555;
}

.dark-mode .parent-section .section-link {
    color: #f0f0f0;
}

.dark-mode .parent-section .section-link:hover,
.dark-mode .parent-section .section-link.current-section {
    color: #4a9eff;
}

.dark-mode .section-link {
    background: #2a2a2a;
    border: 1px solid #555;
    color: #d0d0d0;
}

.dark-mode .section-link:hover,
.dark-mode .section-link.current-section {
    background: #4a9eff;
    border-color: #4a9eff;
    color: #fff;
}

.dark-mode .section-count {
    color: #999;
}

/* Audio Player Dark Mode */
.dark-mode .secure-audio-player-wrapper {
    background: #2a2a2a;
    border: 1px solid #555;
}

.dark-mode .play-pause-btn {
    background: #4a9eff;
    color: #fff;
}

.dark-mode .play-pause-btn:hover {
    background: #6bb6ff;
}

.dark-mode .play-pause-btn.preloading {
    background: #ffa500;
}

.dark-mode .play-pause-btn.preloading::after {
    border-top-color: #fff;
}

.dark-mode .wake-lock-indicator {
    opacity: 0.8;
}

.dark-mode .wake-lock-indicator:hover {
    opacity: 1;
}

.dark-mode .resume-prompt-content {
    background: #2a2a2a;
    color: #fff;
}

.dark-mode .resume-prompt p {
    color: #fff;
}

.dark-mode .resume-btn {
    background: #4a9eff !important;
    color: white !important;
}

.dark-mode .resume-btn:hover {
    background: #6bb6ff !important;
}

.dark-mode .resume-indicator {
    background: #28a745;
    color: white;
}

.dark-mode .offline-message,
.dark-mode .retry-message,
.dark-mode .permanent-error {
    background: rgba(42, 42, 42, 0.95) !important;
}

.dark-mode .offline-content h3,
.dark-mode .retry-content h3,
.dark-mode .error-content h3 {
    color: #f0f0f0 !important;
}

.dark-mode .offline-content p,
.dark-mode .retry-content p,
.dark-mode .error-content p {
    color: #ccc !important;
}

.dark-mode .progress-bar {
    background: #444;
}

.dark-mode .progress-bar:hover {
    background: #555;
}

.dark-mode .progress-fill {
    background: linear-gradient(90deg, #4a9eff, #6bb6ff);
}

.dark-mode .progress-handle {
    background: #4a9eff;
    border: 3px solid #2a2a2a;
    box-shadow: 0 3px 8px rgba(74, 158, 255, 0.3);
}

.dark-mode .progress-handle:hover {
    background: #6bb6ff;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

.dark-mode .progress-handle:active {
    background: #3a8eef;
}

/* Dark mode mobile styles */
@media (max-width: 768px) {
    .dark-mode .progress-bar:hover {
        background: #666;
    }
    
    .dark-mode .progress-handle {
        border: 4px solid #2a2a2a;
        box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
    }
    
    .dark-mode .progress-handle:hover {
        box-shadow: 0 6px 16px rgba(74, 158, 255, 0.5);
    }
}

.dark-mode .time-display {
    color: #bbb;
}

.dark-mode .mute-btn {
    color: #d0d0d0;
}

.dark-mode .mute-btn:hover {
    background: #444;
}

.dark-mode .volume-slider {
    background: #444;
}

.dark-mode .volume-slider::-webkit-slider-thumb {
    background: #4a9eff;
}

.dark-mode .volume-slider::-moz-range-thumb {
    background: #4a9eff;
}

.dark-mode .loading-indicator {
    color: #bbb;
}

.dark-mode .error-message {
    background: #4a2c2c;
    color: #ffcccc;
    border: 1px solid #6b3e3e;
}

.dark-mode .security-notice {
    background: #2a3a4a;
    color: #b0d0ff;
    border: 1px solid #4a6b8a;
}

/* Pagination Dark Mode */
.dark-mode .page-numbers {
    background: #2a2a2a;
    border: 1px solid #555;
    color: #d0d0d0;
}

.dark-mode .page-numbers:hover,
.dark-mode .page-numbers.current {
    background: #4a9eff;
    border-color: #4a9eff;
    color: #fff;
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .theme-toggle-container {
        top: 10px;
        right: 10px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
}

/* Print Styles */
@media print {
    .recording-player-container,
    .secure-audio-player,
    .audio-security-notice,
    .theme-toggle-container {
        display: none !important;
    }
}
div#footer {
    display: none;
}
div#headerimg h1 {
    font-size: 30px;
    margin-left: 4%;
    text-decoration: none !important;
}
.dark-mode h1 a {
    color: #e0deaa;
}
.dark-mode h1 a:hover {
    color: #e0deaa;
}
.dark-mode h1 a:visited {
    color: #e0deaa;
}