/* ============================================
   元曦源oxo 专属主题样式（v2 优化版）
   主题：锦鲤红线 × 樱花粉 × 泉涧水蓝
   —— 柔化线条 + 扩展全页覆盖 + 立绘元素装饰
   ============================================ */

body.oxo-theme {
    /* 柔化后的配色变量 */
    --oxo-red: #ef5d5d;          /* 暖珊瑚红（柔化的朱红） */
    --oxo-red-soft: #ff8a8a;     /* 淡珊瑚 */
    --oxo-red-deep: #c73838;     /* 深珊瑚（代替深红） */
    --oxo-pink: #ffc4d6;         /* 樱花粉 */
    --oxo-pink-deep: #ef8ca7;    /* 玫粉 */
    --oxo-pink-light: #ffe4ee;   /* 浅樱花 */
    --oxo-cream: #fffaf5;        /* 暖米白 */
    --oxo-blue: #9fd7e5;         /* 泉涧水蓝（更柔和） */
    --oxo-blue-light: #d0eef5;   /* 亮水蓝 */
    --oxo-blue-deep: #4a7c92;    /* 深藏蓝（柔和版） */
    --oxo-gold: #d4b585;         /* 鎏金（提亮） */
}

/* ---- 全页背景：樱花粉 → 水蓝水彩渐变 ---- */
body.oxo-theme {
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 196, 214, 0.55) 0%, transparent 45%),
        radial-gradient(circle at 85% 60%, rgba(159, 215, 229, 0.45) 0%, transparent 50%),
        radial-gradient(circle at 50% 85%, rgba(212, 181, 133, 0.25) 0%, transparent 45%),
        linear-gradient(135deg, #fff9fa 0%, #fef3f5 35%, #f0f9fb 70%, #eef5f8 100%) !important;
    background-attachment: fixed;
}

/* ---- Navbar：暖米白磨砂 + 粉蓝描边 ---- */
body.oxo-theme .navbar {
    background: rgba(255, 248, 250, 0.85) !important;
    border-bottom: 1px solid rgba(255, 196, 214, 0.45);
    box-shadow: 0 2px 15px rgba(239, 93, 93, 0.06);
}

body.oxo-theme .nav-container,
body.oxo-theme .navbar .nav-links a {
    color: var(--oxo-blue-deep) !important;
}

body.oxo-theme .navbar .nav-links a:hover,
body.oxo-theme .navbar .nav-links a.active {
    color: var(--oxo-red) !important;
}

body.oxo-theme .navbar .nav-links a::after {
    background: linear-gradient(90deg, var(--oxo-red), var(--oxo-pink)) !important;
}

body.oxo-theme .navbar .bilibili-btn {
    background: linear-gradient(135deg, var(--oxo-red), var(--oxo-pink-deep)) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(239, 93, 93, 0.3) !important;
}

body.oxo-theme .navbar .bilibili-btn:hover {
    box-shadow: 0 8px 25px rgba(239, 93, 93, 0.5) !important;
}

body.oxo-theme .theme-toggle {
    color: var(--oxo-red) !important;
    background: transparent !important;
}

body.oxo-theme .theme-toggle:hover {
    background: linear-gradient(135deg, var(--oxo-red), var(--oxo-pink-deep)) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(239, 93, 93, 0.4) !important;
}

body.oxo-theme .hamburger span {
    background: var(--oxo-blue-deep);
}

/* ---- Footer：暖米色 + 红线点缀 ---- */
body.oxo-theme footer {
    background: linear-gradient(135deg, rgba(255, 248, 250, 0.9), rgba(240, 249, 251, 0.9)) !important;
    border-top: 1px solid rgba(255, 196, 214, 0.4);
}

body.oxo-theme footer .copyright {
    color: var(--oxo-blue-deep) !important;
}

body.oxo-theme footer p,
body.oxo-theme footer .footer-text {
    color: var(--oxo-blue-deep) !important;
}

body.oxo-theme footer .footer-social {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

body.oxo-theme footer .footer-social a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--oxo-red), var(--oxo-pink-deep)) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 93, 93, 0.3) !important;
}

body.oxo-theme footer .footer-social a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(239, 93, 93, 0.5) !important;
}

body.oxo-theme footer .footer-social svg.icon {
    color: white !important;
    fill: white !important;
}

