:root {
    --bg-main: #090b12;
    --bg-card: #121624;
    --bg-card-hover: #181d30;
    --bg-elevated: #1c2237;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(56, 189, 248, 0.35);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-pink: #ff4d6d;
    --accent-cyan: #38bdf8;
    --accent-purple: #a855f7;
    --accent-emerald: #10b981;
    --accent-gold: #fbbf24;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --container-max: 1260px;
}

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

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 12% 10%, rgba(255, 77, 109, 0.09) 0%, transparent 38%),
        radial-gradient(circle at 88% 18%, rgba(56, 189, 248, 0.09) 0%, transparent 42%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

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

img, svg {
    max-width: 100%;
    display: block;
}

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

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 11, 18, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #ffffff, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(56, 189, 248, 0.14);
}

.nav-link.nav-hot {
    color: #fda4af;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 3px 5px 3px 14px;
    transition: border-color 0.2s;
}

.header-search:focus-within {
    border-color: var(--accent-cyan);
}

.header-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 145px;
}

.header-search button {
    background: linear-gradient(135deg, var(--accent-pink), #e11d48);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

/* Announcement Banner (Strictly under nav) */
.announce-bar {
    background: linear-gradient(90deg, rgba(255, 77, 109, 0.14), rgba(56, 189, 248, 0.14), rgba(168, 85, 247, 0.14));
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    padding: 10px 0;
}

.announce-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #e2e8f0;
}

.announce-badge {
    background: var(--accent-pink);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.announce-text {
    font-weight: 500;
    word-break: break-word;
}

/* Hero Section */
.hero-section {
    padding: 28px 0 18px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 22px;
}

.hero-main-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-visual {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
}

.hero-visual svg {
    width: 100%;
    height: 100%;
}

.hero-body {
    padding: 22px 24px 24px;
}

.hero-meta-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.pill-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan);
}

.pill-score {
    background: rgba(251, 191, 36, 0.16);
    color: var(--accent-gold);
}

.hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #fff;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 0.94rem;
    margin-bottom: 18px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent-pink), #e11d48);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(255, 77, 109, 0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
}

.btn-outline:hover {
    border-color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.1);
}

/* Hero Side Radar Panel */
.hero-radar-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
}

.radar-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.radar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.radar-item:hover {
    transform: translateX(3px);
    border-color: var(--border-accent);
}

.radar-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.radar-rank.top-1 { background: #ef4444; color: #fff; }
.radar-rank.top-2 { background: #f97316; color: #fff; }
.radar-rank.top-3 { background: #eab308; color: #090b12; }

.radar-info {
    flex: 1;
    min-width: 0;
}

.radar-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radar-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.radar-score {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--accent-gold);
    flex-shrink: 0;
}

/* Section Headers */
.section-block {
    padding: 26px 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.section-title-group h2 {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-group h2::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 22px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent-pink), var(--accent-cyan));
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Interactive Mood Picker / AI Filter */
.mood-picker-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.mood-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-right: 4px;
}

.mood-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mood-btn:hover, .mood-btn.active {
    background: var(--accent-cyan);
    color: #090b12;
    border-color: var(--accent-cyan);
}

/* Cards Grid */
.cards-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.cards-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.anime-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.anime-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.card-thumb {
    width: 100%;
    height: 165px;
    overflow: hidden;
    position: relative;
    background: #0d111a;
}

.card-thumb svg {
    width: 100%;
    height: 100%;
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.card-cat-badge {
    font-weight: 700;
    color: var(--accent-cyan);
}

.card-title {
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.42;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.58;
    margin-bottom: 14px;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* Weekly Broadcast Schedule Table / Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.schedule-col {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
}

.schedule-day-head {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--accent-cyan);
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
}

.schedule-entry {
    padding: 9px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.schedule-entry:last-child {
    border-bottom: none;
}

.schedule-time {
    font-size: 0.73rem;
    color: var(--accent-pink);
    font-weight: 700;
}

.schedule-show-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 2px 0;
}

.schedule-ep {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Ranking Full Table */
.ranking-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ranking-row {
    display: grid;
    grid-template-columns: 56px 190px 1fr 140px;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.ranking-row:last-child {
    border-bottom: none;
}

.rank-num-large {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-secondary);
}

.rank-num-large.r-1 { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.rank-num-large.r-2 { background: linear-gradient(135deg, #f97316, #c2410c); color: #fff; }
.rank-num-large.r-3 { background: linear-gradient(135deg, #eab308, #a16207); color: #090b12; }

.rank-poster {
    height: 110px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.rank-metrics {
    text-align: right;
}

.rank-score-big {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1.1;
}

/* Article Detail View */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
    padding: 28px 0 40px;
}

.article-main {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    min-width: 0;
}

.breadcrumb {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.article-h1 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 16px;
    color: #fff;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.article-cover-banner {
    width: 100%;
    height: 270px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
}

.article-content {
    font-size: 1.02rem;
    color: #e2e8f0;
    line-height: 1.85;
}

.article-content h3 {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--accent-cyan);
    margin: 28px 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--accent-pink);
}

.article-content p {
    margin-bottom: 16px;
}

.article-content ul, .article-content ol {
    margin: 12px 0 18px 22px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    background: rgba(56, 189, 248, 0.08);
    border-left: 4px solid var(--accent-cyan);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 18px 0;
    color: #bae6fd;
    font-style: italic;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
}

.article-content th, .article-content td {
    border: 1px solid var(--border-subtle);
    padding: 10px 12px;
    text-align: left;
}

.article-content th {
    background: var(--bg-elevated);
    color: var(--accent-cyan);
}

.security-notice-box {
    margin-top: 28px;
    padding: 14px 18px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    color: #a7f3d0;
}

/* Sidebar */
.sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.widget-title {
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
    color: #fff;
}

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

.tag-chip {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.tag-chip:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Footer */
.site-footer {
    margin-top: auto;
    background: #06070c;
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0 28px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 0.96rem;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Responsive Rules (375px zero horizontal overflow) */
@media (max-width: 1024px) {
    .hero-grid,
    .article-layout {
        grid-template-columns: 1fr;
    }
    .cards-grid-3,
    .cards-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .schedule-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ranking-row {
        grid-template-columns: 44px 1fr;
    }
    .rank-poster {
        display: none;
    }
    .rank-metrics {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 14px;
    }
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .main-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .header-search {
        width: 100%;
    }
    .header-search input {
        width: 100%;
        flex: 1;
    }
    .cards-grid-3,
    .cards-grid-4,
    .schedule-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-visual {
        height: 195px;
    }
    .hero-body {
        padding: 16px;
    }
    .hero-title {
        font-size: 1.25rem;
    }
    .article-main {
        padding: 18px 14px;
    }
    .article-h1 {
        font-size: 1.35rem;
    }
    .article-cover-banner {
        height: 190px;
    }
}
