/* styles.css */
:root {
    --primary-color: #ffffff;
    --primary-hover: #e0e0e0;
    --control-bg: rgba(0, 0, 0, 0.7);
    --progress-bg: rgba(255, 255, 255, 0.3);
    --progress-filled: #ffffff;
    --progress-hover: rgba(255, 255, 255, 0.5);
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --thumb-size: 14px;
    --subtitle-bg: transparent;
    --subtitle-text: #ffffff;
    --subtitle-font: Arial, sans-serif;
    --menu-bg: rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: var(--text-color);
}

.transparent-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background-color: var(--menu-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.nav-menu a:hover {
    opacity: 1;
}

.nav-menu a i {
    font-size: 20px;
}

.featured-video {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

#subtitle-display {
    position: absolute;
    bottom: 100px;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--subtitle-text);
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    padding: 10px;
    pointer-events: none;
    font-family: var(--subtitle-font);
    background-color: var(--subtitle-bg);
    border-radius: 4px;
    max-width: 90%;
    margin: 0 auto;
    left: 0;
    right: 0;
}

/* Big play button and skip buttons */
.big-play-btn-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s;
}

.big-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: transparent !important;
    transition: all 0.3s;
    border: none;
}

.big-play-btn i {
    color: white;
    font-size: 50px;
    margin-left: 3px;
}

.skip-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: transparent !important;
    border: none;
    color: white;
    opacity: 0.7;
    margin: 0 20px;
    transition: all 0.3s;
}

.skip-btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

.skip-btn i {
    font-size: 30px;
}

/* Video controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--control-bg), transparent);
    padding: 15px 20px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-controls.visible {
    opacity: 1;
}

.video-controls.visible ~ .big-play-btn-container {
    opacity: 1;
}

/* Progress bar */
.progress-container {
    width: 100%;
    margin-bottom: 10px;
}

.seek-bar-container {
    position: relative;
    width: 100%;
    height: 8px;
    margin-bottom: 10px;
    cursor: pointer;
}

.seek-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.seek-bar-progress {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--progress-filled);
    transform: translateY(-50%);
    pointer-events: none;
    transition: width 0.1s linear;
    border-radius: 2px;
    z-index:2;
}

.seek-bar-hover {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--progress-hover);
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 2px;
}

.seek-bar-container:hover .seek-bar-hover {
    opacity: 1;
}

.seek-bar-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--thumb-size);
    height: var(--thumb-size);
    background-color: var(--text-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
    transition: transform 0.1s, opacity 0.2s;
    opacity: 0;
}

.seek-bar-container:hover .seek-bar-thumb {
    opacity: 1;
}

.seek-bar-tooltip {
    position: absolute;
    top: -30px;
    left: 0;
    transform: translateX(-50%);
    background-color: var(--control-bg);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.seek-bar-container:hover .seek-bar-tooltip {
    opacity: 1;
}

/* Chapter segments and markers */
.chapter-segment {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    transform: translateY(-50%);
    background-color: var(--progress-filled);
    pointer-events: none;
    z-index: 1;
}

.chapter-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: white;
    z-index: 5;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.2s;
}

.chapter-marker:hover {
    background-color: white;
}

.chapter-tooltip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
    font-weight: 500;
}

.chapter-tooltip .chapter-time {
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 4px;
    font-family: 'Roboto Mono', monospace;
}

.chapter-tooltip .chapter-title {
    font-size: 13px;
    white-space: nowrap;
    text-align: center;
}

/* Time display */
.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Controls bottom section */
.controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    padding: 5px;
    opacity: 0.9;
    position: relative;
}

.control-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.control-btn.active {
    color: var(--primary-color);
}

.control-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--control-bg);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 10;
}

/* Volume control */
.volume-container {
    position: relative;
    width: 80px;
    height: var(--thumb-size);
    display: flex;
    align-items: center;
}

.volume-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.volume-bar-progress {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--progress-bg);
    transform: translateY(-50%);
    pointer-events: none;
}

.volume-bar-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: calc(var(--volume-level, 1) * 100%);
    height: 100%;
    background-color: var(--progress-filled);
}

.volume-container:hover {
    opacity: 1;
}

/* Speed control */
.speed-btn {
    min-width: 40px;
    text-align: center;
    font-size: 14px;
    border-radius: 4px;
    padding: 5px 8px;
    background: none;
    transition: all 0.2s;
}

.speed-btn:hover {
    background: none !important;
}

.speed-options {
    display: none !important;
}

/* Quality control */
.quality-btn {
    min-width: 60px;
    text-align: center;
    font-size: 14px;
    border-radius: 4px;
    padding: 5px 8px;
    background: none;
    transition: all 0.2s;
}

.quality-btn:hover {
    background: none !important;
}

.quality-options {
    display: none !important;
}

/* Download button */
#downloadBtn {
    position: relative;
}

