/*
Template Name: 异世界魔法禁书
Author: Manus AI
Description: 暗黑奇幻魔法里番动漫风格，魔法阵/禁术/古书/符文元素。
*/

/* 0. CSS Reset & Variables
-------------------------------------------------- */
:root {
    --main-bg: #0d0b0e; /* 古卷黑底 */
    --primary-gold: #f59e0b; /* 魔法金 */
    --accent-red: #b91c1c; /* 禁术红 */
    --rune-blue: #6366f1; /* 符文蓝 */
    --soul-green: #10b981; /* 灵魂绿 */
    --text-light: #e5e7eb;
    --text-dark: #9ca3af;
    --border-color: #374151;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--main-bg);
    color: var(--text-light);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="0" y="50" font-size="10" fill="rgba(245, 158, 11, 0.03)">📜</text><text x="50" y="100" font-size="10" fill="rgba(245, 158, 11, 0.03)">🔮</text></svg>');
}

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

a:hover {
    color: var(--accent-red);
}

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

ul {
    list-style: none;
}

.container {
    width: 1200px;
    max-width: 95%;
    margin: 0 auto;
}

/* 1. Header & Navigation
-------------------------------------------------- */
.header {
    background-color: rgba(13, 11, 14, 0.8);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo-wrap a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-gold);
    text-shadow: 0 0 5px var(--primary-gold);
}

.nav-list {
    display: flex;
}

.nav-item .nav-link {
    padding: 0 20px;
    line-height: 70px;
    display: block;
    color: var(--text-light);
    position: relative;
}

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

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

.search-form {
    position: relative;
}

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

.search-input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px var(--primary-gold);
    width: 250px;
}

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

/* 2. Hero Section
-------------------------------------------------- */
.hero-section {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    border-bottom: 2px solid var(--accent-red);
    box-shadow: 0 5px 20px rgba(185, 28, 28, 0.3);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(13, 11, 14, 0.5) 0%, #0d0b0e 70%);
    z-index: 1;
}

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

.hero-title {
    font-size: 3.5rem;
    color: var(--primary-gold);
    text-shadow: 0 0 15px var(--primary-gold), 0 0 25px var(--accent-red);
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-dark);
    letter-spacing: 2px;
}

