.action-btn.primary {
    background: linear-gradient(45deg, #8257ff, #9373ff);
    color: white;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(130, 87, 255, 0.3);
    font-size: 1.1em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-right: 15px;
    position: relative;
    overflow: hidden;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(130, 87, 255, 0.4);
    background: linear-gradient(45deg, #7240ff, #8257ff);
}

.action-btn.primary:active {
    transform: translateY(1px);
}

.action-btn.primary.in-watchlist {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.action-btn.primary.in-watchlist:hover {
    background: linear-gradient(45deg, #43a047, #388e3c);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.action-btn.primary i {
    margin-right: 8px;
    font-size: 1.2em;
    vertical-align: middle;
}

.action-btn.primary:disabled {
    background: linear-gradient(45deg, #a8a8a8, #909090);
    box-shadow: none;
    cursor: not-allowed;
}

.action-btn.primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.action-btn.primary:hover::after {
    left: 100%;
}

.action-btn.secondary {
    background-color: transparent;
    border: 2px solid #8257ff;
    color: #8257ff;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-btn.secondary:hover {
    background-color: rgba(130, 87, 255, 0.1);
    border-color: #7240ff;
    color: #7240ff;
}
.back-button {
    display: flex;
    align-items: center;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.back-link:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(130, 87, 255, 0.3);
}

/* Player styles */
.player-wrapper {
    position: relative;
    background: var(--card-gradient-start);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.player-wrapper:hover {
    box-shadow: var(--card-hover-shadow);
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

#moviePlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    outline: none;
}

.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 85%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.video-container:hover .player-overlay {
    opacity: 1;
}

.player-title {
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.player-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Play button overlay */
.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 5;
    cursor: pointer;
    transition: all 0.3s;
}

.play-button-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.play-button-overlay.hidden {
    display: none;
}

.big-play-button {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(130, 87, 255, 0.4);
}

.play-button-overlay:hover .big-play-button {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(130, 87, 255, 0.6);
}

.big-play-button i {
    font-size: 28px;
    color: white;
    margin-left: 6px; /* Offset for play icon */
}

/* Movie details styles */
.movie-details {
    margin-bottom: 40px;
}

.movie-info-card {
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--glass-border);
}

.movie-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.movie-header {
    margin-bottom: 20px;
}

.movie-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--text-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.original-title {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 15px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-secondary);
}

.movie-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.movie-quality {
    background: var(--accent-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

.movie-code {
    color: var(--accent-color);
    font-weight: 600;
    position: relative;
    padding-left: 15px;
}

.movie-code::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

/* Genre tags */
.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.genre-tag {
    background: rgba(130, 87, 255, 0.15);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid rgba(130, 87, 255, 0.2);
}

.genre-tag:hover {
    background: rgba(130, 87, 255, 0.3);
    transform: translateY(-2px);
}

/* Action buttons */
.movie-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: var(--glass-bg);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--glass-border);
}

.action-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(130, 87, 255, 0.3);
}

/* Watchlist button specific styling */
.action-btn.in-watchlist {
    background: var(--accent-color);
    color: white;
}

.action-btn.in-watchlist:hover {
    background: #6b46c1; /* Darker shade for hover state when in watchlist */
}

.action-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-btn[disabled]:hover {
    transform: none;
    box-shadow: none;
    background: var(--glass-bg);
}

/* Actress info */
.actress-info {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(130, 87, 255, 0.05);
    border-radius: 14px;
    transition: all 0.3s;
    border: 1px solid rgba(130, 87, 255, 0.1);
}

.actress-info:hover {
    background: rgba(130, 87, 255, 0.1);
    transform: translateY(-3px);
}

.actress-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--accent-color);
}

.actress-details {
    flex: 1;
}

.actress-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.actress-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    font-weight: 600;
    display: inline-block;
}

.actress-link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(130, 87, 255, 0.3);
}

.actress-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--accent-color), var(--accent-secondary));
    transition: width 0.3s ease;
}

.actress-link:hover::after {
    width: 100%;
}

/* Movie description */
.movie-description {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 15px;
}

