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

:root {
    --primary: #7537af;
    --primary-dark: #440088;
    --dark: #000000;
    --dark-light: linear-gradient(160grad, #1a1a1a00, #151515);;
    --gray: #1313139d;
    --text: #f5f5f5;
    --text-secondary: #b3b3b3;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.video-section {
    background: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 600;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.video-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray);
    color: var(--text);
}

.btn-secondary:hover {
    background: #3d3d3d;
}

.episodes-section {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
}

.episodes-grid {
    display: grid;
    max-height: 1230px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    overflow: scroll;
}

.episode-card {
    background: var(--gray);
    border-radius: 8px;

    transition: transform 0.3s ease;
    cursor: pointer;
}

.episode-card:hover {
    transform: translateY(-5px);
}

.episode-card.active {
    border: 2px solid var(--primary);
}

.episode-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.episode-info {
    padding: 10px;
}

.episode-number {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.episode-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-info-sidebar {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.anime-poster {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.anime-details {
    margin-bottom: 25px;
}

.detail-item {
    margin-bottom: 12px;
    display: flex;
}

.detail-label {
    font-weight: 600;
    min-width: 100px;
    color: var(--text-secondary);
}

.detail-value {
    flex: 1;
}

.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.genre-tag {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.description {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.read-more {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
}

.recommendations-section {
    margin-top: 40px;
}

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

.anime-card {
    background: linear-gradient(145deg, #46464675, #0b0b0b2b);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(110, 110, 110, 0.438);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.anime-card:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}

.anime-card:active {
    opacity: 0.7;
}

.anime-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.anime-card-info {
    padding: 10px 5px 10px 5px;
}

.anime-card-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.comments-section {
    margin-top: 40px;
    background: var(--dark-light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .video-title {
        font-size: 1.4rem;
    }

    .video-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .recommendations-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.hidden {
    display: none;
}

.divider {
    height: 1px;
    background: var(--gray);
    margin: 25px 0;
}

.header {
    background: var(--dark-light);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--gray);
    border-radius: 20px;
    padding: 8px 15px;
    width: 300px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text);
    width: 100%;
    outline: none;
}

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

.user-action-btn {
    background: var(--gray);
    border: none;
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.footer {
    background: var(--dark-light);
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    color: var(--text);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    margin-top: 40px;
    color: var(--text-secondary);
    padding-top: 20px;
    border-top: 1px solid var(--gray);
}

.ratings-image {
    width: 80px;
}

.Watchlist-btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    color: rgb(255, 255, 255);
    background: rgba(21, 212, 21, 0.849);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
}

.Watchlist-btn:hover {
    opacity: 0.8;
}

.Watchlist-btn:active {
    opacity: 0.7;
}

.toast {
    position: fixed;
    right: 20px;
    opacity: 0;
    background: rgba(11, 199, 11, 0.788);
    color: white;
    padding: 6px 10px 6px 10px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    z-index: 1000;
    transform: translateY(100px);

    transition: all 0.5s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    margin-right: 10px;
    font-size: 20px;
}

@media screen and (min-width:300px) and (max-width:600px) {
    .container {
        padding: 0;
        margin: 0;
    }
}
@media screen and (min-width:420px) and (max-width:704px)  {
    .recommendations-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media screen and (min-width:300px) and (max-width:419px)  {
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
}