body {
    background-color: #0f0f0f;
    color: #fff;
    margin-top: 56px; /* Account for fixed header */
    /* Prevent zoom and orientation issues */
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
touch-action: manipulation;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
/* Prevent orientation changes */
-webkit-transform: translateZ(0);
transform: translateZ(0);
/* Prevent zoom on input focus */
-webkit-tap-highlight-color: transparent;
/* Prevent zoom on all inputs */
input, textarea, select {
  font-size: 16px !important;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
}

/* Mobile header adjustments */
@media (max-width: 768px) {
    body {
        margin-top: 56px;
    }
}

@media (max-width: 480px) {
    body {
        margin-top: 56px;
    }
}

.video-detail-container {
    max-width: 1600px;
    margin: 24px auto 0;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.video-player-section {
    width: 100%;
}

.video-player {
    width: 100%;
    background-color: var(--secondary-color);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin-bottom: 20px;
    position: relative;
}

#mainVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

/* Mobile video player enhancements */
@media (max-width: 768px) {
    .video-player {
        aspect-ratio: 16 / 9;
        max-height: 50vh;
    }
    
    #mainVideo {
        object-fit: contain;
    }
    
    /* Improve video controls on mobile */
    #mainVideo::-webkit-media-controls {
        background-color: rgba(0, 0, 0, 0.7);
    }
    
    #mainVideo::-webkit-media-controls-panel {
        background-color: rgba(0, 0, 0, 0.8);
    }
}

@media (max-width: 480px) {
    .video-player {
        aspect-ratio: 16 / 9;
        max-height: 50vh;
    }
    
    #mainVideo {
        object-fit: contain;
    }
}

.video-info {
    padding: 20px 0;
    color: var(--text-color);
}

.video-header {
    margin-bottom: 16px;
}

.video-title-container {
    margin-bottom: 8px;
}

.video-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 56px;
}

.video-stats-row {
    display: flex;
    align-items: center;
    color: var(--secondary-text);
    font-size: 14px;
    gap: 8px;
}

.dot-separator {
    font-size: 14px;
    color: var(--secondary-text);
}

.video-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: var(--hover-color);
    border-radius: 18px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 14px;
    transition: background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.action-btn:hover {
    background-color: #3f3f3f;
}

.action-btn i {
    font-size: 20px;
}

.action-btn span {
    font-weight: 500;
}

.like-btn {
    padding-right: 16px;
}

.channel-info {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
}

.channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-details {
    flex: 1;
}

.channel-name {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 12px 0;
    color: var(--text-color);
}

.video-description {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    white-space: pre-wrap;
}

/* Related videos section */
.related-videos {
    width: 100%;
}

.related-videos h2 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 16px 0;
    color: var(--text-color);
}

.related-videos .video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 0;
}

/* Error state */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: #272727;
    border-radius: 12px;
    color: #fff;
}

.error-state i {
    font-size: 48px;
    color: #ff4444;
    margin-bottom: 16px;
}

.error-state h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #fff;
}

.error-state p {
    color: #aaa;
    margin-bottom: 16px;
}

.error-state button {
    padding: 10px 20px;
    background: #3ea6ff;
    color: #0f0f0f;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.error-state button:hover {
    background: #65b8ff;
}

/* Loading states */
.loading {
    position: relative;
    background: #272727;
    border-radius: 4px;
    overflow: hidden;
}

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .video-detail-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .related-videos .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    body {
        margin-top: 56px;
    }
    
    .video-detail-container {
        padding: 12px;
        margin-top: 12px;
        gap: 20px;
    }
    
    .video-player {
        border-radius: 8px;
        margin-bottom: 16px;
    }
    
    .video-title {
        font-size: 16px;
        line-height: 1.3;
        max-height: 42px;
    }

    .video-stats-row {
        font-size: 13px;
        gap: 6px;
    }

    .video-actions {
        gap: 4px;
        padding: 6px 0;
        margin-bottom: 12px;
        justify-content: space-between;
    }

    .action-btn {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 16px;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

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

    .channel-info {
        padding: 12px 0;
        gap: 12px;
    }
    
    .channel-avatar {
        width: 40px;
        height: 40px;
    }
    
    .channel-name {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .video-description {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .related-videos h2 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .related-videos .video-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .video-detail-container {
        padding: 8px;
        margin-top: 8px;
        gap: 16px;
    }
    
    .video-player {
        border-radius: 6px;
        margin-bottom: 12px;
    }
    
    .video-title {
        font-size: 15px;
        line-height: 1.2;
        max-height: 36px;
    }

    .video-stats-row {
        font-size: 12px;
        gap: 4px;
    }

    .video-actions {
        gap: 2px;
        padding: 4px 0;
        margin-bottom: 8px;
    }

    .action-btn {
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 12px;
    }

    .action-btn i {
        font-size: 14px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .like-btn span {
        display: inline;
        font-size: 11px;
    }

    .channel-info {
        padding: 8px 0;
        gap: 8px;
    }
    
    .channel-avatar {
        width: 36px;
        height: 36px;
    }
    
    .channel-name {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .video-description {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .related-videos h2 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .related-videos .video-grid {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .video-detail-container {
        padding: 4px;
        margin-top: 4px;
        gap: 12px;
    }
    
    .video-player {
        aspect-ratio: 16 / 9;
        max-height: 45vh;
    }
    
    #mainVideo {
        object-fit: contain;
    }
    
    .video-title {
        font-size: 14px;
        max-height: 32px;
    }
    
    .video-actions {
        gap: 1px;
    }
    
    .action-btn {
        padding: 4px 6px;
        font-size: 10px;
        border-radius: 10px;
    }
    
    .action-btn i {
        font-size: 12px;
    }
    
    .channel-avatar {
        width: 32px;
        height: 32px;
    }
    
    .channel-name {
        font-size: 12px;
    }
    
    .video-description {
        font-size: 11px;
    }
}

/* Play prompt overlay styles */
.play-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    z-index: 100;
    cursor: pointer;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.play-prompt:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.play-prompt i {
    font-size: 48px;
    margin-bottom: 10px;
    color: #ff0000;
}

.play-prompt div:first-of-type {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 500;
}

.play-prompt div:last-of-type {
    font-size: 12px;
    opacity: 0.8;
} 