/* ==================== */
/* 基础样式              */
/* ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #c41230;
    --primary-dark: #a01028;
    --primary-light: #e8d5d5;
    --secondary: #2c5f7c;
    --accent: #d4a843;
    --accent-light: #f5ecd4;
    --text: #2d2d2d;
    --text-light: #5a5a5a;
    --text-muted: #8a8a8a;
    --bg: #f8f6f1;
    --bg-white: #ffffff;
    --bg-dark: #1a1a2e;
    --bg-light: #f3f0eb;
    --bg-gray: #faf8f5;
    --border: #e0dcd5;
    --border-light: #ebe8e3;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --male: #3b7dd8;
    --female: #c41230;
    --unknown: #8a8a8a;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== */
/* Header               */
/* ==================== */
.header {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;
    position: relative;
    padding: 12px 20px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(196, 18, 48, 0.08), rgba(255, 107, 107, 0.08));
    border-radius: 12px;
    border: 1px solid rgba(196, 18, 48, 0.15);
    transition: all 0.4s ease;
    background: linear-gradient(135deg, #c41230 0%, #ff6b6b 50%, #ee5a5a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.logo::before {
    content: '千心网';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #c41230 0%, #ff6b6b 50%, #ee5a5a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(8px);
    opacity: 0.6;
    z-index: -1;
}

.logo::after {
    content: '千心网';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #c41230 0%, #ff6b6b 50%, #ee5a5a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(16px);
    opacity: 0.3;
    z-index: -2;
}

.logo:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(196, 18, 48, 0.3);
}

.logo:hover::before {
    opacity: 0.8;
    filter: blur(10px);
}

