.episode-watched-section {
    margin: 0 0 20px 0;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    color: white;
    position: relative;
    overflow: hidden;
}

.episode-watched-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.episode-watched-section > * {
    position: relative;
    z-index: 2;
}


/* Общие стили для статуса */

.watched-status {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-watched-stats {
    font-size: 15px;
    margin: -15px 0 15px 0;
    color: #777777;
}


/* Статус: НЕ просмотрено */

.watched-status.not-watched .watch-btn {
    background: white;
    color: #333;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.watched-status.not-watched .watch-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

.login-required {
    font-size: 15px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.watched-status.not-watched .watch-btn:active {
    transform: translateY(0);
}

.watched-status.not-watched .btn-icon {
    font-size: 20px;
}

.watched-status.not-watched .login-prompt,
.hint {
    font-size: 14px;
    opacity: 0.9;
}

.watched-status.not-watched .login-link {
    color: white;
    text-decoration: underline;
}


/* Статус: ПРОСМОТРЕНО */

.watched-status.watched {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.watched-status.watched .checkmark-badge {
    background: #10b981;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.watched-status.watched .status-text {
    flex: 1;
}

.watched-status.watched .status-text h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
}

.watched-status.watched .status-text .watch-date {
    font-size: 14px;
    opacity: 0.8;
}

.watched-status.watched .unwatch-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.watched-status.watched .unwatch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* Уведомления */

.watched-notification {
    position: fixed;
    top: 20px;
    right: 15px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    z-index: 9999;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    max-width: 350px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.watched-notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left: 3px solid #047857;
}

.watched-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left: 3px solid #b91c1c;
}

.watched-notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-left: 3px solid #1e40af;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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


/* Спиннер загрузки */

.watched-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* Страница "Мои просмотренные серии" */

.watched-episodes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.watched-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.watched-header h3 {
    font-size: 28px;
    color: #1f2937;
    margin: 0;
}

.watched-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.total-count {
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

.clear-all-watched {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.clear-all-watched:hover {
    background: #dc2626;
}

.watched-episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.watched-episode-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.watched-episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.episode-thumbnail {
    height: 180px;
    overflow: hidden;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.no-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.episode-info {
    padding: 20px;
}

.episode-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.episode-info h4 a {
    color: #1f2937;
    text-decoration: none;
}

.episode-info h4 a:hover {
    color: #3b82f6;
}

.episode-meta {
    margin-bottom: 15px;
}

.watch-date {
    font-size: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.remove-from-watched {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    width: 100%;
}

.remove-from-watched:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}


/* Адаптивность */

@media (max-width: 768px) {
    .watched-status {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 10px;
    }
    .watched-status.not-watched .watch-btn {
        justify-content: center;
        padding: 8px;
    }
    .watched-status.watched .status-text .watch-date {
        justify-content: center;
    }
    .watched-status.watched .checkmark-badge {
        margin: 0 auto;
    }
    .watched-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .watched-episodes-grid {
        grid-template-columns: 1fr;
    }
    .watched-status.watched .checkmark-badge {
        width: 30px;
        height: 30px;
    }
}