/**
 * assets/css/deco.css
 * 名前の色・アバターの枠（装飾の管理。deco_lib.php の deco_name_colors()・deco_avatar_frames()）。2026-11-17 追加（続き155）。
 * header.php で全ページに読み込む（選手一覧・選手詳細・マイページ・管理画面の見本）。
 *
 *   名前：<span class="deco-name deco-name-キー">名前</span>
 *   枠  ：アバターの <img> か、それを包む要素（選手カードの .pmc-avatar）に class="deco-frame deco-frame-キー"
 *
 * 決まり：緑は使わない。動きは小さく（影・背景の位置だけ）。枠は Tailwind の枠の色より優先するため !important を付ける。
 */

/* ---------- 名前の色 ---------- */
.deco-name { font-weight: inherit; }
.deco-name-crimson { color: #f87171 !important; }
.deco-name-ice     { color: #7dd3fc !important; }
.deco-name-sakura  { color: #f9a8d4 !important; }

/* グラデーションの名前（文字の形に背景を切り抜く） */
.deco-name-gold, .deco-name-violet, .deco-name-platinum, .deco-name-rainbow, .deco-name-legend {
    color: transparent !important;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.deco-name-gold     { background-image: linear-gradient(180deg, #fef3c7 0%, #fbbf24 55%, #d97706 100%); }
.deco-name-violet   { background-image: linear-gradient(90deg, #c4b5fd, #e879f9 55%, #a78bfa); }
.deco-name-platinum { background-image: linear-gradient(100deg, #e4e4e7 0%, #ffffff 30%, #a1a1aa 55%, #f4f4f5 75%, #d4d4d8 100%); }

@keyframes deco-rainbow { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
.deco-name-rainbow {
    background-image: linear-gradient(90deg, #f87171, #fb923c, #fde047, #67e8f9, #60a5fa, #c084fc, #f472b6, #f87171);
    background-size: 200% 100%;
    animation: deco-rainbow 3s linear infinite;
}

@keyframes deco-legend-shine { 0%, 60% { background-position: 160% 0, 0 0; } 100% { background-position: -60% 0, 0 0; } }
.deco-name-legend {
    background-image:
        linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.95) 50%, transparent 60%),
        linear-gradient(180deg, #fffbeb 0%, #fde68a 35%, #f59e0b 70%, #b45309 100%);
    background-size: 250% 100%, 100% 100%;
    background-repeat: no-repeat;
    animation: deco-legend-shine 3s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.55));
}

/* ---------- アバターの枠 ---------- */
.deco-frame { border-width: 2px !important; border-style: solid !important; }
.deco-frame-crimson { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(239, 68, 68, 0.6) !important; }
.deco-frame-ice     { border-color: #7dd3fc !important; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.6) !important; }
.deco-frame-gold    { border-color: #fbbf24 !important; box-shadow: 0 0 0 2px #78350f, 0 0 14px rgba(245, 158, 11, 0.7) !important; }
.deco-frame-royal   { border-color: #a855f7 !important; box-shadow: 0 0 0 3px #facc15, 0 0 0 5px rgba(59, 7, 100, 0.9), 0 0 16px rgba(168, 85, 247, 0.7) !important; }

@keyframes deco-flame {
    0%, 100% { box-shadow: 0 0 0 2px #7c2d12, 0 0 10px rgba(249, 115, 22, 0.75), 0 -2px 16px rgba(239, 68, 68, 0.5); }
    50%      { box-shadow: 0 0 0 2px #7c2d12, 0 0 16px rgba(251, 146, 60, 0.95), 0 -4px 22px rgba(239, 68, 68, 0.7); }
}
.deco-frame-flame { border-color: #fb923c !important; animation: deco-flame 1.6s ease-in-out infinite; }

@keyframes deco-legend {
    0%, 100% { box-shadow: 0 0 0 3px #fde68a, 0 0 0 5px #92400e, 0 0 14px rgba(245, 158, 11, 0.7); }
    50%      { box-shadow: 0 0 0 3px #fffbeb, 0 0 0 5px #b45309, 0 0 26px rgba(251, 191, 36, 0.95); }
}
.deco-frame-legend { border-color: #f59e0b !important; animation: deco-legend 2.4s ease-in-out infinite; }

/* 動きを減らす設定の人には止める */
@media (prefers-reduced-motion: reduce) {
    .deco-name-rainbow, .deco-name-legend, .deco-frame-flame, .deco-frame-legend { animation: none; }
}
