/**
 * LARP UCP — 动漫卡通全局主题（保留橙白色系）
 */
@import url('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

.theme-anime,
body.theme-anime {
    --font-display: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
    --font-sans: 'Noto Sans SC', system-ui, sans-serif;
    --anime-radius: 18px;
    --anime-radius-sm: 12px;
    --anime-border: 2.5px solid rgba(249, 115, 22, 0.35);
    --anime-shadow: 0 8px 0 rgba(194, 65, 12, 0.12), 0 12px 28px rgba(249, 115, 22, 0.18);
    --anime-shadow-hover: 0 10px 0 rgba(194, 65, 12, 0.14), 0 16px 36px rgba(234, 88, 12, 0.28);
}

body.theme-anime {
    font-family: var(--font-sans);
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(251, 146, 60, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 100%, rgba(249, 115, 22, 0.1), transparent 50%),
        var(--bg-secondary);
    color: var(--text-primary);
}

body.theme-anime::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255, 237, 213, 0.8) 0 3px, transparent 3px),
        radial-gradient(circle at 85% 15%, rgba(254, 215, 170, 0.6) 0 2px, transparent 2px),
        radial-gradient(circle at 70% 80%, rgba(255, 247, 237, 0.7) 0 4px, transparent 4px);
    background-size: 120px 120px, 90px 90px, 140px 140px;
}

body.theme-anime .app-shell {
    position: relative;
    z-index: 1;
}

/* —— 侧栏 —— */
.theme-anime .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    border-right: var(--anime-border);
    box-shadow: 8px 0 24px rgba(249, 115, 22, 0.1);
    border-radius: 0 24px 24px 0;
}

.theme-anime .sidebar-header {
    border-bottom: 2px dashed rgba(249, 115, 22, 0.25);
    padding-bottom: 18px;
}

.theme-anime .sidebar-logo {
    border: var(--anime-border);
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    box-shadow: var(--anime-shadow);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-anime .sidebar-logo:hover {
    transform: scale(1.06) rotate(-3deg);
}

.theme-anime .sidebar-brand-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--primary-700);
    letter-spacing: 0.04em;
}

.theme-anime .sidebar-brand-title-accent {
    background: linear-gradient(135deg, #ea580c, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.theme-anime .nav-section-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--primary-600);
    letter-spacing: 0.06em;
}

.theme-anime .nav-item,
.theme-anime .nav-group-toggle {
    border-radius: var(--anime-radius-sm);
    border: 2px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-anime .nav-item:hover,
.theme-anime .nav-group-toggle:hover {
    background: #fff7ed;
    border-color: rgba(249, 115, 22, 0.25);
    transform: translateX(4px);
}

.theme-anime .nav-item.active {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(251, 146, 60, 0.1));
    border-color: rgba(234, 88, 12, 0.4);
    color: var(--primary-800);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.theme-anime .nav-item--spot {
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.9), rgba(254, 215, 170, 0.5));
    border: 2px dashed rgba(249, 115, 22, 0.35);
}

/* 侧栏在线人数 */
.theme-anime .sidebar-online-widget {
    margin: 12px 14px 8px;
    padding: 14px;
    border-radius: var(--anime-radius);
    background: linear-gradient(145deg, #fff7ed, #ffffff);
    border: var(--anime-border);
    box-shadow: var(--anime-shadow);
}

.theme-anime .sidebar-online-widget .online-widget-head {
    margin-bottom: 8px;
}

.theme-anime .sidebar-online-widget .online-widget-title {
    font-size: 0.78rem;
}

.theme-anime .sidebar-online-widget .online-widget-count {
    font-size: 1.5rem;
}

.theme-anime .sidebar-footer {
    font-family: var(--font-display);
    color: var(--primary-600);
    opacity: 0.85;
}

/* —— 顶栏与内容 —— */
.theme-anime .topbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: var(--anime-border);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.08);
}