/* ---- Hero 区：柔和泉水光晕 + 锦鲤剪影 ---- */
body.oxo-theme .profile-hero {
    position: relative;
    background:
        radial-gradient(ellipse at 15% 25%, rgba(208, 238, 245, 0.5) 0, transparent 40%),
        radial-gradient(ellipse at 85% 75%, rgba(255, 196, 214, 0.4) 0, transparent 40%),
        radial-gradient(circle at 55% 45%, rgba(255, 250, 245, 0.6) 0, transparent 60%),
        var(--surface);
    border: 1px solid rgba(255, 196, 214, 0.4);
    box-shadow:
        0 12px 40px rgba(239, 93, 93, 0.1),
        0 6px 20px rgba(159, 215, 229, 0.15);
    overflow: visible;
    transition: box-shadow 0.3s ease;
}

/* 顶部垂落的粉蓝渐变丝线 */
body.oxo-theme .profile-hero > .profile-hero-inner::before,
body.oxo-theme .profile-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    border-radius: 0 0 15px 15px;
    background: linear-gradient(90deg,
        transparent,
        var(--oxo-pink) 25%,
        var(--oxo-red-soft) 50%,
        var(--oxo-blue) 75%,
        transparent);
    opacity: 0.7;
    pointer-events: none;
}

/* 锦鲤剪影装饰（SVG 替代 emoji） */
body.oxo-theme .profile-hero::after {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M10,30 Q30,5 60,20 Q70,25 85,30 Q70,35 60,40 Q30,55 10,30 Z' fill='%23ef5d5d' opacity='0.25'/%3E%3Ccircle cx='80' cy='28' r='3' fill='%234a7c92' opacity='0.6'/%3E%3Cpath d='M85,30 Q92,20 95,30 Q92,40 85,30' fill='%23ef5d5d' opacity='0.3'/%3E%3C/svg%3E");
    position: absolute;
    right: 25px;
    bottom: 15px;
    width: 80px;
    height: 50px;
    opacity: 0.6;
    transform: scaleX(-1) rotate(-10deg);
    pointer-events: none;
}

/* 头像：细线双环 + 过渡 */
body.oxo-theme .profile-avatar {
    box-shadow:
        0 0 0 2px var(--oxo-cream),
        0 0 0 4px rgba(255, 196, 214, 0.7),
        0 12px 40px rgba(239, 93, 93, 0.15);
    transition: box-shadow 0.3s ease;
}

/* 名字：珊瑚红 → 樱花粉 → 鎏金 */
body.oxo-theme .profile-name {
    background: linear-gradient(135deg,
        var(--oxo-red) 0%,
        var(--oxo-pink-deep) 50%,
        var(--oxo-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.oxo-theme .profile-role {
    color: var(--oxo-pink-deep);
    font-weight: 500;
}

/* ---- 按钮：添加过渡 ---- */
body.oxo-theme .profile-links .bilibili-btn {
    background: linear-gradient(135deg, var(--oxo-red), var(--oxo-pink-deep));
    transition: all 0.3s ease;
}

body.oxo-theme .profile-links .bilibili-btn:hover {
    box-shadow: 0 12px 32px rgba(239, 93, 93, 0.35);
    transform: translateY(-2px);
}

body.oxo-theme .profile-links .back-btn {
    background: rgba(255, 196, 214, 0.2);
    color: var(--oxo-red);
    border: 1px solid rgba(239, 93, 93, 0.3);
    transition: all 0.3s ease;
}

body.oxo-theme .profile-links .back-btn:hover {
    background: rgba(255, 196, 214, 0.35);
    transform: translateY(-2px);
}

/* ---- 章节标题 ---- */
body.oxo-theme .section-title {
    background: linear-gradient(135deg, var(--oxo-red), var(--oxo-pink-deep));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 章节之间的水波纹分隔 */
body.oxo-theme .profile-section + .profile-section::before,
body.oxo-theme .profile-section:not(:first-child)::before {
    content: '';
    display: block;
    height: 12px;
    margin-bottom: 30px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0,
        transparent 8px,
        rgba(159, 215, 229, 0.3) 8px,
        rgba(159, 215, 229, 0.3) 10px,
        transparent 10px,
        transparent 20px
    );
    border-radius: 6px;
}

body.oxo-theme .profile-section:first-child::before {
    display: none;
}

/* ---- 基础数据卡片：锦鳞光斑 + 过渡 ---- */
body.oxo-theme .stat-card {
    border: 1px solid rgba(255, 196, 214, 0.35);
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 250, 245, 0.8) 0, transparent 60%),
        var(--surface);
    transition: all 0.3s ease;
}

body.oxo-theme .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 93, 93, 0.15);
}