.magic-circle {
    position: absolute;
    width: 350px;
    height: 350px;
    background: url(https://i.imgur.com/pIe2d59.png) no-repeat center center;
    background-size: contain;
    opacity: 0.3;
    animation: rotate-magic-circle 30s linear infinite;
    z-index: 0;
}

@keyframes rotate-magic-circle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 3. Layout & Sections
-------------------------------------------------- */
.content-wrap {
    padding: 2rem 0;
}

.main-area {
    width: 75%;
    float: left;
}

.sidebar {
    width: 23%;
    float: right;
}

.container::after {
    content: "";
    display: table;
    clear: both;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: var(--accent-red);
    box-shadow: 0 0 5px var(--accent-red);
}

/* 4. Video Card & Grid
-------------------------------------------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.video-card {
    background-color: #1a171c;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    animation: card-fade-in 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes card-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), 0 0 15px var(--rune-blue);
    border-color: var(--rune-blue);
}

.poster-wrap {
    position: relative;
}

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

.card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

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

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background-color: rgba(245, 158, 11, 0.8);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    clip-path: polygon(40% 30%, 40% 70%, 70% 50%);
}

.video-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent-red);
    color: white;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.video-score {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-gold);
    color: var(--main-bg);
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: bold;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 1rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.video-meta {
    font-size: 0.8rem;
    color: var(--text-dark);
}

/* 5. Sidebar
-------------------------------------------------- */
.sidebar-box {
    background-color: #1a171c;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.sidebar-title {
    font-size: 1.2rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-list li {
    margin-bottom: 10px;
}

.sidebar-list li a {
    color: var(--text-dark);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-list li a:hover {
    color: var(--primary-gold);
}

.ranking-list .rank-num {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: var(--border-color);
    color: var(--text-dark);
    border-radius: 4px;
    margin-right: 10px;
    font-size: 12px;
}

.ranking-list li:nth-child(1) .rank-num { background-color: var(--accent-red); color: white; }
.ranking-list li:nth-child(2) .rank-num { background-color: var(--primary-gold); color: var(--main-bg); }
.ranking-list li:nth-child(3) .rank-num { background-color: var(--rune-blue); color: white; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    background-color: var(--border-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-dark);
}

.tag-item:hover {
    background-color: var(--rune-blue);
    color: white;
}

/* 6. Footer
-------------------------------------------------- */
.footer {
    background-color: #1a171c;
    border-top: 2px solid var(--primary-gold);
    padding: 40px 0 20px;
    margin-top: 40px;
}

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

.footer-title {
    font-size: 1.2rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
}

.footer-brand-desc, .footer-links li a, .contact-info-list li {
    color: var(--text-dark);
    font-size: 14px;
}

.footer-links li {
    margin-bottom: 8px;
}

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

/* 7. Detail Page (show.html)
-------------------------------------------------- */
.breadcrumb {
    padding: 15px 0;
    color: var(--text-dark);
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-dark);
}
.breadcrumb a:hover {
    color: var(--primary-gold);
}

.detail-article {
    background-color: #1a171c;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.detail-title {
    font-size: 2.2rem;
    color: var(--primary-gold);
    margin-bottom: 10px;
}

.detail-meta {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.detail-meta span {
    margin-right: 20px;
}

.detail-player .poster-wrap {
    border: 2px solid var(--accent-red);
    box-shadow: 0 0 20px var(--accent-red);
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

.play-overlay .play-button {
    width: 80px;
    height: 80px;
    background-color: var(--primary-gold);
    clip-path: polygon(40% 30%, 40% 70%, 70% 50%);
    margin-bottom: 15px;
}

.detail-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #110f12;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
}

.rating-display {
    display: flex;
    align-items: center;
    color: var(--primary-gold);
}

.score-value {
    font-size: 2rem;
    font-weight: bold;
    margin-right: 10px;
}

.detail-body {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-top: 20px;
}

.detail-body h3.body-title {
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
}

.prev-next {
    margin-top: 20px;
    color: var(--text-dark);
}

/* 8. List Page (list.html)
-------------------------------------------------- */
.list-header {
    margin-bottom: 20px;
}

.list-header h1 {
    font-size: 2rem;
    color: var(--primary-gold);
}

.list-grid {
    grid-template-columns: repeat(4, 1fr);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a {
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: 4px;
}

.pagination a:hover, .pagination a.cur {
    background-color: var(--primary-gold);
    color: var(--main-bg);
    border-color: var(--primary-gold);
}

/* 9. FAQ
-------------------------------------------------- */
.faq-section {
    margin-top: 30px;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.faq-question {
    font-size: 1.1rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 15px 0;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-gold);
    font-size: 1.5rem;
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    color: var(--text-dark);
    padding: 0 15px;
}

.faq-answer p {
    padding-bottom: 15px;
}

/* 10. Anti-Interference CSS
-------------------------------------------------- */
body > div:not([class]),
body > span:not([class]),
body > a:not([class]) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 11. Responsive Design
-------------------------------------------------- */
@media (max-width: 1024px) {
    .container { width: 95%; }
    .main-area { width: 100%; float: none; }
    .sidebar { display: none; }
    .video-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-inner { height: 60px; }
    .main-nav { display: none; } /* Simple hide for now, can be replaced with a mobile menu */
    .hero-title { font-size: 2.5rem; }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-info-bar { flex-direction: column; align-items: flex-start; gap: 15px; }
}

@media (max-width: 480px) {
    body { font-size: 14px; }
    .hero-title { font-size: 2rem; }
    .video-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .detail-title { font-size: 1.8rem; }
}

/* Special Effects */
@keyframes rune-shine {
    0%, 100% { text-shadow: 0 0 5px var(--rune-blue), 0 0 10px var(--rune-blue); color: var(--rune-blue); }
    50% { text-shadow: 0 0 10px #fff, 0 0 20px var(--rune-blue); color: #fff; }
}

.nav-link:hover {
    animation: rune-shine 1.5s infinite;
}

.dark-flame-border {
    border: 2px solid transparent;
    box-shadow: 0 0 20px var(--accent-red);
    animation: flame-flicker 2s infinite alternate;
}

@keyframes flame-flicker {
    0% { box-shadow: 0 0 10px var(--accent-red), inset 0 0 5px rgba(185, 28, 28, 0.5); }
    50% { box-shadow: 0 0 20px var(--accent-red), inset 0 0 10px rgba(185, 28, 28, 0.8); }
    100% { box-shadow: 0 0 15px var(--accent-red), inset 0 0 8px rgba(185, 28, 28, 0.6); }
}

.particles-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 3;
}

.particle {
    position: absolute;
    background-color: var(--primary-gold);
    border-radius: 50%;
    opacity: 0;
    animation: particle-float 5s infinite ease-in-out;
}

@keyframes particle-float {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    25% { opacity: 0.7; }
    75% { opacity: 0.7; }
    100% { transform: translateY(-100px) translateX(20px); opacity: 0; }
}
