@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6c5ce7;
    --secondary: #00b894;
    --dark: #2d3436;
    --light: #f5f6fa;
    --gray: #b2bec3;
    --accent: #fd79a8;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #1e272e;
    color: var(--light);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: var(--dark);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: rgba(45, 52, 54, 0.95);
    backdrop-filter: blur(10px);
}

.top-bar {
    background-color: var(--primary);
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--light);
    text-align: center;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
    position: relative;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-actions a {
    color: var(--light);
    text-decoration: none;
    margin-left: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.user-actions a:hover {
    color: var(--primary);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #2c3e50;
    border-radius: 50px;
    padding: 5px 15px;
    margin-left: 20px;
    transition: box-shadow 0.3s ease;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px var(--primary);
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--light);
    padding: 8px;
    outline: none;
    width: 200px;
}

.search-bar button {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-bar button:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(108, 92, 231, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #ddd;
    animation: fadeInUp 1.2s ease;
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    animation: fadeInUp 1.4s ease;
}

.btn:hover {
    background-color: #5649c0;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.btn-secondary {
    background-color: var(--secondary);
    margin-left: 15px;
}

.btn-secondary:hover {
    background-color: #00a085;
    box-shadow: 0 10px 20px rgba(0, 184, 148, 0.3);
}

/* Featured Section */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    display: inline-block;
    background-color: #1e272e;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    color: var(--primary);
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background-color: #3d4852;
    z-index: 0;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.anime-card {
    background-color: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    height: 100%;
}

.anime-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.anime-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.anime-card:hover img {
    transform: scale(1.05);
}

.anime-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8) 70%);
    padding: 20px 15px;
    transition: background 0.3s ease;
}

.anime-card:hover .anime-card-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9) 60%);
}

.anime-card-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.anime-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.anime-rating {
    display: flex;
    align-items: center;
}

.anime-rating span {
    color: #feca57;
    margin-right: 5px;
}

.anime-episodes {
    background-color: var(--primary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    position: absolute;
    top: 10px;
    right: 10px;
    font-weight: 600;
    z-index: 2;
}

.anime-genre {
    font-size: 0.9rem;
    color: #ddd;
}

/* Categories Section */
.categories {
    background-color: #2c3e50;
    padding: 60px 0;
    margin: 60px 0;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.category-item {
    background-color: #3d4852;
    color: var(--light);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-item:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

/* Popular Section */
.popular-anime {
    margin: 60px 0;
}

.popular-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.popular-item {
    display: flex;
    background-color: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.popular-item:hover {
    transform: translateY(-5px);
}

.popular-thumb {
    width: 120px;
    min-width: 120px;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.popular-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.popular-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.popular-genre {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.popular-rating {
    margin-top: auto;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.popular-rating span {
    color: #feca57;
    margin-right: 5px;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 70px 0;
    text-align: center;
    border-radius: 10px;
    margin: 60px 0;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/cta-pattern.svg');
    opacity: 0.1;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
}

.cta p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
}

.cta .btn {
    background-color: #fff;
    color: var(--primary);
    position: relative;
}

.cta .btn:hover {
    background-color: var(--dark);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background-color: var(--dark);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--primary);
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-column ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3d4852;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Redirect Message */
.redirect-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--dark);
    color: #fff;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    border-left: 4px solid var(--primary);
    animation: slideIn 0.5s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        height: 500px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 25px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
    
    .anime-card img {
        height: 280px;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 576px) {
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .search-bar {
        display: none;
    }
    
    .hero {
        height: 400px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .btn-secondary {
        margin-left: 10px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .anime-card img {
        height: 200px;
    }
    
    .anime-card-overlay h3 {
        font-size: 1rem;
    }
    
    .anime-info {
        font-size: 0.8rem;
    }
    
    .category-item {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .cta h2 {
        font-size: 1.8rem;
    }
    
    .cta p {
        font-size: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu ul li {
    margin-bottom: 20px;
}

.mobile-menu ul li a {
    color: var(--light);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-menu ul li a:hover {
    color: var(--primary);
}