.logo:hover::after {
    opacity: 0.5;
    filter: blur(20px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    letter-spacing: 0.5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

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

/* ==================== */
/* Search Box           */
/* ==================== */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.search-box:focus-within::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.search-box::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 30px;
    background: linear-gradient(135deg, #c41230, #ff6b6b, #ee5a5a);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    filter: blur(6px);
}

.search-box:focus-within::after {
    opacity: 0.4;
}

.search-box input {
    padding: 12px 20px 12px 44px;
    border: 2px solid rgba(196, 18, 48, 0.15);
    border-radius: 30px;
    width: 260px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-weight: 500;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.search-box input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-box input:hover {
    border-color: rgba(196, 18, 48, 0.25);
    background: rgba(255, 255, 255, 0.95);
}

.search-box input:focus {
    width: 320px;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 
        0 4px 24px rgba(196, 18, 48, 0.12),
        0 0 0 4px rgba(196, 18, 48, 0.08);
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    width: 360px;
    max-height: 440px;
    overflow-y: auto;
    margin-top: 10px;
    animation: dropdownIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(196, 18, 48, 0.04);
    padding-left: 24px;
}

/* ==================== */
/* Hero                 */
/* ==================== */
.hero {
    background: linear-gradient(135deg, #0a0a12 0%, #0d0d1a 30%, #161628 60%, #0f1f35 100%);
    color: #fff;
    padding: 120px 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 520px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 0%, rgba(196, 18, 48, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 0% 50%, rgba(44, 95, 124, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 100% 50%, rgba(212, 168, 67, 0.05) 0%, transparent 50%);
    animation: heroShimmer 15s ease-in-out infinite;
}

@keyframes heroShimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(196, 18, 48, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(196, 18, 48, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212, 168, 67, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(196, 18, 48, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(44, 95, 124, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 70% 20%, rgba(212, 168, 67, 0.1) 0%, transparent 40%);
    animation: heroFloat 25s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.98); }
    75% { transform: translate(30px, 10px) scale(1.02); }
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(196, 18, 48, 0.06) 0%, transparent 70%);
    animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
}

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

.hero-content {
    animation: fadeInUp 1s ease-out;
    max-width: 800px;
    margin: 0 auto;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-headline {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 16px;
}

.hero-tag {
    padding: 6px 16px;
    background: rgba(212, 168, 67, 0.15);
    border: 1px solid rgba(212, 168, 67, 0.3);
    border-radius: 16px;
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    animation: badgeSlideIn 0.6s ease-out 0.2s both;
    flex-shrink: 0;
}

@keyframes badgeSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero h1 {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #fff 0%, #f5ecd4 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: textGradient 6s linear infinite, fadeInUp 1s ease-out 0.3s both;
    margin: 0;
}

@keyframes textGradient {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hero p {
    font-size: 16px;
    opacity: 0.8;
    max-width: 700px;
    margin: 20px auto 36px;
    line-height: 1.75;
    letter-spacing: 0.3px;
    animation: fadeInUp 1s ease-out 0.5s both;
    color: rgba(255,255,255,0.82);
    order: 2;
    width: 100%;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding-top: 30px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 40px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.hero-stat:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(212, 168, 67, 0.3);
    transform: translateY(-4px);
}

.hero-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 2px 8px rgba(212, 168, 67, 0.3);
}

.hero-stat-label {
    font-size: 16px;
    opacity: 0.95;
    letter-spacing: 2px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* ==================== */
/* Section              */
/* ==================== */
.section {
    padding: 60px 0;
}

.section-alt {
    background: linear-gradient(180deg, var(--bg) 0%, rgba(248,246,241,0.5) 100%);
}

.section-title {
    font-size: 28px;
    margin-bottom: 36px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
    position: relative;
}

.section-title-icon {
    font-size: 24px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.section-more {
    text-align: center;
    margin-top: 24px;
}

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.more-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateX(4px);
}

.page-title {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text);
    padding-left: 16px;
    border-left: 4px solid var(--primary);
}

.page-subtitle {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 28px;
    padding-left: 16px;
}

/* ==================== */
/* Work Grid            */
/* ==================== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.work-card {
    background: linear-gradient(145deg, #ffffff, #f8f6f3);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.06),
        0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.6);
    position: relative;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c41230, #d4a843);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover {
    transform: translateY(-16px) scale(1.01);
    box-shadow: 
        0 24px 60px rgba(196, 18, 48, 0.12),
        0 12px 24px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.04);
}

.work-card:hover::before {
    opacity: 1;
}

.work-cover {
    height: 180px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f5 100%);
}

.work-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(0deg, rgba(255,255,255,0.95) 0%, transparent 100%);
}

.work-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-card:hover .work-cover img {
    transform: scale(1.12);
}

.work-cover-placeholder {
    font-size: 64px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.work-card:hover .work-cover-placeholder {
    transform: scale(1.2) rotate(8deg);
    filter: drop-shadow(0 12px 32px rgba(0,0,0,0.2));
}

.work-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(196, 18, 48, 0.35) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work-card:hover .work-cover-overlay {
    opacity: 1;
}

.work-view-btn {
    padding: 12px 28px;
    background: rgba(255,255,255,0.98);
    color: #c41230;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    transform: translateY(25px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.work-card:hover .work-view-btn {
    transform: translateY(0);
}

.work-view-btn:hover {
    background: #fff;
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.work-info {
    padding: 20px 24px 24px;
}

.work-info h3 {
    font-size: 18px;
    margin-bottom: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    position: relative;
}

.work-info h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c41230, #d4a843);
    transition: width 0.3s ease;
}

.work-card:hover .work-info h3 {
    color: #c41230;
}

.work-card:hover .work-info h3::after {
    width: 40px;
}

.work-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.work-type, .work-author {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 5px 14px;
    background: linear-gradient(135deg, #f5f3f0 0%, #eef0f3 100%);
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.work-card:hover .work-type,
.work-card:hover .work-author {
    background: linear-gradient(135deg, #fff0f0 0%, #ffeef0 100%);
    color: #c41230;
    border-color: rgba(196, 18, 48, 0.15);
}

.work-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px dashed #e8e6e3;
}

.work-char-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #c41230;
    font-weight: 600;
}

.work-char-count .icon {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.work-card:hover .work-char-count .icon {
    opacity: 0.9;
}

/* ==================== */
/* Work List            */
/* ==================== */
.work-list {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.work-list-item {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    transition: var(--transition);
}

.work-list-item:last-child {
    border-bottom: none;
}

.work-list-item:hover {
    background: var(--bg);
    padding-left: 28px;
}

.work-list-item:hover .work-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

.work-type-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 500;
}

.work-title {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
}

.work-arrow {
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
}

.work-date {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* ==================== */
/* Filter Bar           */
/* ==================== */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-item {
    padding: 10px 24px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    border-radius: 28px;
    color: var(--text-light);
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.filter-item:hover {
    border-color: rgba(196, 18, 48, 0.2);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(196, 18, 48, 0.08);
}

.filter-item.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-color: transparent;
    box-shadow: 
        0 6px 20px rgba(196, 18, 48, 0.3),
        0 2px 8px rgba(196, 18, 48, 0.15);
}

/* ==================== */
/* Pagination           */
/* ==================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    position: relative;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 14px;
    position: absolute;
    left: 0;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 20px;
}

.page-item {
    padding: 8px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
}

.page-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.page-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg);
}

/* ==================== */
/* Work Detail          */
/* ==================== */
.work-detail-header {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.work-detail-cover {
    flex-shrink: 0;
    width: 283px;
}

.work-detail-cover .work-cover-placeholder {
    width: 283px;
    height: 180px;
    font-size: 64px;
    background: linear-gradient(135deg, #f5f0eb 0%, #e8e0d5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.work-detail-cover img {
    width: 283px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.work-detail-info h1 {
    font-size: 32px;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--text);
}

.work-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.work-meta span {
    color: var(--text-light);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.work-difficulty {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.difficulty-score {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(238, 90, 90, 0.3);
}

.work-description {
    color: var(--text-light);
    margin-bottom: 28px;
    line-height: 1.9;
    font-size: 15px;
}

/* ==================== */
/* Buttons              */
/* ==================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(196, 18, 48, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 18, 48, 0.35);
    color: #fff;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-back {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-back:hover {
    background: var(--border);
}

/* ==================== */
/* Character Grid       */
/* ==================== */
.character-group {
    margin-bottom: 40px;
}

.character-group h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text);
    font-weight: 600;
    padding-left: 16px;
    border-left: 3px solid var(--accent);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 24px;
}

.character-card {
    text-align: center;
    padding: 28px 20px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.5);
    position: relative;
    overflow: hidden;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    opacity: 0;
    transition: var(--transition);
}

.character-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 8px 28px rgba(196, 18, 48, 0.08),
        0 2px 12px rgba(0,0,0,0.06);
    border-color: rgba(196, 18, 48, 0.15);
}

.character-card:hover::before {
    opacity: 1;
}

.character-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    position: relative;
}

.character-avatar::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.character-card:hover .character-avatar::after {
    opacity: 0.2;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.character-card:hover .character-avatar img {
    transform: scale(1.08);
    border-color: rgba(196, 18, 48, 0.3);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255,255,255,0.3) inset;
    transition: var(--transition);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.avatar-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 50% 50% 0 0;
}

.character-card:hover .avatar-placeholder {
    transform: scale(1.08);
    border-color: rgba(196, 18, 48, 0.3);
}

.avatar-placeholder.male {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.avatar-placeholder.female {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.avatar-placeholder.small {
    width: 44px;
    height: 44px;
    font-size: 15px;
    border-width: 2px;
}

.avatar-placeholder.large {
    width: 150px;
    height: 150px;
    font-size: 60px;
    border-width: 4px;
}

.character-name {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 16px;
    color: var(--text);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.character-card:hover .character-name {
    color: var(--primary);
}

.character-alias {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.character-card:hover .character-alias {
    color: var(--accent);
}

/* ==================== */
/* Character Detail     */
/* ==================== */
.character-detail-header {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
}

.character-detail-avatar {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-detail-avatar img,
.character-detail-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.character-detail-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.character-detail-info h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
}

.character-detail-info .character-alias {
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 12px;
}

.character-meta {
    display: flex;
    gap: 24px;
    margin: 20px 0;
    color: var(--text-light);
    flex-wrap: wrap;
}

.character-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.complexity-score {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.complexity-value {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.character-description {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 15px;
}

.character-tags {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.character-tags .tags-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.tag-category {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 2px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-light);
    transition: var(--transition);
}

.tag-item[data-polarity="positive"] {
    background: #e8f5e9;
    color: #2e7d32;
}

.tag-item[data-polarity="negative"] {
    background: #ffebee;
    color: #c62828;
}

.tag-item[data-polarity="neutral"] {
    background: #e3f2fd;
    color: #1565c0;
}

.tag-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ==================== */
/* Character Appearance */
/* ==================== */
.character-appearance {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.appearance-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
}

.appearance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
}

.appearance-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f5 100%);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

.appearance-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appearance-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.appearance-description {
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
    border-radius: 12px;
    border-left: 4px solid #c41230;
}

.appearance-description p {
    margin: 0;
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
}

/* ==================== */
/* Relation List        */
/* ==================== */
.relation-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 24px;
}

.relation-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.relation-item:last-child {
    border-bottom: none;
}

.relation-item:hover {
    background: var(--bg);
}

.relation-target {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 140px;
}

.relation-target-name {
    font-weight: 600;
    font-size: 15px;
}

.relation-type-badge {
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.relation-desc {
    color: var(--text-muted);
    font-size: 14px;
    flex: 1;
}

.relation-graph-container {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    padding-bottom: 80px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 32px;
    position: relative;
}

.relation-categories {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.relation-category {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.relation-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.relation-category-icon {
    font-size: 20px;
}

.relation-category-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.relation-category-count {
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.relation-category-border {
    height: 3px;
    border-radius: 2px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--category-color), transparent);
}

.relation-chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 1200px) {
    .relation-chips {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .relation-chips {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .relation-chips {
        grid-template-columns: 1fr;
    }
}

.relation-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    border: 1px solid transparent;
    height: 60px;
    box-sizing: border-box;
    position: relative;
}

.relation-chip:hover {
    background: rgba(196, 18, 48, 0.05);
    border-color: rgba(196, 18, 48, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.relation-chip:hover .relation-chip-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.relation-chip-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}

.relation-chip-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.relation-chip-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.relation-chip-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

.relation-chip-type {
    color: #fff;
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    flex-shrink: 0;
}

.relation-chip-desc {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.relation-chip-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #333;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    white-space: normal;
    max-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.relation-chip-tooltip.top-clipped {
    bottom: auto;
    top: calc(100% + 12px);
}

.relation-chip-tooltip.top-clipped::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #333;
}

.relation-chip-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

/* ==================== */
/* Graph Page           */
/* ==================== */
.graph-section {
    padding-top: 20px;
}

.graph-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.graph-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.graph-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.graph-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

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

.graph-filter-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-white);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    font-weight: 500;
}

.graph-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.graph-filter-btn.active {
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    background-color: var(--btn-active-color, #c41e3a);
}

.graph-search input {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    outline: none;
    width: 200px;
    font-size: 14px;
    transition: var(--transition);
}

.graph-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

.graph-container {
    width: 100%;
    min-height: calc(100vh - 280px);
    height: auto;
    min-height: 500px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: auto;
    position: relative;
}

.graph-wrapper {
    position: relative;
}

/* Export Button */
.graph-export {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #c41230, #a01028);
    color: #fff;
    border-radius: 24px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(196, 18, 48, 0.3);
    white-space: nowrap;
    z-index: 9999 !important;
}

.graph-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(196, 18, 48, 0.4);
}

.graph-export svg {
    flex-shrink: 0;
}

/* Export Modal */
.export-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.export-modal-content {
    background: #fff;
    border-radius: 20px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.export-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #f0ece6;
    background: linear-gradient(180deg, #faf9f6 0%, #fff 100%);
    border-radius: 20px 20px 0 0;
}

.export-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}

.export-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f0ece6;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.export-close:hover {
    background: #e8e4de;
    color: var(--text);
    transform: rotate(90deg);
}

.export-modal-body {
    padding: 20px 24px 24px;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 2px solid #f0ece6;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 14px;
    background: #fff;
}

.export-option:hover {
    border-color: var(--primary);
    background: rgba(196, 18, 48, 0.03);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 18, 48, 0.08);
}

.export-option.active {
    border-color: var(--primary);
    background: rgba(196, 18, 48, 0.05);
}

.export-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.export-option[data-format="png"] .export-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.export-option[data-format="jpg"] .export-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
}

.export-info {
    flex: 1;
}

.export-info strong {
    display: block;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 4px;
    font-weight: 600;
}

.export-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.export-size {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8f6f1 0%, #f0ece6 100%);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
}

.export-size label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 600;
}

.export-size select {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background: #fff;
    min-width: 140px;
    transition: var(--transition);
    font-weight: 500;
}

.export-size select:hover {
    border-color: var(--primary);
}

.export-size select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.08);
}

/* ==================== */
/* Admin Page Styles    */
/* ==================== */
.admin-content {
    flex: 1;
    padding: 36px;
    background: var(--bg);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.admin-form {
    max-width: 850px;
    margin: 0 auto;
}

.form-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 28px;
    margin-bottom: 24px;
}

.card-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--primary-light);
}

.section-icon {
    font-size: 22px;
}

.card-section-title h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-form .form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.required-mark {
    color: var(--primary);
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--bg-gray);
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(196, 18, 48, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.status-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.status-active {
    background-color: #28a745;
    color: #fff;
}

.status-disabled {
    background-color: #dc3545;
    color: #fff;
}

.success-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #28a745;
    font-size: 14px;
    margin-bottom: 20px;
}

.copyright-notice {
    margin-top: 30px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08) 0%, rgba(220, 53, 69, 0.12) 100%);
    border: 2px solid rgba(220, 53, 69, 0.3);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 12px;
}