/* Enhanced movie details */
.video-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row {
    display: flex;
    margin-bottom: 12px;
    font-size: 14px;
}

.info-label {
    width: 120px;
    color: var(--text-secondary);
}

.info-value {
    flex: 1;
    color: var(--text-color);
}

/* Series link styling */
.info-value a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    font-weight: 600;
    display: inline-block;
}

.info-value a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(130, 87, 255, 0.3);
}

.info-value a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--accent-color), var(--accent-secondary));
    transition: width 0.3s ease;
}

.info-value a:hover::after {
    width: 100%;
}

/* Related movies section */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, var(--text-color) 30%, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-color), var(--accent-secondary));
    border-radius: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.movie-card {
    background: var(--glass-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.movie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(130deg, rgba(130, 87, 255, 0.15) 0%, transparent 80%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    border-radius: 16px;
}

.movie-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(130, 87, 255, 0.3);
}

.movie-card:hover::before {
    opacity: 1;
}

.movie-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.movie-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.movie-card:hover .movie-thumbnail img {
    transform: scale(1.05);
}

.movie-thumbnail .movie-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 3;
}

.movie-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 110px;
}

.movie-info .movie-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
    line-height: 1.5;
    letter-spacing: 0.2px;
    transition: color 0.3s;
    color: var(--text-color);
    -webkit-text-fill-color: var(--text-color);
    background: none;
    text-overflow: ellipsis;
    word-break: break-word;
}

.movie-card:hover .movie-info .movie-title {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.movie-info .movie-meta {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-info .movie-quality {
    font-size: 11px;
    padding: 3px 8px;
}

.movie-info .movie-code {
    color: var(--accent-color);
    font-weight: 600;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s forwards;
}

.animate-on-scroll {
    animation: fadeInUp 0.6s forwards;
}

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

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

/* Japanese title toggle */
.title-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.title-toggle:hover {
    color: var(--accent-color);
}

.title-toggle i {
    font-size: 12px;
    transition: transform 0.3s;
}

.title-toggle.active i {
    transform: rotate(180deg);
}

.original-title {
    display: none;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 15px;
    opacity: 0;
    height: 0;
    transition: opacity 0.3s, height 0.3s;
}

.original-title.visible {
    display: block;
    opacity: 1;
    height: auto;
    animation: fadeIn 0.3s ease;
}

/* Preview video for related movies */
.movie-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.movie-card:hover .movie-thumbnail img {
    opacity: 0;
}

.movie-card:hover .movie-thumbnail video,
.movie-card.tapped .movie-thumbnail img {
    opacity: 0;
}

.movie-card:hover .movie-thumbnail video,
.movie-card.tapped .movie-thumbnail video {
    opacity: 1;
}

.preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    z-index: 2;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.movie-card.loading-preview .preview-loading {
    opacity: 1;
}

/* Mobile touch devices */
.tap-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 3;
    pointer-events: none;
}

.movie-card:not(.tapped):active .tap-indicator {
    opacity: 1;
}

/* Enhanced video controls */
.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.video-container:hover .custom-video-controls,
.custom-video-controls.active {
    opacity: 1;
}

.timeline-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 15px;
    position: relative;
    cursor: pointer;
}

.timeline {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    width: 0%;
    position: relative;
}

