/* =============================================
   theme-p5.css — Persona 5 风格（红/黑/白，倾斜，张扬）
   ============================================= */

[data-theme="p5"] {
    /* ---- 色彩 ---- */
    --bg-primary: #0a0a0a;
    --bg-gradient: linear-gradient(135deg, #1a0000 0%, #000000 30%, #0a0a0a 60%, #1a0000 100%);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --accent: #e50000;
    --accent-hover: #ff1a1a;
    --accent-glow: rgba(229, 0, 0, 0.4);

    /* ---- 表面 ---- */
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(0, 0, 0, 0.55);
    --card-border: 2px solid rgba(229, 0, 0, 0.5);
    --nav-bg: rgba(0, 0, 0, 0.85);
    --footer-bg: rgba(0, 0, 0, 0.95);
    --video-bg: rgba(10, 10, 10, 0.6);

    /* ---- 装饰 ---- */
    --ui-skew: -8deg;
    --button-shadow: 5px 5px 0px rgba(229, 0, 0, 0.6);
    --button-shadow-x: 5px;
    --button-shadow-y: 5px;
    --button-shadow-color: rgba(229, 0, 0, 0.6);
    --hero-text-shadow: 6px 6px 0px rgba(229, 0, 0, 0.5);
    --border-style: 3px solid #ffffff;

    /* ---- 字体 ---- */
    --font-family: 'Noto Sans CJK SC', sans-serif;
}

/* ---- 背景动态装饰 ---- */
[data-theme="p5"] .bg-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 30%, rgba(229, 0, 0, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 60%, rgba(229, 0, 0, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 85%, rgba(229, 0, 0, 0.06) 0%, transparent 35%);
    animation: p5-ambient 8s ease-in-out infinite;
}

@keyframes p5-ambient {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 半调纹理叠加 */
[data-theme="p5"] .bg-decor::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(90deg,
            transparent, transparent 3px,
            rgba(229, 0, 0, 0.02) 3px, rgba(229, 0, 0, 0.02) 4px);
}

/* ---- P5 标题高亮条纹 ---- */
[data-theme="p5"] .section-title::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -12px;
    width: 40%;
    height: calc(100% + 8px);
    background: rgba(229, 0, 0, 0.08);
    transform: skewX(-12deg);
    pointer-events: none;
}

/* ---- P5 特有的卡片内边框装饰 ---- */
[data-theme="p5"] .skill-card::after,
[data-theme="p5"] .stat-card::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid rgba(229, 0, 0, 0.15);
    pointer-events: none;
    transform: skew(calc(var(--ui-skew) * -1));
}

[data-theme="p5"] .skill-card,
[data-theme="p5"] .stat-card {
    position: relative;
}

/* ---- P5 Hero 背景装饰 ---- */
[data-theme="p5"] .hero-decor {
    position: absolute;
    top: 50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(229, 0, 0, 0.08) 0%, transparent 70%);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
    animation: p5-hero-glow 6s ease-in-out infinite alternate;
}

@keyframes p5-hero-glow {
    from { transform: translateY(-50%) scale(1); opacity: 0.6; }
    to { transform: translateY(-50%) scale(1.2); opacity: 1; }
}

/* ---- P5 导航链接角标 ---- */
[data-theme="p5"] .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

[data-theme="p5"] .nav-link:hover::after {
    width: 80%;
}

/* ---- P5 滚动条 ---- */
[data-theme="p5"]::-webkit-scrollbar {
    width: 8px;
}

[data-theme="p5"]::-webkit-scrollbar-track {
    background: #0a0a0a;
}

[data-theme="p5"]::-webkit-scrollbar-thumb {
    background: #e50000;
    border-radius: 0;
}

/* ---- P5 选中文本 ---- */
[data-theme="p5"] ::selection {
    background: #e50000;
    color: #fff;
}

/* ---- P5 额外装饰线 ---- */
[data-theme="p5"] .section-title::after {
    height: 4px;
    background: #e50000;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

/* ---- P5 作品展示区倾斜卡片 ---- */
[data-theme="p5"] .video-showcase {
    transform: skewX(-5deg);
}

[data-theme="p5"] .video-showcase .video-gallery,
[data-theme="p5"] .video-showcase .video-counter {
    transform: skewX(5deg);
}

[data-theme="p5"] .video-item video {
    border: 1px solid rgba(229, 0, 0, 0.25);
}

[data-theme="p5"] .video-item h3 {
    letter-spacing: 3px;
}

/* 修正导航按钮在倾斜容器中的位置 */
[data-theme="p5"] .nav-btn {
    transform: skewX(5deg);
}

[data-theme="p5"] .nav-prev:hover,
[data-theme="p5"] .nav-next:hover {
    transform: skewX(5deg) scale(1.12);
}

[data-theme="p5"] .nav-prev:active,
[data-theme="p5"] .nav-next:active {
    transform: skewX(5deg) scale(0.95);
}