.copyright-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.copyright-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
}

.copyright-label {
    font-weight: 700;
    color: #dc3545;
}

.copyright-content {
    font-weight: 500;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 16px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.radio-option:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.radio-option input[type="radio"]:checked + .radio-check {
    background: var(--primary);
    border-color: var(--primary);
}

.radio-option input[type="radio"]:checked + .radio-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.radio-text {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(196, 18, 48, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 20px;
}

.admin-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.admin-form .form-group input,
.admin-form .form-group select,
.admin-form .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.admin-form .form-group input:focus,
.admin-form .form-group select:focus,
.admin-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

.admin-form .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.admin-form .radio-group,
.admin-form .form-radio-group {
    display: flex;
    gap: 24px;
}

.admin-form .radio-group label,
.admin-form .form-radio-group .form-radio {
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-form .radio-group input[type="radio"],
.admin-form .form-radio-group input[type="radio"] {
    width: auto;
    margin-right: 6px;
}

.form-image-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-image-preview img {
    max-width: 200px;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.form-file {
    display: block;
    margin-top: 8px;
    padding: 10px 16px;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.form-file:hover {
    border-color: var(--primary);
}

.form-file:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

.tags-selector {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.tag-category-group {
    margin-bottom: 16px;
}

.tag-category-group:last-child {
    margin-bottom: 0;
}

.tag-category-group h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-light);
}

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

.tag-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.tag-checkbox:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.tag-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.tag-checkbox input[type="checkbox"]:checked + span {
    color: var(--primary);
    font-weight: 600;
}

.tag-checkbox input[type="checkbox"]:checked {
    accent-color: var(--primary);
}

.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 400;
}

.admin-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding-top: 20px;
}

.admin-form input[type="color"] {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: transparent;
}

.admin-form input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.admin-form input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: var(--radius-sm);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.admin-table {
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
}

.admin-table tr:hover {
    background: var(--bg);
}

.table-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.table-action.edit {
    background: var(--bg);
    color: var(--primary);
}

.table-action.edit:hover {
    background: var(--primary-light);
}

.table-action.delete {
    background: #fef2f2;
    color: #dc2626;
}

.table-action.delete:hover {
    background: #fee2e2;
}

.admin-filter {
    margin-bottom: 20px;
}

.admin-filter select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-white);
    cursor: pointer;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form input {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-white);
    box-sizing: border-box;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.search-form .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    position: relative;
}

