/* ===== 共通アニメーション ===== */

/* フェードインアップ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* 浮遊アニメーション */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* 輝き（シャイン）効果 */
@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

/* パルス効果 */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 70, 84, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 70, 84, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 70, 84, 0);
    }
}

.pulse-red {
    animation: pulse-red 2s infinite;
}

/* スクロール出現用 */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 背景の動くライン */
@keyframes move-lines {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

.moving-grid {
    animation: move-lines 10s linear infinite;
}

/* ===========================
   VALORANT HUD アドバンスアニメーション
   =========================== */

/* グリッチ テキスト */
@keyframes glitch-clip-1 {
    0%   { clip-path: inset(0 0 95% 0); transform: translate(-3px, 0); }
    20%  { clip-path: inset(60% 0 20% 0); transform: translate(3px, 0); }
    40%  { clip-path: inset(30% 0 55% 0); transform: translate(-2px, 0); }
    60%  { clip-path: inset(80% 0 5% 0);  transform: translate(2px, 0); }
    80%  { clip-path: inset(10% 0 80% 0); transform: translate(-3px, 0); }
    100% { clip-path: inset(0 0 95% 0);   transform: translate(0, 0); }
}

@keyframes glitch-clip-2 {
    0%   { clip-path: inset(50% 0 30% 0); transform: translate(3px, 0); }
    25%  { clip-path: inset(10% 0 70% 0); transform: translate(-3px, 0); }
    50%  { clip-path: inset(75% 0 10% 0); transform: translate(2px, 0); }
    75%  { clip-path: inset(25% 0 55% 0); transform: translate(-2px, 0); }
    100% { clip-path: inset(50% 0 30% 0); transform: translate(0, 0); }
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.glitch-text::before {
    color: #00d4ff;
    text-shadow: -2px 0 #ff4654;
    animation: glitch-clip-1 4s infinite steps(1);
    opacity: 0.8;
}

.glitch-text::after {
    color: #ff4654;
    text-shadow: 2px 0 #00d4ff;
    animation: glitch-clip-2 4s infinite steps(1) 0.3s;
    opacity: 0.7;
}

/* スキャンライン全体オーバーレイ */
@keyframes scanSweep {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.v-scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.06) 2px,
        rgba(0, 0, 0, 0.06) 4px
    );
}

.v-scanline-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 212, 255, 0.03),
        transparent
    );
    animation: scanSweep 6s linear infinite;
}

/* ネオングロープルス */
@keyframes neonPulse-red {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 70, 84, 0.4), 0 0 20px rgba(255, 70, 84, 0.2); }
    50%       { box-shadow: 0 0 16px rgba(255, 70, 84, 0.8), 0 0 40px rgba(255, 70, 84, 0.4), 0 0 60px rgba(255, 70, 84, 0.15); }
}

@keyframes neonPulse-cyan {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 212, 255, 0.4), 0 0 20px rgba(0, 212, 255, 0.2); }
    50%       { box-shadow: 0 0 16px rgba(0, 212, 255, 0.8), 0 0 40px rgba(0, 212, 255, 0.4), 0 0 60px rgba(0, 212, 255, 0.15); }
}

@keyframes neonPulse-green {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 136, 0.4), 0 0 20px rgba(0, 255, 136, 0.2); }
    50%       { box-shadow: 0 0 16px rgba(0, 255, 136, 0.8), 0 0 40px rgba(0, 255, 136, 0.4), 0 0 60px rgba(0, 255, 136, 0.15); }
}

.neon-red  { animation: neonPulse-red  2.4s ease-in-out infinite; }
.neon-cyan { animation: neonPulse-cyan 2.4s ease-in-out infinite; }
.neon-green { animation: neonPulse-green 2.4s ease-in-out infinite; }

/* データリビール (左→右ワイプ) */
@keyframes dataReveal {
    0%   { clip-path: inset(0 100% 0 0); opacity: 0.4; }
    100% { clip-path: inset(0 0% 0 0);   opacity: 1; }
}

.data-reveal {
    animation: dataReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* VS バッジ枠回転 */
@keyframes borderSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* コーナーデコレーション点滅 */
@keyframes cornerBlink {
    0%, 90%, 100% { opacity: 1; }
    95%           { opacity: 0.2; }
}

.v-corner-blink {
    animation: cornerBlink 3s ease-in-out infinite;
}

/* ボタン内スキャン光沢 */
@keyframes btnScanSlide {
    0%   { left: -120%; }
    100% { left: 120%; }
}

/* HUD ダイヤモンドパルス (empty state icon 用) */
@keyframes hudDiamondPulse {
    0%, 100% { transform: rotate(45deg) scale(1);   opacity: 1; }
    50%       { transform: rotate(45deg) scale(1.08); opacity: 0.85; }
}

/* テキストフリッカー (eyebrow 用) */
@keyframes textFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
        text-shadow: 0 0 6px currentColor, 0 0 12px currentColor;
    }
    20%, 24%, 55% {
        opacity: 0.5;
        text-shadow: none;
    }
}

.v-flicker {
    animation: textFlicker 6s linear infinite;
}

/* ローディング スキャンスウィープ (results 上) */
@keyframes loadScanSweep {
    0%   { top: -10%; }
    100% { top: 110%; }
}

/* ランク画像ホバーグロー */
@keyframes rankHoverGlow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(255,70,84,0.5)); }
    50%       { filter: drop-shadow(0 0 14px rgba(255,70,84,0.9)) drop-shadow(0 0 24px rgba(0,212,255,0.4)); }
}
