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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: #1a1a1a;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo a {
    color: #e74c3c;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.main-nav .active a,
.main-nav a:hover {
    background: #e74c3c;
}

.search-box {
    display: flex;
    min-width: 300px;
}

.search-box input {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.search-box button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-actions button {
    background: #333;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.user-actions button:hover {
    background: #555;
}

.mobile-header {
    display: none;
    background: #1a1a1a;
    color: white;
}

.mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.mobile-logo a {
    color: #e74c3c;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

.mobile-actions {
    display: flex;
    gap: 10px;
}

.mobile-actions button {
    background: #333;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.mobile-search {
    padding: 0 20px 15px;
}

.mobile-search form {
    display: flex;
}

.mobile-search input {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.mobile-search button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    background: #333;
    padding: 10px 20px;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
}

.mobile-nav .active a,
.mobile-nav a:hover {
    background: #e74c3c;
}

.main-content {
    padding: 30px 0;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #e74c3c;
}

.breadcrumb span {
    margin: 0 8px;
    color: #999;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
}

.player-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.player-header h1 {
    font-size: 24px;
    color: #333;
}

.player-tools button {
    background: #666;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.video-player {
    position: relative;
    margin-bottom: 20px;
}

.player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

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

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #333;
    cursor: pointer;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.control-left,
.control-right {
    display: flex;
    gap: 10px;
}

.player-controls button {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.player-controls button:hover {
    background: #e9ecef;
}

.sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: fit-content;
}

.playlist-section {
    margin-bottom: 20px;
}

.playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.quality-selector {
    position: relative;
}

.quality-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.quality-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: none;
    min-width: 100px;
    z-index: 100;
}

.quality-dropdown a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.quality-dropdown a:last-child {
    border-bottom: none;
}

.quality-dropdown a:hover {
    background: #f8f9fa;
}

.current-quality {
    font-weight: bold;
    color: #333;
}

.playlist {
    position: relative;
}

.episode-list {
    list-style: none;
    display: none;
}

.episode-list.active {
    display: block;
}

.episode-list li {
    margin-bottom: 8px;
}

.episode-list a {
    display: block;
    padding: 8px 15px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.episode-list a:hover,
.episode-list a.active {
    background: #e74c3c;
    color: white;
}

.related-section,
.comment-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
}

.section-header h2 {
    font-size: 22px;
    color: #333;
}

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

.movie-item {
    text-align: center;
}

.movie-poster {
    position: relative;
    margin-bottom: 10px;
}

.movie-poster a {
    display: block;
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.quality-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.movie-info h3 {
    margin-bottom: 5px;
    font-size: 14px;
}

.movie-info h3 a {
    color: #333;
    text-decoration: none;
}

.movie-info h3 a:hover {
    color: #e74c3c;
}

.movie-info p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.comment-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    outline: none;
    font-family: inherit;
}

.form-group textarea:focus {
    border-color: #e74c3c;
}

.form-actions {
    text-align: right;
}

.form-actions button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.comment-list {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.username {
    font-weight: bold;
    color: #333;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-text {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-actions button {
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.comment-actions button:hover {
    color: #e74c3c;
}

.site-footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e74c3c;
}

.footer-content {
    text-align: center;
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.8;
}

.footer-content p {
    margin-bottom: 10px;
}
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    font-size: 18px;
    font-weight: bold;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #c0392b;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .site-header {
        display: none;
    }
    
    .mobile-header {
        display: block;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .content-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        order: -1;
    }
    
    .player-header h1 {
        font-size: 20px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .player-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-left,
    .control-right {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .mobile-top {
        padding: 12px 15px;
    }
    
    .mobile-search {
        padding: 0 15px 12px;
    }
    
    .mobile-nav {
        padding: 8px 15px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .player-section,
    .sidebar,
    .related-section,
    .comment-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .comment-item {
        gap: 10px;
    }
    
    .comment-avatar img {
        width: 35px;
        height: 35px;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .footer-content {
        font-size: 13px;
    }
}

.mobile-menu-active .mobile-nav {
    display: block;
}

.quality-selector:hover .quality-dropdown {
    display: block;
}

.light-off {
    background: rgba(0,0,0,0.9);
}

.light-off .main-content {
    background: transparent;
}

.light-off .player-section {
    background: #1a1a1a;
    color: white;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.search-box {
    position: relative;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

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

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.7);
    transition: transform 0.3s;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

