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

:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --card-bg: #2a2a2a;
    --accent-color: #6c5ce7;
    --accent-secondary: #a29bfe;
    --text-primary: #ffffff;
    --text-secondary: #b2b2b2;
    --text-muted: #666666;
    --border-color: #333333;
    --hover-bg: #3a3a3a;
    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-secondary: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
    --shadow-light: 0 4px 20px rgba(108, 92, 231, 0.1);
    --shadow-medium: 0 8px 30px rgba(108, 92, 231, 0.2);
    --shadow-heavy: 0 15px 50px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--secondary-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    position: relative;
}

.icon-inner {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.icon-inner::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 50%;
}

.brand-text {
    font-size: 22px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    margin: 5px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.home-icon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'%3E%3C/path%3E%3C/svg%3E"); }
.school-icon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 14l9-5-9-5-9 5 9 5z'%3E%3C/path%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z'%3E%3C/path%3E%3C/svg%3E"); }
.love-icon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z'%3E%3C/path%3E%3C/svg%3E"); }
.youth-icon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z'%3E%3C/path%3E%3C/svg%3E"); }
.heal-icon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z'%3E%3C/path%3E%3C/svg%3E"); }
.fantasy-icon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z'%3E%3C/path%3E%3C/svg%3E"); }

.nav-text {
    font-size: 15px;
    font-weight: 500;
}

.main-wrapper {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background: var(--primary-bg);
}

.top-header {
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    margin-right: 20px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-light);
}

.search-field {
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    width: 300px;
}

.search-field::placeholder {
    color: var(--text-muted);
}

.search-submit {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: var(--gradient-secondary);
}

.search-icon {
    width: 16px;
    height: 16px;
    background: white;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    mask-size: contain;
}

.content-area {
    padding: 40px 30px;
}

.hero-showcase {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 50px;
    margin-bottom: 50px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.05;
    z-index: 1;
}

.showcase-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.showcase-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.showcase-desc {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.showcase-stats {
    display: flex;
    gap: 40px;
}

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

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.showcase-visual {
    position: relative;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    transform: rotate(5deg);
}

.visual-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.visual-item:hover {
    transform: scale(1.05);
}

.visual-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: var(--accent-secondary);
}

.trending-section {
    margin-bottom: 60px;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.anime-item {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.anime-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.anime-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.anime-poster {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.anime-item:hover .anime-poster img {
    transform: scale(1.1);
}

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

.anime-item:hover .poster-overlay {
    opacity: 1;
}

.play-button {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}

.play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 12px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.anime-rating {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-secondary);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.anime-info {
    padding: 20px;
}

.anime-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.anime-genre {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.anime-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.categories-section {
    margin-bottom: 60px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.category-box {
    position: relative;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.category-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    position: relative;
}

.category-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.category-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-box:hover .category-bg img {
    transform: scale(1.1);
}

.category-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.8) 0%, rgba(162, 155, 254, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.category-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.category-arrow {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.category-arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 8px solid white;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.category-box:hover .category-arrow {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.recent-updates {
    margin-bottom: 60px;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-row {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.update-row:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-light);
}

.update-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.update-poster {
    position: relative;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.update-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.update-status {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--gradient-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.update-details {
    flex: 1;
    min-width: 0;
}

.update-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.update-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.update-time {
    font-size: 12px;
    color: var(--text-muted);
}

.update-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 120px;
}

.progress-bar {
    width: 100px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .showcase-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .showcase-stats {
        justify-content: center;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 20px 15px;
    }
    
    .top-header {
        padding: 15px 20px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .search-field {
        width: 200px;
    }
    
    .hero-showcase {
        padding: 30px 20px;
    }
    
    .showcase-title {
        font-size: 28px;
    }
    
    .showcase-desc {
        font-size: 16px;
    }
    
    .showcase-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .update-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .update-poster {
        width: 100%;
        height: 120px;
    }
    
    .update-progress {
        align-items: flex-start;
        width: 100%;
    }
    
    .progress-bar {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .search-field {
        width: 150px;
    }
    
    .hero-showcase {
        padding: 20px 15px;
    }
    
    .showcase-title {
        font-size: 24px;
    }
    
    .showcase-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .anime-grid {
        grid-template-columns: 1fr;
    }
    
    .visual-grid {
        grid-template-columns: 1fr;
    }
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

