/* ========== ОСНОВНЫЕ СТИЛИ ========== */
body {
    font-family: Bahnschrift Condensed, sans-serif;
    margin: 0;
    min-height: 100vh;
    background: #660000;
    position: relative;
}

/* ========== ШАПКА И НАВИГАЦИЯ ========== */
#header {
    font-size: clamp(32px, 8vw, 58px);
    display: flex;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 5;
}

#header h2 {
    color: white;
}

#header a[href="/"] {
    display: contents;
    text-decoration: none;
    color: inherit;
}

#header a[href="/"]:hover h2 {
    color: white !important;
    transform: none !important;
}

#header a[href="/"]:hover h1 {
    color: inherit !important;
    transform: none !important;
}

#header a[href="/"]:hover {
    transform: none !important;
}

hr, .line {
    border: 4px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

hr {
    border-width: 8px;
}

.navigation { 
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: clamp(18px, 4vw, 22px);
    position: relative;
    z-index: 5;
    flex-wrap: wrap;
    padding: 10px;
}

.navigation a {
    color: white;
    text-decoration: none;
    padding: 5px 20px;
    border-radius: 40px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.navigation a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

/* ========== ОБЩИЕ ССЫЛКИ ========== */
a {
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

a:hover {
    color: black;
    transform: scale(1.2);
}

/* ========== ПОЛУПРОЗРАЧНОСТЬ ДЛЯ ВСЕХ СЕКЦИЙ ========== */
.videojs-wrapper,
.video-info-section,
#Content {
    position: relative;
    z-index: 10;
}

.videojs-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    margin: 20px auto;
    padding: 15px;
}

.video-info-section {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    padding: 20px;
    margin: 25px auto;
}

#Content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 25px 20px;
}

/* ========== ИНФОРМАЦИЯ О ВИДЕО ========== */
.video-info-section {
    max-width: 1000px;
    animation: fadeIn 0.5s ease;
}

.video-meta {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    color: #e0e0e0;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 11;
}

#video-title { 
    color: white; 
    font-size: clamp(24px, 4vw, 32px);
    margin: 0 0 10px 0;
    text-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
    border-left: 3px solid #ff4d4d;
    padding-left: 15px;
    transition: text-shadow 0.3s ease;
    position: relative;
    z-index: 11;
}

#video-title:hover {
    text-shadow: 0 2px 12px rgba(255, 68, 68, 0.6);
}

#video-author, 
#video-views { 
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 68, 68, 0.25);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 14px;
    border: 1px solid rgba(255, 68, 68, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

#video-author::before {
    content: '👤';
    font-size: 12px;
}

#video-views::before {
    content: '👁️';
    font-size: 12px;
}

#video-author:hover,
#video-views:hover {
    background: rgba(255, 68, 68, 0.35);
    border-color: rgba(255, 68, 68, 0.6);
    transform: translateY(-2px);
}

#login-required {
    font-size: 13px;
    color: #ff9999;
    display: none;
    background: rgba(180, 0, 0, 0.3);
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid #ff4d4d;
    animation: gentlePulse 2s infinite;
}

#login-required::before {
    content: '🔒';
    margin-right: 6px;
    font-size: 12px;
}

#video-description { 
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-size: 16px;
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    border-left: 3px solid #ff4d4d;
    transition: background 0.3s ease;
    position: relative;
    z-index: 11;
}

#video-description:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* ========== КНОПКИ ПЛЕЕРА (Like, Favorites, Complaint) ========== */
.like-button, 
.complaint-button,
.favorite-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 22px;
    border: none;
    border-radius: 30px;
    background: rgba(20, 20, 20, 0.9);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 15px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 11;
}

.like-button { color: #aaa; }
.like-button.liked { 
    color: #ff4d4d;
    background: rgba(255, 68, 68, 0.25);
    border-color: rgba(255, 68, 68, 0.5);
}

.favorite-button { color: #aaa; }
.favorite-button.active { 
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.complaint-button { color: #ffb3b3; margin-left: 10px; }

.like-button:hover, 
.complaint-button:hover,
.favorite-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 68, 68, 0.4);
}

.like-button.liked:hover {
    box-shadow: 0 8px 20px rgba(255, 68, 68, 0.3);
}

.favorite-button.active:hover {
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

#like-icon,
#favorite-icon {
    transition: transform 0.2s ease;
    font-size: 18px;
}

.like-button:hover #like-icon,
.favorite-button:hover #favorite-icon {
    transform: scale(1.15);
}

/* ========== КОНТЕЙНЕР ПЛЕЕРА ========== */
.videojs-wrapper {
    max-width: 1000px;
    margin: 20px auto;
    padding: 15px;
}

.videojs-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 68, 68, 0.3);
    transition: box-shadow 0.3s ease;
    z-index: 2;
}