#downloadBtn::after {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

#downloadBtn:hover::after {
    opacity: 1;
}

/* Fullscreen styles */
.video-container:-webkit-full-screen {
    width: 100% !important;
    height: 100% !important;
    background: black;
}

.video-container:-moz-full-screen {
    width: 100% !important;
    height: 100% !important;
    background: black;
}

.video-container:-ms-fullscreen {
    width: 100% !important;
    height: 100% !important;
    background: black;
}

.video-container:fullscreen {
    width: 100% !important;
    height: 100% !important;
    background: black;
}

/* Visual feedback animations */
.play-feedback, .pause-feedback, .skip-feedback, .seek-feedback, .chapter-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 60px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 10;
    transition: all 0.3s;
}

.play-feedback i, .pause-feedback i, .skip-feedback i {
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.skip-feedback {
    font-size: 40px;
}

.seek-feedback i {
    font-size: 30px;
    margin: 0 10px;
}

.chapter-feedback {
    font-size: 18px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 4px;
    max-width: 80%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Touch feedback styles */
.touch-feedback {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s, opacity 0.3s;
    z-index: 10;
}

/* Seek indicator styles */
.seek-indicator {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

/* Level indicator styles */
.level-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.level-indicator div {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    margin-bottom: 5px;
}

.level-indicator div div {
    width: 100%;
    height: 100%;
    background: white;
    margin: 0;
}

/* Error message styles */
.video-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.error-content {
    background: var(--control-bg);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 80%;
}

.retry-btn {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.retry-btn:hover {
    background: var(--primary-hover);
}

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

.modal-content {
    background-color: #000;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #333;
    width: 80%;
    max-width: 800px;
    position: relative;
    color: var(--text-color);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--text-color);
}

/* Reading and Donate modals */
.reading-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.reading-column h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.reading-column p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
}

.reading-column ul {
    list-style: none;
}

.reading-column li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
}

.reading-column li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.donate-button {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 12px 25px;
    margin-top: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.donate-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Notes Modal Styles */
.notes-content {
    max-height: 90vh;
    overflow-y: auto;
}

.notes-intro {
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.notes-section {
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.notes-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.notes-section.expanded .notes-body {
    max-height: 5000px;
    transition: max-height 0.5s ease-in;
}

.note-detail {
    display: none;
    transition: all 0.3s ease;
}

.note-summary.active + .note-detail {
    display: block;
}

.note-summary {
    position: relative;
    padding-bottom: 22px;
    margin-bottom: 3px;
    cursor: pointer;
}

.note-summary::after {
    content: 'Read More ▼';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.note-summary.active::after {
    content: 'Read Less ▲';
    color: var(--text-color);
}

.note-summary:hover::after {
    color: var(--primary-color);
}

.note-summary.active + .note-detail {
    margin-top: 8px;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.notes-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.expand-btn {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.notes-section.expanded .expand-btn {
    transform: rotate(45deg);
}

.note-summary {
    background-color: rgba(255,255,255,0.05);
    padding: 12px;
    border-left: 3px solid var(--primary-color);
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.note-summary:hover {
    background-color: rgba(255,255,255,0.1);
}

.note-detail {
    padding: 15px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 4px;
    margin: 10px 0;
    display: none;
}

.note-summary.active + .note-detail {
    display: block;
}

.note-detail p, .note-detail ul, .note-detail ol {
    margin-bottom: 10px;
    line-height: 1.6;
}

.note-detail blockquote {
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
    margin: 15px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.note-detail a {
    color: var(--primary-color);
    text-decoration: underline;
}

.notes-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.nav-btn {
    background-color: var(--control-bg);
    color: var(--text-color);
    border: 1px solid #333;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Videos Modal Styles */
.videos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.video-card {
    background-color: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
}

.video-card:hover {
    background-color: rgba(255,255,255,0.1);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    cursor: pointer;
}

.video-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0,0,0,0.7);
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-thumbnail:hover .video-play-btn {
    opacity: 1;
}

.video-card h3 {
    padding: 15px 15px 5px;
    font-size: 16px;
    color: var(--text-color);
}

.video-open-btn {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 15px 15px;
    background-color: rgba(255,255,255,0.1);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.video-open-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Chapter and subtitle modals */
.chapters-list, .subtitle-list, .quality-list {
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 15px;
}

.chapter-item, .subtitle-item, .quality-item {
    padding: 16px 20px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.subtitle-item, .quality-item {
    justify-content: center;
}

.chapter-item:hover, .subtitle-item:hover, .quality-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.chapter-item.active, .subtitle-item.active, .quality-item.active {
    background: var(--primary-color);
    color: #000;
    font-weight: 500;
}

.chapter-time {
    color: var(--primary-color);
    margin-right: 25px;
    min-width: 70px;
    font-weight: 500;
    font-family: monospace;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.chapter-title {
    flex: 1;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
}

/* Mobile chapter and subtitle modals */
.mobile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.mobile-modal.fullscreen {
    z-index: 2147483647;
}

.mobile-modal-content {
    background: #222;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    margin: 10vh auto;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-modal-header {
    padding: 15px;
    background: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-modal-close {
    font-size: 24px;
    cursor: pointer;
}

.mobile-chapters-list, .mobile-subtitles-list, .mobile-quality-list {
    max-height: calc(80vh - 60px);
    overflow-y: auto;
    padding: 10px;
}

.mobile-chapter-item, .mobile-subtitle-item, .mobile-quality-item {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-subtitle-item, .mobile-quality-item {
    justify-content: center;
}

.mobile-chapter-item:last-child, .mobile-subtitle-item:last-child, .mobile-quality-item:last-child {
    border-bottom: none;
}

.mobile-chapter-item:hover, .mobile-subtitle-item:hover, .mobile-quality-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-chapter-item.active, .mobile-subtitle-item.active, .mobile-quality-item.active {
    background: var(--primary-color);
    color: #000;
    font-weight: 500;
}

.mobile-chapter-time {
    color: var(--primary-color);
    margin-right: 20px;
    min-width: 60px;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
}

.mobile-chapter-title, .mobile-subtitle-item, .mobile-quality-item {
    flex: 1;
    font-size: 14px;
}

.subtitle-options, .quality-options {
    display: none !important;
}

/* Thumbnail overlay */
.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1;
    transition: opacity 0.3s;
}

.video-container.playing .thumbnail-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Embed modal styles */
#embedModal textarea {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid #333;
    padding: 10px;
    font-family: monospace;
    resize: none;
}

#copyEmbedBtn {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

#copyEmbedBtn:hover {
    background: var(--primary-hover);
}

/* Subtitle settings modal */
.settings-option {
    margin-bottom: 15px;
}

.settings-option label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.settings-option select {
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid #333;
    border-radius: 4px;
}

/* Share modal styles */
.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.share-option {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.share-option:hover {
    background: rgba(255,255,255,0.2);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }
    
    .nav-menu a {
        font-size: 12px;
        padding: 8px;
    }

    .seek-bar-container {
        height: 6px;
    }
    
    :root {
        --thumb-size: 12px;
    }
    
    .video-controls {
        padding: 10px;
    }
    
    .big-play-btn {
        width: 70px;
        height: 70px;
    }
    
    .big-play-btn i {
        font-size: 40px;
    }
    
    .skip-btn {
        width: 50px;
        height: 50px;
    }
    
    .skip-btn i {
        font-size: 24px;
    }
    
    #subtitle-display {
        font-size: 18px;
        bottom: 80px;
    }
    
    .control-btn {
        font-size: 18px !important;
    }
    
    .speed-btn, .quality-btn {
        font-size: 14px !important;
    }
    
    .volume-container {
        display: none !important;
    }
    
    .mobile-modal-content {
        width: 90%;
        max-height: 70vh;
        margin: 15vh auto;
    }

    /* Mobile portrait video sizing */
    @media (orientation: portrait) {
        .video-container video {
            object-fit: contain;
            height: auto;
        }

        .video-container.playing video {
            object-fit: cover;
            height: 100%;
        }
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 10px;
    }
    
    .nav-menu a {
        font-size: 11px;
        padding: 5px;
    }
    
    .seek-bar-container {
        height: 5px;
    }
    
    :root {
        --thumb-size: 10px;
    }
    
    .big-play-btn {
        width: 60px;
        height: 60px;
    }
    
    .big-play-btn i {
        font-size: 35px;
    }
    
    .skip-btn {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
    
    .skip-btn i {
        font-size: 20px;
    }
    
    #subtitle-display {
        font-size: 16px;
        bottom: 70px;
    }
    
    .control-btn {
        font-size: 16px !important;
    }
    
    .speed-btn, .quality-btn {
        font-size: 12px !important;
        min-width: 35px;
    }
    
    #downloadBtn::after {
        font-size: 11px;
        bottom: 120%;
    }
}

/* Accessibility improvements */
[aria-hidden="true"] {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.control-btn:focus, .skip-btn:focus, .big-play-btn:focus, .seek-bar:focus, .volume-bar:focus {
    outline: none !important;
}

/* High contrast mode */
@media (prefers-contrast: more) {
    .seek-bar-progress, .volume-bar-progress::after {
        background-color: #fff;
    }
    
    .chapter-marker {
        background-color: #fff;
    }
    
    .control-btn {
        opacity: 1;
    }
    
    #subtitle-display {
        background-color: #000;
        color: #fff;
        border: 2px solid #fff;
    }
}

/* Picture-in-Picture button */
#pipBtn {
    display: block;
}

/* Quality button */
#qualityBtn {
    display: block;
}