.pagination-container .pagination-info {
    color: var(--text-muted);
    font-size: 14px;
    position: absolute;
    left: 0;
}

.pagination-container .pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 20px;
}

.pagination-container .page-item {
    padding: 8px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
}

.pagination-container .page-item:hover {
    background: var(--bg-light);
}

.pagination-container .page-item.active {
    background: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
}

.pagination-container .page-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.admin-section {
    margin-top: 32px;
}

.admin-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.quick-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
    color: var(--primary);
}

.quick-action-btn .icon {
    font-size: 20px;
}

.gender-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.gender-badge.male {
    background: #dbeafe;
    color: #1d4ed8;
}

.gender-badge.female {
    background: #fee2e2;
    color: #dc2626;
}

.importance-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.importance-badge.level-1 {
    background: #f3f4f6;
    color: #6b7280;
}

.importance-badge.level-2 {
    background: #dbeafe;
    color: #1d4ed8;
}

.importance-badge.level-3 {
    background: #fef3c7;
    color: #d97706;
}

.relation-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.relation-category {
    margin-bottom: 32px;
}

.relation-category h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

.relation-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.relation-type-card {
    background: var(--bg-white);
    padding: 16px;
    border-radius: var(--radius);
    border-left: 4px solid var(--border);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.relation-type-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.relation-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.relation-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}