body.oxo-theme .stat-value {
    color: var(--oxo-red);
}

body.oxo-theme .stat-label {
    color: var(--oxo-pink-deep);
}

/* ---- 具体设定 ---- */
body.oxo-theme .settings-list {
    border: 1px solid rgba(255, 196, 214, 0.35);
    background:
        radial-gradient(circle at 80% 30%, rgba(208, 238, 245, 0.3) 0, transparent 50%),
        var(--surface);
    transition: all 0.3s ease;
}

body.oxo-theme .settings-list:hover {
    box-shadow: 0 8px 25px rgba(239, 93, 93, 0.1);
}

body.oxo-theme .settings-item {
    border-bottom: 1px solid rgba(255, 196, 214, 0.25);
    transition: background 0.3s ease;
}

body.oxo-theme .settings-item:hover {
    background: rgba(255, 196, 214, 0.1);
}

body.oxo-theme .settings-label {
    color: var(--oxo-red);
    font-weight: 500;
}

/* ---- 自我介绍：泉水波纹底 + 过渡 ---- */
body.oxo-theme .intro-card {
    border: 1px solid rgba(159, 215, 229, 0.45);
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 22px,
            rgba(159, 215, 229, 0.08) 22px,
            rgba(159, 215, 229, 0.08) 23px
        ),
        radial-gradient(circle at 10% 90%, rgba(208, 238, 245, 0.35) 0, transparent 50%),
        var(--surface);
    transition: all 0.3s ease;
}

body.oxo-theme .intro-card:hover {
    box-shadow: 0 8px 25px rgba(159, 215, 229, 0.15);
}

/* ---- 常见问题 ---- */
body.oxo-theme .qa-item {
    border: 1px solid rgba(255, 196, 214, 0.3);
    transition: all 0.3s ease;
}

body.oxo-theme .qa-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 93, 93, 0.12);
}

body.oxo-theme .qa-question {
    color: var(--oxo-red);
}

body.oxo-theme .qa-answer {
    border-left: 3px solid var(--oxo-pink);
}

/* ---- 樱花飘落动画（优化版：慢速 + 随机轨迹） ---- */
body.oxo-theme .profile-page::before {
    content: '';
    position: fixed;
    top: -10%;
    left: 0;
    width: 100%;
    height: 110%;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(255, 196, 214, 0.5) 0, transparent 3px),
        radial-gradient(circle at 30% 20%, rgba(255, 196, 214, 0.4) 0, transparent 2px),
        radial-gradient(circle at 70% 15%, rgba(255, 196, 214, 0.4) 0, transparent 2px),
        radial-gradient(circle at 90% 35%, rgba(255, 196, 214, 0.5) 0, transparent 3px),
        radial-gradient(circle at 50% 50%, rgba(255, 196, 214, 0.3) 0, transparent 2px),
        radial-gradient(circle at 20% 70%, rgba(255, 196, 214, 0.4) 0, transparent 2px),
        radial-gradient(circle at 80% 80%, rgba(255, 196, 214, 0.4) 0, transparent 3px);
    background-size: 500px 500px;
    animation: sakura-fall 16s linear infinite;
    opacity: 0.6;
    z-index: 1;
}

@keyframes sakura-fall {
    0% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(25%) translateX(15px);
    }
    50% {
        transform: translateY(50%) translateX(-10px);
    }
    75% {
        transform: translateY(75%) translateX(15px);
    }
    100% {
        transform: translateY(100%) translateX(0);
    }
}

/* 主页内容在樱花之下 */
body.oxo-theme .profile-page {
    position: relative;
    z-index: 2;
}

/* 尊重减弱动效 */
@media (prefers-reduced-motion: reduce) {
    body.oxo-theme .profile-page::before {
        animation: none;
    }
}

