/*
 * Template Name: 霓虹欲望都市
 * Author: Manus AI
 * Description: 歌舞伎町霓虹夜色里番动漫风格，红灯区/霓虹招牌/都市夜景元素。
 */

/* 1. Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. CSS Variables & Theme */
:root {
    --color-bg: #0a0810;
    --color-primary: #ef4444; /* Red Light Red */
    --color-secondary: #f97316; /* Neon Orange */
    --color-accent: #a855f7; /* Nightclub Purple */
    --color-highlight: #facc15; /* Streetlight Yellow */
    --color-text: #d1d5db; /* Light Gray */
    --color-heading: #f9fafb; /* White */
    --color-border: #374151;
    --color-card-bg: #1f2937;
    --color-footer-bg: #111827;
    --color-link: #f97316;
    --color-link-hover: #ef4444;

    --shadow-neon-red: 0 0 5px #ef4444, 0 0 10px #ef4444, 0 0 20px #ef4444, 0 0 40px #ef4444;
    --shadow-neon-orange: 0 0 5px #f97316, 0 0 10px #f97316, 0 0 15px #f97316;
    --shadow-neon-purple: 0 0 5px #a855f7, 0 0 10px #a855f7, 0 0 15px #a855f7;
}

/* 3. Layout System */
.content-wrap {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
}

.main-area {
    flex: 1;
    min-width: 0; /* Prevents flexbox overflow */
}

.sidebar {
    flex: 0 0 300px;
    width: 300px;
}

/* 4. Header/Nav Styles */
.header {
    background-color: rgba(10, 8, 16, 0.8);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo-wrap a {
    text-shadow: var(--shadow-neon-red);
}

.main-nav .nav-list {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--color-heading);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
}

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

.nav-link:hover::after, .nav-item.active .nav-link::after {
    width: 100%;
}

.search-form {
    position: relative;
}

.search-input {
    background-color: #1f2937;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text);
    padding: 8px 40px 8px 15px;
    width: 220px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-neon-orange);
}

.search-button {
    background: none;
    border: none;
    color: var(--color-text);
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

/* 5. Hero Section */
.hero {
    position: relative;
    padding: 100px 0;
    text-align: center;
    overflow: hidden;
    background: url('../images/hero-bg.jpg') no-repeat center center/cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, var(--color-bg) 0%, rgba(10, 8, 16, 0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: var(--shadow-neon-red);
    animation: neon-flicker 2s infinite alternate;
}

/* 6. Section/Card Styles */
.section {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--color-heading);
    text-shadow: 0 0 10px var(--color-accent);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.video-card {
    background-color: var(--color-card-bg);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), var(--shadow-neon-purple);
}

.poster {
    position: relative;
}

.poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-neon-red);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--color-primary);
    color: #fff;
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.score {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--color-highlight);
    color: #000;
    padding: 2px 8px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 4px;
}

.card-info {
    padding: 1rem;
}

.card-title {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

.card-meta {
    font-size: 0.85rem;
    color: #9ca3af;
    display: flex;
    justify-content: space-between;
}

/* 7. Sidebar Styles */
.sidebar-box {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px var(--color-primary);
}

.ranking-list .ranking-item a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.ranking-num {
    font-weight: bold;
    font-size: 1.2rem;
    width: 30px;
    color: var(--color-text);
}

.ranking-item.ranking-1 .ranking-num { color: #ef4444; }
.ranking-item.ranking-2 .ranking-num { color: #f97316; }
.ranking-item.ranking-3 .ranking-num { color: #a855f7; }

.ranking-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background-color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
}
.tag-item:hover {
    background-color: var(--color-secondary);
    color: #fff;
    text-decoration: none;
}

/* 8. Footer Styles */
.footer {
    background-color: var(--color-footer-bg);
    color: #9ca3af;
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.2rem;
    color: var(--color-heading);
    margin-bottom: 1rem;
}

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

.footer-links a {
    color: #9ca3af;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

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

/* 9. Detail Page */
.detail-article {
    background-color: var(--color-card-bg);
    padding: 2rem;
    border-radius: 8px;
}

.breadcrumb {
    margin-bottom: 1rem;
}

.detail-header h1 {
    font-size: 2.2rem;
    color: var(--color-heading);
    text-shadow: var(--shadow-neon-red);
}

.detail-player {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.poster-wrap {
    flex: 0 0 250px;
}

.poster-wrap img {
    border-radius: 8px;
}

.detail-info {
    flex: 1;
}

.rating-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-highlight);
}

.info-list {
    margin: 1rem 0;
}

.info-list li {
    padding: 0.25rem 0;
}

.detail-body {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    line-height: 1.8;
}

/* 10. List Page & Pagination */
.list-item {
    display: flex;
    gap: 1.5rem;
    background-color: var(--color-card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.list-item-poster {
    flex: 0 0 150px;
}

.list-item-poster img {
    border-radius: 4px;
}

.list-item-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.pagination a:hover, .pagination .current {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    text-decoration: none;
}

/* 11. Effects & Animations */
@keyframes neon-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: var(--shadow-neon-red);
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: none;
        opacity: 0.8;
    }
}

.rain-effect {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background: transparent;
}

/* 12. Anti-Interference CSS */
body > div:not([class]):not([id]),
body > a[style*="z-index:"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 13. Responsive Design */
@media (max-width: 1024px) {
    .content-wrap {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .main-nav { order: 3; width: 100%; margin-top: 10px; }
    .nav-list { justify-content: center; }
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-player { flex-direction: column; }
    .hero-title { font-size: 2.5rem; }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .list-item { flex-direction: column; }
    .search-input { width: 180px; }
}
