:root {
    --rimuru-blue: #3AA8F6;
    --rimuru-dark-blue: #1E3A8A;
    --rimuru-light-blue: #A5D8FF;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a1a;
    --text-light: #333;
    --text-dark: #f0f0f0;
    --card-bg: #fff;
    --card-dark: #2d2d2d;
    --border-color: #e0e0e0;
    --border-dark: #444;
    --gold: #FFD700;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-light);
}


/* Main Content */
.episode-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Video Player Section */
.video-section {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .video-section {
        grid-template-columns: 1fr;
    }
}

.video-player-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.video-title {
    font-size: 1.5rem;
    color: var(--rimuru-dark-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--rimuru-blue);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1rem 0;
    border-radius: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Server Switch Styles */
.server-switcher {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background-color: rgba(58, 168, 246, 0.1);
    border-radius: 8px;
    align-items: center;
}

.server-btn {
    padding: 0.5rem 1rem;
    background-color: var(--rimuru-light-blue);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white
}

.server-btn.active {
    background-color: var(--rimuru-blue);
    color: white;
}

.server-btn:hover:not(.active) {
    background-color: var(--rimuru-light-blue);
    transform: translateY(-2px);
}

.server-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4CAF50;
}

.status-indicator.error {
    background-color: #f44336;
}

/* Episode List Sidebar */
.episode-sidebar {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 1.2rem;
    color: var(--rimuru-dark-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--rimuru-blue);
}

.season-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.season-btn {
    padding: 0.3rem 0.8rem;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.season-btn.active {
    background-color: var(--rimuru-blue);
    color: white;
    border-color: var(--rimuru-blue);
}

.episode-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.episode-item:hover {
    background-color: var(--rimuru-light-blue);
    border-color: var(--rimuru-blue);
}

.episode-item.active {
    background-color: var(--rimuru-blue);
    color: white;
    border-color: var(--rimuru-blue);
}

.episode-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.episode-link:hover {
    text-decoration: none;
}

.episode-thumb {
    width: 80px;
    height: 45px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.episode-info {
    flex: 1;
}

.episode-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.episode-duration {
    font-size: 0.8rem;
    color: #666;
}

.episode-item.active .episode-duration {
    color: #ddd;
}

/* Episode Details Section */
.episode-details {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.details-title {
    font-size: 1.5rem;
    color: var(--rimuru-dark-blue);
}

.details-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.details-content {
    line-height: 1.6;
}

/* Comment Section Styles */
.comments-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.comment-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.comment-submit {
    align-self: flex-end;
    padding: 0.7rem 1.5rem;
    background-color: var(--rimuru-blue);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.comment-submit:hover {
    background-color: var(--rimuru-dark-blue);
    transform: translateY(-2px);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--rimuru-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rimuru-dark-blue);
    font-weight: bold;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: var(--rimuru-dark-blue);
}

.comment-time {
    font-size: 0.8rem;
    color: #666;
}

.comment-text {
    line-height: 1.5;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.8rem;
}

.comment-action {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.comment-action:hover {
    color: var(--rimuru-blue);
}

/* Recommendations Section */
.recommendations {
    margin-top: 2rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--rimuru-dark-blue);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--rimuru-blue);
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.recommendation-card {
    position: relative;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.recommendation-thumb {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    transition: transform 0.3s ease;
}

.recommendation-card:hover .recommendation-thumb {
    transform: scale(1.05);
}

.recommendation-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    border-radius: 0 0 10px 10px;
}

.recommendation-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}


.recommendation-meta {
    font-size: 0.9rem;
    color: #ddd;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .video-title {
    color: white;
}
body.dark-mode .sidebar-title{
    color: white;
}

body.dark-mode .section-title{
    color: white;
}
body.dark-mode .details-title{
    color: white;
}
body.dark-mode .video-player-container,
body.dark-mode .episode-sidebar,
body.dark-mode .episode-details,
body.dark-mode .comments-section {
    background-color: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

body.dark-mode .server-switcher {
    background-color: rgba(30, 58, 138, 0.3);
}

body.dark-mode .server-btn {
    background-color: #2d3748;
    color: #e0e0e0;
}

body.dark-mode .server-btn.active {
    background-color: var(--rimuru-blue);
}

body.dark-mode .season-btn {
    background-color: #2d3748;
    color: #e0e0e0;
    border-color: #4a5568;
}

body.dark-mode .season-btn.active {
    background-color: var(--rimuru-blue);
}

body.dark-mode .episode-item {
    background-color: #2d2d2d;
    border-color: #444;
}

body.dark-mode .episode-item:hover {
    background-color: #3d3d3d;
}

body.dark-mode .episode-item.active {
    background-color: var(--rimuru-blue);
}

body.dark-mode .comment-input {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .comment {
    border-bottom-color: #444;
}

body.dark-mode .recommendation-card {
    background-color: #2d2d2d;
}

body.dark-mode .details-meta span,
body.dark-mode .comment-time,
body.dark-mode .comment-action {
    color: #aaa;
}

body.dark-mode .theme-toggle i.fa-moon::before {
    content: "\f186";
}

body.dark-mode ::-webkit-scrollbar {
    width: 8px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--rimuru-blue);
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-nav .nav-list {
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1.5rem;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--rimuru-dark-blue);
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav .nav-list {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
        padding: 0.8rem 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .forum-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .threads-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .sort-options {
        width: 100%;
        justify-content: space-between;
    }

    .sort-btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .branding {
        gap: 0.5rem;
    }

    .site-logo {
        height: 40px;
    }

    .utility-nav .login-btn span {
        display: none;
    }

    .header-container {
        padding: 0 1rem;
    }

    .forum-container {
        padding: 0 1rem;
    }
}