.theme-anime .topbar-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--primary-800);
}

.theme-anime .page-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary-800);
    letter-spacing: 0.02em;
}

.theme-anime .card {
    border: var(--anime-border);
    border-radius: var(--anime-radius);
    box-shadow: var(--anime-shadow);
    background: linear-gradient(160deg, #ffffff 0%, #fffaf5 100%);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.theme-anime .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--anime-shadow-hover);
}

.theme-anime .card::before {
    height: 5px;
    border-radius: var(--anime-radius) var(--anime-radius) 0 0;
}

.theme-anime .btn-primary {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 0 rgba(194, 65, 12, 0.35), 0 8px 20px rgba(249, 115, 22, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-anime .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 rgba(194, 65, 12, 0.4), 0 12px 28px rgba(234, 88, 12, 0.4);
}

.theme-anime .btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(194, 65, 12, 0.35);
}

.theme-anime .form-input,
.theme-anime .form-textarea,
.theme-anime select.form-input {
    border: 2px solid rgba(249, 115, 22, 0.25);
    border-radius: var(--anime-radius-sm);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.theme-anime .form-input:focus,
.theme-anime .form-textarea:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.theme-anime .badge {
    border-radius: 999px;
    font-weight: 700;
    border: 2px solid currentColor;
    padding: 4px 10px;
}

.theme-anime .alert {
    border-radius: var(--anime-radius-sm);
    border-width: 2px;
}

.theme-anime .ucp-announce-strip {
    border-radius: 0 0 16px 16px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.25);
}

.theme-anime .footer {
    font-family: var(--font-display);
    color: var(--primary-700);
}

.theme-anime .topbar-avatar,
.theme-anime .topbar-avatar--placeholder {
    border: 2px solid var(--primary-400);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

/* 在线人数组件（全站复用） */
.online-widget {
    position: relative;
}

.online-widget-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.online-widget-icon {
    font-size: 1rem;
    color: var(--primary-500);
    animation: anime-sparkle 2s ease-in-out infinite;
}

@keyframes anime-sparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.7; transform: scale(1.15) rotate(12deg); }
}

.online-widget-title {
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--primary-800, #7c2d12);
    flex: 1;
}

.online-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 2px solid;
}

.online-status-pill.is-online {
    background: rgba(47, 125, 62, 0.12);
    border-color: #2f7d3e;
    color: #1d5c2a;
}

.online-status-pill.is-offline {
    background: rgba(161, 45, 45, 0.1);
    border-color: #a12d2d;
    color: #7a2222;
}

.online-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: online-pulse 1.5s ease-in-out infinite;
}

.online-status-pill.is-offline .online-status-dot {
    animation: none;
    opacity: 0.6;
}

@keyframes online-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.75; }
}

.online-widget-count {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 10px;
    line-height: 1;
}

.online-widget-num {
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
    font-size: 2.4rem;
    color: var(--primary-700, #c2410c);
    text-shadow: 2px 2px 0 rgba(255, 237, 213, 0.9);
}

.online-widget-sep {
    font-size: 1.4rem;
    opacity: 0.4;
    font-weight: 300;
}

.online-widget-max {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary, #7c5a3f);
}

.online-widget-unit {
    font-size: 0.9rem;
    margin-left: 4px;
    color: var(--text-secondary);
    font-weight: 600;
}

.online-widget-bar {
    height: 10px;
    background: rgba(249, 115, 22, 0.12);
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid rgba(249, 115, 22, 0.2);
    margin-bottom: 8px;
}

.online-widget-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #fb923c, #f97316, #ea580c);
    transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 -2px 4px rgba(255, 255, 255, 0.35);
}

.online-widget-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-secondary, #7c5a3f);
    line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
    .online-widget-icon,
    .online-status-dot {
        animation: none;
    }
    .theme-anime .card:hover,
    .theme-anime .nav-item:hover {
        transform: none;
    }
}