/* ---- 深色模式适配 ---- */
html[data-theme="dark"] body.oxo-theme {
    background:
        radial-gradient(circle at 15% 20%, rgba(199, 78, 98, 0.3) 0%, transparent 45%),
        radial-gradient(circle at 85% 60%, rgba(74, 124, 146, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 85%, rgba(123, 92, 54, 0.25) 0%, transparent 45%),
        linear-gradient(135deg, #2a1520 0%, #241828 35%, #1a2830 70%, #1e2a32 100%) !important;
    background-attachment: fixed;
}

/* 深色模式下卡片背景加亮，确保内容可读 */
html[data-theme="dark"] body.oxo-theme .profile-hero,
html[data-theme="dark"] body.oxo-theme .stat-card,
html[data-theme="dark"] body.oxo-theme .settings-list,
html[data-theme="dark"] body.oxo-theme .intro-card,
html[data-theme="dark"] body.oxo-theme .qa-item,
html[data-theme="dark"] body.oxo-theme .pending-card {
    background: rgba(45, 32, 48, 0.85) !important;
    border-color: rgba(255, 156, 174, 0.2) !important;
}

/* 深色模式：全局文字高对比度 */
html[data-theme="dark"] body.oxo-theme p,
html[data-theme="dark"] body.oxo-theme .profile-desc,
html[data-theme="dark"] body.oxo-theme .intro-text,
html[data-theme="dark"] body.oxo-theme .qa-answer,
html[data-theme="dark"] body.oxo-theme .settings-value,
html[data-theme="dark"] body.oxo-theme .pending-text {
    color: #e8d8e0 !important;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

/* 深色模式：标签文字 */
html[data-theme="dark"] body.oxo-theme .settings-label {
    color: #ff9dab !important;
}

html[data-theme="dark"] body.oxo-theme .profile-role {
    color: #ff9dab !important;
}

html[data-theme="dark"] body.oxo-theme .stat-label {
    color: #ff9dab !important;
}

/* 深色模式：高亮文字（标题/数值/QA 标题） */
html[data-theme="dark"] body.oxo-theme .qa-question,
html[data-theme="dark"] body.oxo-theme .qa-answer::first-line {
    color: #ffd3dd !important;
}

html[data-theme="dark"] body.oxo-theme .stat-value {
    color: #ffb3c2 !important;
}

html[data-theme="dark"] body.oxo-theme .section-title {
    color: #ffb3c2 !important;
    -webkit-text-fill-color: currentColor !important;
}

/* 深色模式：QA 左侧红线 */
html[data-theme="dark"] body.oxo-theme .qa-answer {
    border-left: 3px solid #ff9dab !important;
}

/* 深色模式：Navbar */
html[data-theme="dark"] body.oxo-theme .navbar {
    background: rgba(30, 20, 35, 0.95) !important;
    border-bottom-color: rgba(255, 156, 174, 0.25);
}

html[data-theme="dark"] body.oxo-theme .nav-container,
html[data-theme="dark"] body.oxo-theme .navbar .nav-links a {
    color: #e8d8e0 !important;
}

html[data-theme="dark"] body.oxo-theme .navbar .nav-links a:hover,
html[data-theme="dark"] body.oxo-theme .navbar .nav-links a.active {
    color: #ff9dab !important;
}

/* 深色模式：Footer */
html[data-theme="dark"] body.oxo-theme footer {
    background: linear-gradient(135deg, rgba(40, 25, 35, 0.95), rgba(25, 35, 45, 0.95)) !important;
    border-top-color: rgba(255, 156, 174, 0.2);
}

html[data-theme="dark"] body.oxo-theme footer p,
html[data-theme="dark"] body.oxo-theme footer .copyright,
html[data-theme="dark"] body.oxo-theme footer .footer-text {
    color: #e8d8e0 !important;
}

/* 深色模式：樱花粒子透明度单独调整 */
html[data-theme="dark"] body.oxo-theme .profile-page::before {
    opacity: 0.35 !important;
}

/* 深色模式：锦鲤剪影更可见 */
html[data-theme="dark"] body.oxo-theme .profile-hero::after {
    opacity: 0.8 !important;
}

/* 深色模式：装饰线增强 */
html[data-theme="dark"] body.oxo-theme .profile-hero::before {
    opacity: 0.9 !important;
}

/* 深色模式：卡片悬停反馈 */
html[data-theme="dark"] body.oxo-theme .stat-card:hover {
    box-shadow: 0 8px 25px rgba(239, 93, 93, 0.25) !important;
}

html[data-theme="dark"] body.oxo-theme .qa-item:hover {
    box-shadow: 0 6px 20px rgba(239, 93, 93, 0.2) !important;
}

/* 深色模式：Navbar 按钮阴影 */
html[data-theme="dark"] body.oxo-theme .navbar .bilibili-btn {
    box-shadow: 0 4px 15px rgba(239, 93, 93, 0.4) !important;
}

html[data-theme="dark"] body.oxo-theme .navbar .bilibili-btn:hover {
    box-shadow: 0 8px 25px rgba(239, 93, 93, 0.6) !important;
}
