:root {
    --bg-dark: #0a0a1a;
    --bg-card: #1a1a2e;
    --bg-footer: #070711;
    --primary-color: #6c5ce7;
    --secondary-color: #ff3e7f;
    --text-light: #fff;
    --text-muted: #ccc;
    --star-color: #ffc107;
    
    --gradient-primary: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    background-image: radial-gradient(circle at 20% 30%, rgba(34, 34, 74, 0.4) 0%, transparent 60%),
                      radial-gradient(circle at 80% 70%, rgba(87, 34, 104, 0.4) 0%, transparent 60%);
}

a {
    text-decoration: none;
    color: var(--text-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(132, 28, 184, 0.3);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--primary-color);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    color: var(--text-light);
    font-size: 15px;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.right-side {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 5px 12px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-light);
    outline: none;
    width: 160px;
    font-size: 14px;
}

.search-box button {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-actions a {
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-btn {
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary-color);
}

.signup-btn {
    background: var(--gradient-primary);
    color: var(--text-light);
}

.user-actions a:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}

.banner {
    margin-top: 90px;
    height: 500px;
    background: linear-gradient(to right, rgba(10, 10, 26, 0.9), rgba(10, 10, 26, 0.5)), url('../img/Demon Slayer Tengen.jpg') center/cover;
    display: flex;
    align-items: center;
    border-radius: 15px;
    position: relative;
    padding: 40px;
}

.banner-content {
    max-width: 600px;
}

.banner-content h1 {
    font-size: 42px;
}

.banner-content p {
    margin: 15px 0;
    opacity: 0.9;
}

.btn {
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    margin-right: 10px;
}

.btn-play {
    background: var(--gradient-primary);
    color: var(--text-light);
}

.section-title {
    font-size: 24px;
    margin: 40px 0 20px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.movies-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.movie-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.3);
}

.movie-poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-badge,
.rating {
    position: absolute;
    top: 10px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.episode-badge {
    right: 10px;
    background: var(--gradient-primary);
}

.rating {
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--star-color);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 15px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: 0.3s;
}

.close-button:hover {
    color: var(--text-light);
}

video {
    width: 100%;
    border-radius: 10px;
}

footer {
    background: var(--bg-footer);
    padding: 60px 0 20px;
    margin-top: 40px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 5px;
}
.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
}
.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 12px;
}
.footer-column ul li a {
    color: var(--text-muted);
    transition: color 0.3s;
}
.footer-column ul li a:hover {
    color: var(--secondary-color);
}
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}
.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    transition: 0.3s;
}
.social-icons a:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
}
.copyright {
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid var(--bg-card);
    padding-top: 20px;
    color: #aaa;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.page-loader.show {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top: 6px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.page-loader p {
    color: var(--text-muted);
    font-size: 16px;
    letter-spacing: 1px;
}