.relation-type-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.relation-type-select {
    max-height: 400px;
    overflow-y: auto;
}

.select-category {
    margin-bottom: 20px;
}

.select-category h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid var(--border);
}

.select-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.relation-option {
    cursor: pointer;
}

.relation-option .option-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.relation-option .option-label:hover {
    border-width: 2px;
}

.relation-option .option-label.selected {
    background: rgba(196, 18, 48, 0.1);
    border-width: 2px;
}

.option-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ==================== */
/* Login Page           */
/* ==================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-container {
    background: var(--bg-white);
    padding: 48px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 24px;
    color: var(--text);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

/* ==================== */
/* Admin Layout         */
/* ==================== */
.admin-body {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
}

.admin-sidebar h2 {
    padding: 0 24px;
    margin-bottom: 32px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.admin-sidebar .nav-item {
    display: block;
    padding: 14px 24px;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--accent);
}

.admin-sidebar .nav-item.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: var(--primary);
}

.admin-sidebar .nav-item.logout {
    color: #e74c3c;
    margin-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-left: none;
}

.admin-content {
    flex: 1;
    padding: 36px;
    background: var(--bg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.stat-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== */
/* Dashboard Grid       */
/* ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.dashboard-panel {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-light);
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.panel-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}

.panel-link:hover {
    text-decoration: underline;
}

/* ==================== */
/* Type Distribution    */
/* ==================== */
.type-distribution {
    padding: 20px 24px;
}

.type-item {
    margin-bottom: 12px;
}

.type-item:last-child {
    margin-bottom: 0;
}

.type-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.type-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.type-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.type-name {
    color: var(--text);
}

.type-count {
    color: var(--text-muted);
    font-weight: 500;
}

/* ==================== */
/* Recent List          */
/* ==================== */
.recent-list {
    padding: 16px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.recent-item:hover {
    background: var(--bg-light);
}

.recent-cover,
.recent-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.recent-cover img,
.recent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder,
.avatar-placeholder-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    font-size: 20px;
}

.avatar-placeholder-small {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

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

.recent-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.recent-info h4 a {
    color: var(--text);
    text-decoration: none;
}

.recent-info h4 a:hover {
    color: var(--primary);
}

.recent-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.recent-date {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ==================== */
/* Quick Actions        */
/* ==================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 20px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

.quick-action-btn .icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.quick-action-btn span:last-child {
    font-size: 13px;
    font-weight: 500;
}

/* ==================== */
/* Alert                */
/* ==================== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ==================== */
/* Statistics Page      */
/* ==================== */
.admin-header .header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-header h1 {
    margin: 0;
    font-size: 28px;
}

.header-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 28px;
    max-width: 600px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stat-card.primary {
    border-left: 4px solid #c41230;
}

.stat-card.success {
    border-left: 4px solid #10b981;
}

.stat-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 6px 0;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    color: var(--text);
}

.stats-panel {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 28px;
}

.stats-panel .panel-header {
    background: linear-gradient(135deg, #faf9f6 0%, #fff 100%);
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.stats-panel .panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.chart-container {
    padding: 24px;
}

.data-management {
    margin-bottom: 28px;
}

.management-content {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.management-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.management-section h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.query-form,
.delete-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    height: 18px;
    display: flex;
    align-items: center;
}

.form-input {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-white);
    min-width: 140px;
    box-sizing: border-box;
    height: 44px;
    line-height: 20px;
    margin: 0;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
}

.btn {
    padding: 0 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    box-sizing: border-box;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #c41230 0%, #991b1b 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
}

.ranks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rank-panel {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.rank-panel .panel-header {
    background: linear-gradient(135deg, #faf9f6 0%, #fff 100%);
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.rank-panel .panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.rank-list {
    padding: 12px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.rank-item:hover {
    background: var(--bg-light);
}

.rank-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    background: var(--bg-light);
    color: var(--text-muted);
    flex-shrink: 0;
}

.rank-num.top1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: white;
}

.rank-num.top2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
    color: white;
}

.rank-num.top3 {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
    color: white;
}

.rank-thumb,
.rank-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-light);
}

.rank-thumb img,
.rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-placeholder,
.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.rank-content {
    flex: 1;
    min-width: 0;
}

.rank-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-work {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: var(--text-muted);
}

.rank-views {
    margin: 0;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 1200px) {
    .ranks-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .management-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.filter-icon {
    font-size: 16px;
}

.filter-input {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-gray);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(196, 18, 48, 0.1);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(196, 18, 48, 0.25);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 18, 48, 0.35);
}



.statistics-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.statistics-panel {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.statistics-panel.chart-panel {
    grid-column: span 2;
}

.statistics-panel .panel-header {
    background: linear-gradient(135deg, #faf9f6 0%, #fff 100%);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-icon {
    font-size: 20px;
}

.panel-title-group h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.chart-container {
    padding: 24px;
    height: 300px;
}

.rank-panel .rank-list {
    padding: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.rank-item:hover {
    background: var(--bg-light);
}

.rank-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.rank-number.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.rank-number.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.3);
}

.rank-number.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3);
}

.rank-cover,
.rank-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rank-cover img,
.rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-cover-placeholder,
.rank-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f3f0 0%, #e8e0d5 100%);
    font-size: 20px;
}

