/* ChikiAnimation - Complete Stylesheet */

:root {
    --primary: #1E88E5;
    --secondary: #64B5F6;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text: #ffffff;
    --text-muted: #999;
    --border: #333;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text);
    line-height: 1.6;
}

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

.container-fluid {
    max-width: 100%;
    padding: 0 20px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--secondary);
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbar .logo h1 {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text);
    transition: color 0.3s;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-form {
    display: flex;
}

.search-form input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px 0 0 4px;
    background: var(--dark-bg);
    color: var(--text);
    outline: none;
}

.search-form button {
    padding: 0.5rem 1rem;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: var(--secondary);
}

.user-menu {
    position: relative;
}

.user-menu .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    min-width: 150px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.user-menu:hover .dropdown {
    display: block;
}

.user-menu .dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.user-menu .dropdown a:last-child {
    border-bottom: none;
}

.user-menu .dropdown a:hover {
    background: var(--dark-bg);
}

/* Hero Slider */
.hero-slider {
    height: 500px;
    position: relative;
    overflow: hidden;
}

.slider-wrapper {
    height: 100%;
}

.hero-slider .slide {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: opacity 1s;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-slider .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10,10,10,0.95) 40%, transparent);
}

.hero-slider .content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
    z-index: 2;
}

.hero-slider h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-slider .meta {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-slider .description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.badge {
    background: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    display: inline-block;
}

.buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

/* Anime Section */
.anime-section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Anime Grid */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.anime-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.anime-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.anime-card .poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

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

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

.anime-card .overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 0.5rem;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.anime-card .audio-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.anime-card .title {
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-card .meta {
    padding: 0 0.75rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
}

/* Series Header */
.series-header {
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 4rem 0;
}

.series-header .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10,10,10,0.95) 60%, rgba(10,10,10,0.7));
}

.series-info-wrapper {
    display: flex;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.poster-col img {
    width: 300px;
    border-radius: 8px;
}

.info-col {
    flex: 1;
}

.info-col h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.meta-info {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.genres {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.genre-tag {
    background: var(--card-bg);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

.genre-tag:hover, .genre-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.additional-info {
    margin-bottom: 1.5rem;
}

.info-item {
    margin-bottom: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Episodes Section */
.episodes-section {
    padding: 3rem 0;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.episode-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

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

.episode-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(30, 136, 229, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.episode-number {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.episode-info {
    padding: 0.75rem;
}

.episode-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video Player */
.player-container {
    background: var(--card-bg);
    padding: 2rem 0;
}

.player-row {
    display: flex;
    gap: 2rem;
}

.player-col-main {
    flex: 1;
}

.player-col-sidebar {
    width: 300px;
}

.video-player {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#player-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

#player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.no-video {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

.server-selection {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.servers {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.server-btn {
    padding: 0.5rem 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
}

.server-btn:hover, .server-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.episode-info-box {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.episode-navigation {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.nav-btn {
    flex: 1;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

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

.sidebar-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sidebar-card img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.episode-list-sidebar {
    max-height: 400px;
    overflow-y: auto;
}

.episode-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.episode-item:hover, .episode-item.active {
    background: var(--dark-bg);
}

/* Auth Pages */
.auth-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--dark-bg);
    color: var(--text);
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

/* Flash Messages */
.flash-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.flash-success {
    background: #4caf50;
    color: white;
}

.flash-error {
    background: #f44336;
    color: white;
}

.flash-info {
    background: #2196f3;
    color: white;
}

/* Footer */
.footer {
    background: var(--card-bg);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

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

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-muted);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .player-row {
        flex-direction: column;
    }
    
    .player-col-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .hero-slider h1 {
        font-size: 1.75rem;
    }
    
    .series-info-wrapper {
        flex-direction: column;
    }
    
    .poster-col img {
        width: 100%;
    }
    
    .episode-navigation {
        flex-direction: column;
    }
}