.videojs-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 68, 68, 0.4);
}

/* ========== ТЕГИ ========== */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0 5px;
    position: relative;
    z-index: 11;
}

.tag {
    padding: 5px 14px;
    background: rgba(102, 126, 234, 0.25);
    border-radius: 25px;
    font-size: 12px;
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag::before {
    content: '#';
    margin-right: 3px;
    opacity: 0.7;
}

.tag:hover {
    background: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.7);
}

/* ========== КОММЕНТАРИИ ========== */
.comments-section {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.comments-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 20px;
}

.add-comment {
    margin-bottom: 30px;
}

.add-comment textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.add-comment textarea:focus {
    outline: none;
    border-color: #ff4d4d;
}

.add-comment button {
    margin-top: 10px;
    padding: 8px 20px;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.add-comment button:hover {
    background: #cc0000;
}

.comment-char-counter {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 15px;
    transition: background 0.2s;
}

.comment-item.pinned {
    background: rgba(255, 77, 77, 0.15);
    border-left: 3px solid #ff4d4d;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-username {
    color: #ff9999;
    font-weight: bold;
    font-size: 14px;
}

.comment-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.comment-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 10px;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.comment-like {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 12px;
    padding: 5px;
}

.comment-like.liked {
    color: #ff4d4d;
}

.comment-reply {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 12px;
}

.comment-reply:hover,
.comment-like:hover {
    color: #ff9999;
}

.comment-delete {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 12px;
}

.comment-delete:hover {
    color: #ff4d4d;
}

.comment-pin {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 12px;
}

.comment-pin:hover,
.comment-pin.active {
    color: #ffd966;
}

.replies {
    margin-left: 30px;
    margin-top: 15px;
    padding-left: 15px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.reply-item {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.reply-username {
    color: #ff9999;
    font-size: 12px;
    font-weight: bold;
}

.reply-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.reply-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.reply-form {
    margin-top: 10px;
    display: none;
}

.reply-form textarea {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-size: 12px;
}

.reply-form button {
    margin-top: 5px;
    padding: 4px 12px;
    background: #ff4d4d;
    border: none;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.load-more {
    text-align: center;
    margin-top: 20px;
}

.load-more button {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

.load-more button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.comments-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
}

/* ========== ОШИБКИ ========== */
.error-container {
    background: rgba(0,0,0,0.8);
    border-radius: 8px;
    padding: 50px;
    text-align: center;
    color: white;
}

.error-container h2 { 
    color: #ff6b6b; 
    margin-bottom: 20px; 
}

.error-container p { 
    color: #ddd; 
    margin-bottom: 10px; 
}

.error-container a {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.error-container a:hover {
    background: #5a6fd8;
}

/* ========== FOOTER ========== */
footer {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 25px 20px;
    margin-top: 40px;
    text-align: center;
    position: relative;
    z-index: 10;
}

footer a {
    color: #ff9999;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

footer p {
    margin: 10px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gentlePulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.player-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.skeleton-pulse {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: pulse 1.5s infinite;
}

.big-play-skeleton {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.5);
    animation: fadePulse 2s infinite;
}

@keyframes pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.video-notification {
    pointer-events: none;
}

/* ========== МЕДИА-ЗАПРОСЫ ========== */
@media (min-width: 481px) {
    #Content { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    #Content { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
    #Content { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
    #Content { 
        grid-template-columns: repeat(4, 1fr);
        max-width: 1300px;
    }
}

@media (min-width: 1400px) {
    #Content { 
        grid-template-columns: repeat(5, 1fr);
        max-width: 1600px;
    }
}

@media (max-width: 768px) {
    #header { font-size: 32px; }
    
    .navigation {
        font-size: 18px;
        flex-direction: column;
        align-items: center;
    }
    
    .navigation a {
        width: 80%;
        text-align: center;
        padding: 10px 15px;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .like-button, 
    .complaint-button,
    .favorite-button {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    #video-author, 
    #video-views {
        padding: 4px 12px;
        font-size: 13px;
        background: rgba(255, 68, 68, 0.35);
    }
    
    .tag {
        padding: 4px 12px;
        font-size: 11px;
        background: rgba(102, 126, 234, 0.35);
    }
    
    footer { padding: 20px 15px; }
    footer a { display: inline-block; margin: 5px 8px; }
}

@media (max-width: 480px) {
    .error-container {
        padding: 30px 20px;
    }
    
    .error-container h2 { font-size: 20px; }
    
    #video-author::before,
    #video-views::before {
        font-size: 11px;
    }
    
    #login-required {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    #login-required::before {
        font-size: 11px;
    }
    
    footer { padding: 15px 10px; }
}

@media (max-width: 900px) and (orientation: landscape) {
    #Content { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
    }
}