.rank-avatar-placeholder {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.rank-content {
    flex: 1;
    min-width: 0;
}

.rank-content h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.meta-icon {
    font-size: 14px;
}

/* 数据管理面板 */
.delete-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin: 16px 0 0 0;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.delete-btn {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
}

@media (max-width: 1200px) {
    .statistics-panel.chart-panel {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .statistics-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== */
/* Score Management     */
/* ==================== */
.score-section {
    margin-bottom: 36px;
}

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

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.rule-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px;
    box-shadow: var(--shadow);
}

.rule-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.rule-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px 0;
}

.rule-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.rule-dimensions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dimension-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.dim-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.dim-weight {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    padding: 2px 8px;
    background: rgba(196, 18, 48, 0.1);
    border-radius: 4px;
}

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

.rule-range {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.score-table-wrapper {
    overflow-x: auto;
}

.score-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 140px;
}

.score-bar-container {
    flex: 1;
    height: 20px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    background: linear-gradient(90deg, #c41230 0%, #ff6b6b 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.score-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    min-width: 40px;
    text-align: right;
}

.rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    background: var(--bg-light);
}

.rank.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.work-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.work-cover-small {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}

.cover-placeholder-small {
    width: 40px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 16px;
}

.work-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.character-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.work-character-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow);
}