.timeline-handle {
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: 2px solid white;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.center-controls {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.control-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.control-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.control-button.large {
    font-size: 24px;
    width: 50px;
    height: 50px;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 80px;
    height: 5px;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: 2px solid white;
}

.time-display {
    font-size: 14px;
    color: var(--text-color);
    min-width: 100px;
    text-align: right;
}

.skip-buttons {
    display: flex;
    gap: 10px;
}

.skip-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.skip-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

/* Timeline improvements for better control */
.timeline-container {
    position: relative;
    height: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    padding: 2px 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: visible;
    transition: height 0.2s ease;
}

.timeline-container:hover, 
.timeline-container.scrubbing {
    height: 16px;
}

.timeline {
    position: relative;
    height: 100%;
    width: 0%;
    background-color: #f44336;
    border-radius: 6px;
    transition: width 0.1s linear;
}

.timeline-container.scrubbing .timeline {
    transition: none;
}

.timeline-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.timeline-container:hover .timeline-handle,
.timeline-container.scrubbing .timeline-handle {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.time-tooltip {
    position: absolute;
    top: -30px;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.timeline-container:hover .time-tooltip,
.timeline-container.scrubbing .time-tooltip {
    opacity: 1;
}

.timeline-preview {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%);
    pointer-events: none;
    display: none;
}

/* Mobile-optimized video controls */
.mobile-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    pointer-events: none;
    display: none;
}

.mobile-tap-areas {
    display: flex;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.tap-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tap-indicator {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tap-indicator i {
    font-size: 28px;
    color: white;
    margin-bottom: 5px;
}

.tap-indicator span {
    font-size: 14px;
    color: white;
}

.tap-area:active .tap-indicator,
.tap-indicator.tapped {
    opacity: 0.9;
    transform: scale(1.1);
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
    /* Show mobile controls on touch devices */
    .mobile-controls-overlay {
        display: block;
    }
    
    /* Larger timeline for easier touch */
    .timeline-container {
        height: 20px;
        margin-bottom: 15px;
    }
    
    .timeline-container:hover, 
    .timeline-container.scrubbing {
        height: 24px;
    }
    
    .timeline-handle {
        width: 24px;
        height: 24px;
        right: -12px;
        opacity: 1;
    }
    
    /* Improved time tooltip visibility */
    .time-tooltip {
        top: -40px;
        font-size: 16px;
        padding: 8px 12px;
        background-color: rgba(0, 0, 0, 0.85);
    }
    
    /* Larger controls for better touch targets */
    .control-button {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .control-button.large {
        width: 54px;
        height: 54px;
        font-size: 24px;
    }
    
    /* Optimize skip buttons for mobile */
    .skip-button {
        padding: 10px 15px;
        font-size: 15px;
        border-radius: 30px;
    }
    
    /* Adjust text sizes for better readability */
    .movie-title {
        font-size: 22px;
    }
    
    .movie-meta > span {
        font-size: 14px;
    }
    
    .genre-tag {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .movie-card .movie-title {
        font-size: 15px;
        line-height: 1.4;
    }
    
    /* Better spacing for mobile */
    .movie-info-card {
        padding: 20px;
    }
    
    .controls-row {
        padding: 15px 10px;
    }
    
    /* Enhance volume slider for touch */
    .volume-slider {
        width: 70px;
        height: 8px;
    }
    
    .volume-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }
}

/* Additional optimizations for smaller screens */
@media (max-width: 576px) {
    /* Hide skip buttons text on very small screens */
    .skip-button i {
        margin-right: 4px;
    }
    
    .skip-button .skip-text {
        display: none;
    }
    
    .skip-button {
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    
    /* Adjust font sizes for smaller screens */
    .movie-card .movie-title {
        font-size: 14px;
        height: 42px;
        -webkit-line-clamp: 2;
    }
    
    .movie-info {
        padding: 12px;
        height: 90px;
    }
    
    /* Simpler control layout */
    .center-controls {
        position: relative;
        left: 0;
        transform: none;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    /* Optimize time display */
    .time-display {
        font-size: 12px;
        min-width: 70px;
    }
    
    /* Adjust tap indicators */
    .tap-indicator {
        width: 60px;
        height: 60px;
    }
    
    .tap-indicator i {
        font-size: 24px;
    }
    
    .tap-indicator span {
        font-size: 12px;
    }
}

/* Animation for mobile tap feedback */
@keyframes tap-feedback {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.tap-indicator.tapped {
    animation: tap-feedback 0.5s ease-out;
}

/* Ensure controls stay visible during interaction */
.custom-video-controls.force-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Adjust play overlay for better mobile tap */
.play-button-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.big-play-button {
    width: 80px;
    height: 80px;
}

@media (max-width: 576px) {
    .big-play-button {
        width: 70px;
        height: 70px;
    }
}

/* Enhanced touch support */
@media (max-width: 768px) {
    .timeline-container {
        height: 16px;
    }
    
    .timeline-container:hover, 
    .timeline-container.scrubbing {
        height: 20px;
    }
    
    .timeline-handle {
        width: 18px;
        height: 18px;
        right: -9px;
        opacity: 1;
    }
    
    .time-tooltip {
        top: -36px;
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .controls-row {
        padding: 10px;
    }
    
    .control-button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Ensure controls stay visible when interacting on mobile */
.custom-video-controls.active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.timeline-container.scrubbing .timeline-handle {
    animation: pulse 1s infinite;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 992px) {
    .movie-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .player-overlay {
        padding: 20px;
    }
    
    .player-title {
        font-size: 20px;
    }
    
    .movie-info-card {
        padding: 20px;
    }
    
    .movie-title {
        font-size: 22px;
    }
    
    .original-title {
        font-size: 14px;
    }
    
    .movie-actions {
        flex-wrap: wrap;
    }
    
    .action-btn {
        padding: 10px 15px;
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .big-play-button {
        width: 70px;
        height: 70px;
    }
    
    .big-play-button i {
        font-size: 24px;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .movie-info {
        padding: 15px;
        height: 100px;
    }
    
    .movie-info .movie-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
        height: 42px;
    }
    
    .custom-video-controls {
        padding: 15px;
    }
    
    .controls-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .center-controls {
        position: relative;
        left: 0;
        transform: none;
        order: 1;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .skip-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .control-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .control-button.large {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .time-display {
        min-width: 80px;
        font-size: 12px;
    }
    
    .skip-button {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .movie-title {
        font-size: 20px;
    }
    
    .movie-meta > span {
        font-size: 12px;
    }
    
    .genre-tag {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .actress-photo {
        width: 55px;
        height: 55px;
    }
    
    .actress-name {
        font-size: 16px;
    }
    
    .movie-description {
        font-size: 14px;
    }
    
    .info-row {
        font-size: 13px;
    }
    
    .info-label {
        width: 100px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .movie-info {
        height: 90px;
        padding: 12px;
    }
    
    .movie-info .movie-title {
        font-size: 13px;
        margin-bottom: 5px;
        height: 39px;
    }
    
    .movie-info .movie-meta {
        font-size: 11px;
    }
    
    .movie-thumbnail .movie-duration {
        padding: 3px 8px;
        font-size: 10px;
        bottom: 8px;
        right: 8px;
    }
    
    .custom-video-controls {
        padding: 10px;
    }
    
    .skip-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: 5px;
    }
    
    .skip-button {
        font-size: 10px;
        padding: 5px 8px;
        justify-content: center;
    }
    
    .control-button {
        width: 32px;
        height: 32px;
    }
    
    .control-button.large {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .timeline-container {
        height: 6px;
        margin-bottom: 10px;
    }
    
    .timeline-handle {
        width: 12px;
        height: 12px;
        right: -6px;
    }
}

/* Touch device specific styles */
@media (hover: none) {
    .movie-card.tapped .movie-thumbnail img {
        opacity: 0;
    }
    
    .movie-card.tapped .movie-thumbnail video {
        opacity: 1;
    }
    
    .custom-video-controls {
        opacity: 0;
        pointer-events: none;
    }
    
    .custom-video-controls.active {
        opacity: 1;
        pointer-events: auto;
    }
    
    .video-container:active .custom-video-controls {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Mobile-optimized controls fix */
.mobile-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4; /* Below the main play button but above the video */
    pointer-events: none;
    display: none;
}

.mobile-tap-areas {
    display: flex;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.tap-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0; /* Make tap areas invisible but functional */
}

.tap-indicator {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.tap-indicator i {
    font-size: 32px;
    color: white;
    margin-bottom: 5px;
}

.tap-indicator span {
    font-size: 16px;
    color: white;
}

.tap-area:active .tap-indicator,
.tap-indicator.tapped {
    opacity: 0.9;
    transform: scale(1.1);
}

/* Fix for custom controls in mobile view */
@media (max-width: 768px) {
    .custom-video-controls {
        padding: 15px 10px 10px;
    }
    
    .controls-row {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
        position: relative;
    }
    
    .left-controls, .right-controls {
        z-index: 2;
    }
    
    .center-controls {
        width: 100%;
        order: 1;
        margin-top: 10px;
    }
    
    .volume-container {
        display: none;
    }
    
    .skip-buttons {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: center;
        width: 100%;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .skip-buttons::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    
    .skip-button {
        flex: 0 0 auto;
        font-size: 13px;
        padding: 8px 12px;
        border-radius: 20px;
        white-space: nowrap;
        margin: 0 3px;
    }
    
    /* Better handling of the timeline on mobile */
    .timeline-container {
        height: 20px;
        border-radius: 10px;
        margin-bottom: 15px;
    }
    
    .timeline-container.scrubbing {
        height: 24px;
    }
    
    .timeline-handle {
        width: 20px;
        height: 20px;
        right: -10px;
        opacity: 1;
        border: 2px solid white;
    }
    
    .time-tooltip {
        top: -40px;
        padding: 6px 10px;
        font-size: 14px;
        font-weight: bold;
        white-space: nowrap;
    }
    
    /* Fix the control button sizes for better touch targets */
    .control-button {
        min-width: 44px;
        min-height: 44px;
        font-size: 18px;
    }
    
    .control-button.large {
        min-width: 50px;
        min-height: 50px;
        font-size: 22px;
    }
}

/* Extra small devices (phones) */
@media (max-width: 576px) {
    .timeline-container {
        height: 18px;
    }
    
    .timeline-handle {
        width: 18px;
        height: 18px;
        right: -9px;
    }
    
    .control-button {
        min-width: 40px;
        min-height: 40px;
        font-size: 16px;
    }
    
    .control-button.large {
        min-width: 46px;
        min-height: 46px;
        font-size: 20px;
    }
    
    .skip-button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .skip-button i {
        font-size: 14px;
    }
    
    .skip-text {
        display: none; /* Hide text on very small screens */
    }
    
    .time-display {
        font-size: 12px;
        min-width: 80px;
    }
    
    /* Fix tap indicators for very small screens */
    .tap-indicator {
        width: 60px;
        height: 60px;
    }
    
    .tap-indicator i {
        font-size: 24px;
    }
    
    .tap-indicator span {
        font-size: 12px;
    }
}

/* Animation for mobile tap feedback */
@keyframes tap-feedback {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.tap-indicator.tapped {
    animation: tap-feedback 0.5s ease-out;
}

/* Ensure controls stay fully visible on mobile */
.custom-video-controls.active,
.custom-video-controls.force-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 10;
}

/* Fix for play button overlay */
.play-button-overlay {
    z-index: 5;
}

/* Fix related movie titles */
.movie-card .movie-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    height: auto;
    max-height: 48px;
    line-height: 1.5;
}

/* Landscape mode optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-controls-overlay {
        z-index: 6; /* Above the main play button in landscape */
    }
    
    .center-controls {
        display: none; /* Hide skip buttons in landscape to save space */
    }
    
    .controls-row {
        padding-bottom: 0;
    }
    
    .timeline-container {
        margin-bottom: 10px;
    }
    
    .tap-indicator {
        top: 50%;
        transform: translateY(-50%);
    }
    
    .custom-video-controls {
        padding-bottom: 5px;
    }
}

/* New mobile controls with improved UX */
.mobile-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 6;
    pointer-events: none;
}

.mobile-control-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: linear-gradient(to bottom, 
                rgba(0, 0, 0, 0.3) 0%, 
                rgba(0, 0, 0, 0) 20%,
                rgba(0, 0, 0, 0) 80%,
                rgba(0, 0, 0, 0.3) 100%);
}

.mobile-control-layer.controls-visible {
    opacity: 1;
    pointer-events: auto;
}

.video-center-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.mobile-control-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 0;
}

.mobile-control-button i {
    font-size: 28px;
    margin-bottom: 2px;
}

.mobile-control-button span {
    font-size: 12px;
    font-weight: 500;
}

.mobile-control-button.play-button {
    width: 70px;
    height: 70px;
}

.mobile-control-button.play-button i {
    font-size: 32px;
    margin-left: 4px;
}

.mobile-control-button:active,
.mobile-control-button.button-active {
    transform: scale(0.9);
    background: rgba(130, 87, 255, 0.8);
}

.mobile-time-display {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Swipe feedback animation */
.swipe-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 7;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.swipe-feedback.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.swipe-feedback i {
    font-size: 36px;
    margin-bottom: 5px;
}

.swipe-feedback span {
    font-size: 16px;
    font-weight: 500;
}

/* Timeline improvements for mobile */
.timeline-container {
    height: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    padding: 5px 0;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: visible;
    touch-action: none;
}

.timeline {
    position: relative;
    height: 100%;
    width: 0%;
    background-color: var(--accent-color, #f44336);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.timeline-handle {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    opacity: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-color, #f44336);
}

.time-tooltip {
    position: absolute;
    top: -35px;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    z-index: 5;
    white-space: nowrap;
}

/* Landscape orientation improvements */
html.landscape-video .video-center-controls {
    gap: 15px;
}

html.landscape-video .mobile-control-button {
    width: 50px;
    height: 50px;
}

html.landscape-video .mobile-control-button.play-button {
    width: 60px;
    height: 60px;
}

html.landscape-video .mobile-control-button i {
    font-size: 24px;
}

html.landscape-video .mobile-time-display {
    bottom: 15px;
    font-size: 12px;
    padding: 4px 10px;
}

/* Improved responsive layout */
@media (max-width: 576px) {
    .custom-video-controls {
        padding: 10px 8px 5px;
    }
    
    .timeline-container {
        margin-bottom: 10px;
    }
    
    .controls-row {
        flex-wrap: wrap;
    }
    
    .center-controls {
        width: 100%;
        order: 1;
        margin-top: 5px;
    }
    
    .skip-button {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .skip-text {
        display: none;
    }
    
    .control-button {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .control-button.large {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }
    
    .time-display {
        font-size: 12px;
        min-width: 70px;
    }
}

/* Fix related movie titles */
.movie-card .movie-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    height: auto;
    max-height: 48px;
    line-height: 1.5;
    font-size: 14px;
}

/* Ensuring proper stacking of video elements */
.play-button-overlay {
    z-index: 5;
}

.custom-video-controls {
    z-index: 4;
}

/* Ensure controls stay visible when needed */
.custom-video-controls.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Device Handling */
@media (max-width: 768px) {
    .custom-video-controls,
    .mobile-controls-overlay,
    .play-button-overlay {
        display: none !important;
    }

    #moviePlayer::-webkit-media-controls {
        display: flex !important;
    }

    #moviePlayer::-webkit-media-controls-panel {
        display: flex !important;
    }

    .video-container {
        display: block;
        position: relative;
        width: 100%;
        padding-top: 56.25%; /* Maintain 16:9 aspect ratio (9/16 = 0.5625) */
        height: 0;
        overflow: hidden;
    }

    #moviePlayer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
    }
}

@media (max-width: 768px) {
    .player-wrapper {
        margin: 0;
        border-radius: 0;
        height: auto;
        margin-bottom: 20px;
    }
    
    .video-container {
        position: relative;
        width: 100%;
        padding-top: 56.25%; /* This maintains 16:9 aspect ratio */
        height: 0;
        overflow: hidden;
    }
    
    #moviePlayer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
    }

    /* Fix related videos on mobile */
    .related-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 10px;
        padding: 0 10px;
        margin-bottom: 20px;
    }

    .movie-card {
        opacity: 1;
        transform: none;
        display: block;
    }

    /* Make movie cards visible immediately on mobile */
    .movie-card.animate-on-scroll {
        animation: none;
        opacity: 1;
        transform: none;
    }

    /* Improve movie info layout on mobile */
    .movie-info {
        padding: 10px;
        height: auto;
        min-height: 80px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns even on very small devices */
        gap: 8px;
        padding: 0 8px;
    }

    .movie-info {
        padding: 8px;
    }

    .movie-info .movie-title {
        font-size: 12px;
        -webkit-line-clamp: 2;
        height: auto;
        min-height: 36px;
        margin-bottom: 4px;
    }
}

/* Movie title responsive styling */
@media screen and (max-width: 768px) {
  .movie-details .movie-info-card .movie-header .movie-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 8px;
  }
  
  .movie-details .movie-info-card .movie-header .movie-meta {
    font-size: 12px;
  }
}

/* Smaller screens (phones) */
@media screen and (max-width: 480px) {
  .movie-details .movie-info-card .movie-header .movie-title {
    font-size: 18px;
  }
}

/* Improved mobile touch feedback for movie cards */
.movie-card.touch-active {
    transform: scale(0.98);
    transition: transform 0.2s ease;
}

.movie-card .tap-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
    pointer-events: none;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.movie-card.tapped {
    /* Make it obvious this card has been tapped */
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2;
    position: relative;
}

/* Ensure the tapped state is clearly visible on mobile */
@media (hover: none) {
    .movie-card.tapped {
        box-shadow: 0 0 0 2px var(--accent-color, #8257ff);
    }
    
    .movie-card.tapped .movie-thumbnail:after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border: 2px solid var(--accent-color, #8257ff);
        pointer-events: none;
        z-index: 4;
    }
    
    .movie-card.tapped .movie-thumbnail img {
        opacity: 0;
    }
    
    .movie-card.tapped .movie-thumbnail video {
        opacity: 1;
        z-index: 2;
    }
    
    /* More prominent tap indicator for mobile */
    .movie-card .tap-indicator {
        background: rgba(130, 87, 255, 0.9);
        padding: 10px 20px;
        font-size: 16px;
        border: 2px solid rgba(255, 255, 255, 0.5);
        white-space: nowrap;
    }
    
    /* Show loading spinner more prominently */
    .movie-card.loading-preview .preview-loading {
        opacity: 1;
        z-index: 6;
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
    
    /* Override opacity for better visibility */
    .movie-card.tapped .tap-indicator {
        opacity: 1;
    }
    
    /* Prevent animation from resetting tapped state */
    .movie-card.tapped.animate-on-scroll {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* More reliable video preview on mobile */
.movie-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background-color: #000;
}

.movie-thumbnail video.active-preview {
    opacity: 1;
    z-index: 2;
}

/* Adjust layout for mobile */
@media (max-width: 768px) {
    .movie-card {
        opacity: 1;
        transform: none;
    }
    
    .movie-card:hover {
        transform: none;
    }
    
    .movie-card.tapped {
        transform: scale(1.02);
    }
}

/* Quick watchlist button styles */
.quick-watchlist-form {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.quick-watchlist-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
}

.movie-card:hover .quick-watchlist-btn {
    opacity: 1;
}

.quick-watchlist-btn i {
    font-size: 16px;
}

.quick-watchlist-btn:hover {
    background: rgba(130, 87, 255, 0.8);
    transform: scale(1.1);
}

.quick-watchlist-btn.in-watchlist {
    background: var(--accent-color);
    opacity: 1;
}

.quick-watchlist-btn.in-watchlist:hover {
    background: #ff3c5a;
}

@media (hover: none) {
    .quick-watchlist-btn {
        opacity: 1;
        width: 32px;
        height: 32px;
    }
}

/* Add loading indicator styles for skip buttons */
.skip-button.loading {
    background: rgba(255, 255, 255, 0.2);
    position: relative;
}

.skip-loading {
    margin-right: 4px;
    animation: skipLoading 1s infinite;
    display: none;
}

.skip-button.loading .skip-loading {
    display: inline;
}

@keyframes skipLoading {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Mobile loading indicator */
.mobile-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    animation: skipLoading 1s infinite;
    z-index: 2;
}

.mobile-control-button.loading {
    background: rgba(255, 255, 255, 0.3);
}