.work-character-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.character-score-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.character-score-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.character-score-item:hover {
    background: rgba(196, 18, 48, 0.06);
}

.char-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
}

.char-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.char-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

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

.char-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.score-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

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

@media (max-width: 768px) {
    .rule-grid {
        grid-template-columns: 1fr;
    }
    
    .character-scores-grid {
        grid-template-columns: 1fr;
    }
    
    .dimension-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* ==================== */
/* Breadcrumb           */
/* ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-light);
}

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

.breadcrumb .separator {
    color: var(--border);
}

/* ==================== */
/* Tags                 */
/* ==================== */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tag-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.tag-accent {
    background: var(--accent-light);
    color: #b8922e;
}

.tag-danger {
    background: #fef2f2;
    color: #dc2626;
}

/* ==================== */
/* Section Divider      */
/* ==================== */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 40px 0;
}

.section-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: -24px;
    margin-bottom: 28px;
}

/* ==================== */
/* Character Group      */
/* ==================== */
.character-group h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text);
    font-weight: 600;
    padding-left: 16px;
    border-left: 3px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-icon {
    font-size: 16px;
}

/* ==================== */
/* Float Buttons        */
/* ==================== */
.float-buttons {
    position: fixed;
    right: 30px;
    bottom: 200px;
    z-index: 9999;
    width: 50px;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    text-align: center;
    line-height: 50px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: block;
    margin-bottom: 12px;
    opacity: 0;
    visibility: hidden;
    text-decoration: none;
}

.float-btn.show {
    opacity: 1;
    visibility: visible;
}

.float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.feedback-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.top-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.float-icon {
    font-size: 18px;
    font-weight: bold;
    line-height: 50px;
}

/* ==================== */
/* Feedback Modal       */
/* ==================== */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.feedback-modal.show {
    display: flex;
}

.feedback-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
}

.feedback-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.feedback-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.feedback-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    text-decoration: none;
}

.feedback-modal-close:hover {
    background: #f5f5f5;
    color: #666;
}

.feedback-modal-body {
    padding: 24px;
}

.feedback-modal-body p {
    margin: 0 0 16px;
    color: #666;
}

.feedback-modal-body textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
}

.feedback-modal-body textarea:focus {
    outline: none;
    border-color: #c41230;
    box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

.feedback-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* ==================== */
/* Feedback Toast       */
/* ==================== */
.feedback-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.feedback-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.feedback-toast.success {
    background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%);
}

.feedback-toast.error {
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
}

/* ==================== */
/* Footer               */
/* ==================== */
.footer {
    background: linear-gradient(180deg, #0d0d1a 0%, #0a0a12 50%, #06060a 100%);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 72px 0 32px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 18, 48, 0.3), rgba(212, 168, 67, 0.3), transparent);
}

.footer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(196, 18, 48, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 168, 67, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(44, 95, 124, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.footer-brand {
    grid-column: span 1;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #fff 0%, #f5ecd4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.footer-desc {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    line-height: 1.9;
    margin-top: 20px;
    max-width: 280px;
}

.footer-links-group {
    margin-bottom: 28px;
}

.footer-links-group h4 {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    letter-spacing: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: inline-block;
    text-transform: uppercase;
}

.footer-links-group a {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin-bottom: 12px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links-group a:hover {
    color: var(--accent);
    transform: translateX(8px);
}

.footer-links-group a::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
    transform: scale(0);
}

.footer-links-group a:hover::before {
    opacity: 1;
    transform: scale(1);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.footer-contact-icon {
    width: 36px;
    height: 36px;
    background: rgba(196, 18, 48, 0.1);
    border: 1px solid rgba(196, 18, 48, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 15px;
    flex-shrink: 0;
    transition: var(--transition);
}

.footer-contact-item:hover .footer-contact-icon {
    background: rgba(196, 18, 48, 0.2);
    border-color: rgba(196, 18, 48, 0.4);
    transform: scale(1.1);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: rgba(255,255,255,0.35);
    font-size: 13px;
}

.footer-friend-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.friend-links-label {
    color: rgba(255,255,255,0.35);
    font-size: 13px;
}

.footer-friend-links a {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    transition: var(--transition);
}

.footer-friend-links a:hover {
    color: var(--accent);
}

.friend-links-divider {
    color: rgba(255,255,255,0.2);
    margin: 0 4px;
}

/* ==================== */
/* Empty State          */
/* ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
}

/* ==================== */
/* Sitemap Admin        */
/* ==================== */
.sitemap-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.info-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.info-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

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

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

.info-value {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.status-success {
    color: #10b981;
}

.status-error {
    color: #ef4444;
}

.seo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.seo-list li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    padding-left: 20px;
    position: relative;
}

.seo-list li:last-child {
    border-bottom: none;
}

.seo-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.sitemap-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.sitemap-actions .btn-lg {
    padding: 12px 28px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sitemap-preview {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.sitemap-preview h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.url-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.url-group {
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.url-group strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
}

.url-group span {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 0;
    font-family: monospace;
}

/* ==================== */
/* Legal Page           */
/* ==================== */
.legal-page {
    padding: 60px 0 100px;
    min-height: 60vh;
}

.legal-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.legal-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

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

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content p {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 16px;
}

.legal-content ul {
    margin: 16px 0 24px 20px;
    padding-left: 0;
    list-style: none;
}

.legal-content ul li {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-light);
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
}

.legal-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.legal-footer-note {
    margin-top: 40px;
    padding: 24px;
    background: rgba(196, 18, 48, 0.04);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.color-preview {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fef3c7;
    color: #92400e;
}

.legal-footer-note p {
    margin-bottom: 0;
    color: var(--text-light);
}

.legal-footer-note strong {
    color: var(--primary);
}

/* ==================== */
/* Related Works        */
/* ==================== */
.related-works {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-icon {
    font-size: 22px;
}

.related-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.related-work-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.related-work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.related-work-cover {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg);
    position: relative;
}

.related-work-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.related-work-card:hover .related-work-cover img {
    transform: scale(1.08);
}

.work-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
}

.related-work-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-work-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-work-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.related-work-count {
    font-size: 12px;
    color: var(--primary);
    margin-top: auto;
}

/* ==================== */
/* Topics               */
/* ==================== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.topic-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.topic-icon {
    font-size: 36px;
    flex-shrink: 0;
}

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

.topic-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.topic-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.topic-arrow {
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.topic-card:hover .topic-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

.title-section {
    margin-bottom: 40px;
}

.title-header {
    margin-bottom: 20px;
}

.title-name {
    font-size: 20px;
    font-weight: bold;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

.title-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    font-weight: bold;
}

.title-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
    margin-bottom: 0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-grid label:hover {
    background: var(--bg-white);
    border: 1px solid var(--border);
}

.checkbox-grid input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.color-dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--border);
}

.works-manager {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.manager-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(196, 18, 48, 0.05) 100%);
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-count {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.card-body {
    padding: 20px;
}

.selected-card .card-body {
    background: rgba(196, 18, 48, 0.02);
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 60px;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #a8152d 100%);
    color: #fff;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(196, 18, 48, 0.3);
    transition: all 0.3s ease;
}

.selected-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 18, 48, 0.4);
}

.tag-icon {
    font-size: 16px;
}

.tag-remove {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-remove:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-gray);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(196, 18, 48, 0.1);
}

.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 15px;
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
}

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

.works-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 8px;
}

.works-list::-webkit-scrollbar {
    width: 6px;
}

.works-list::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: 3px;
}

.works-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.works-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.work-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.work-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(4px);
}

.work-checkbox-wrapper {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.work-checkbox {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.check-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    color: transparent;
    transition: all 0.2s ease;
}

.work-checkbox:checked + .check-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.work-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.work-add {
    padding: 4px 10px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 15px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.work-item:hover .work-add {
    opacity: 1;
    transform: translateX(0);
}

.btn-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state p {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}

.empty-hint {
    margin-top: 8px !important;
    font-size: 13px !important;
    color: var(--text-muted) !important;
}

.header-info {
    flex: 1;
}

.header-desc {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* ==================== */
/* Responsive           */
/* ==================== */
@media (max-width: 768px) {
    .work-detail-header,
    .character-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px;
    }

    .work-detail-cover {
        width: 283px;
    }

    .work-detail-cover .work-cover-placeholder {
        width: 283px;
        height: 180px;
    }

    .work-meta, .character-meta {
        justify-content: center;
    }

    .hero {
        padding: 60px 0 0;
    }

    .hero h1 {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-stat-value {
        font-size: 28px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 4px 14px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-links-group {
        margin-bottom: 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .search-box input {
        width: 140px;
    }

    .search-box input:focus {
        width: 180px;
    }

    .graph-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 16px;
    }

    .section {
        padding: 32px 0;
    }

    .section-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .nav {
        height: 56px;
    }

    .logo {
        font-size: 17px;
    }

    .nav-links {
        gap: 12px;
        font-size: 14px;
    }

    .work-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .work-cover {
        height: 220px;
    }
}
