/* アニメーション定義 */

/* 基本アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* スピナーアニメーション */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* フローティングアニメーション */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* リング回転アニメーション */
@keyframes rotate-ring {
    to {
        transform: rotate(360deg);
    }
}

/* パルスグロウアニメーション */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(98, 0, 234, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(98, 0, 234, 0.8);
    }
}

/* スクロール矢印アニメーション */
@keyframes scroll-down {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* 点滅アニメーション */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* タイムパーティクルアニメーション */
@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* グリッチエフェクト */
@keyframes glitch {
    0%, 100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translate(2px, -2px);
        filter: hue-rotate(360deg);
    }
}

/* シャインエフェクト */
@keyframes shine {
    to {
        transform: translateX(100%);
    }
}

/* 波紋エフェクト */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* タイムラインアニメーション */
@keyframes timeline-flow {
    to {
        transform: translateX(-100%);
    }
}

/* 時計の針アニメーション */
@keyframes clock-rewind {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* エネルギーウェーブ */
@keyframes energy-wave {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* パーティクル生成用クラス */
.time-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.time-particles::before,
.time-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: particle-float 10s linear infinite;
}

.time-particles::before {
    left: 10%;
    animation-delay: 0s;
}

.time-particles::after {
    left: 30%;
    animation-delay: 3s;
}

/* 追加パーティクル */
.time-particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-purple);
    border-radius: 50%;
    animation: particle-float 12s linear infinite;
}

.time-particles span:nth-child(1) {
    left: 50%;
    animation-delay: 1s;
}

.time-particles span:nth-child(2) {
    left: 70%;
    animation-delay: 5s;
}

.time-particles span:nth-child(3) {
    left: 90%;
    animation-delay: 7s;
}

/* ボタンエフェクト */
.btn-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.btn-particles::before,
.btn-particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    opacity: 0;
}

.btn-particles::before {
    border: 2px solid var(--primary-purple);
    animation: ripple 1.5s ease-out infinite;
}

.btn-particles::after {
    border: 2px solid var(--accent-cyan);
    animation: ripple 1.5s ease-out 0.5s infinite;
}

/* シャインエフェクト */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: none;
}

.btn-purchase:hover .btn-shine {
    animation: shine 0.5s ease-out;
}

/* AOS風アニメーション */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* 遅延設定 */
[data-aos-delay="100"] {
    transition-delay: 0.1s;
}

[data-aos-delay="200"] {
    transition-delay: 0.2s;
}

[data-aos-delay="300"] {
    transition-delay: 0.3s;
}

/* グリッチテキストエフェクト */
.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%;
}

.glitch-text::before {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: var(--accent-cyan);
    z-index: -1;
}

.glitch-text::after {
    animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
    color: var(--primary-purple);
    z-index: -2;
}

/* ホバーエフェクト強化 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(98, 0, 234, 0.3);
}

/* 3D回転エフェクト */
.rotate-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.rotate-3d:hover {
    transform: rotateY(10deg) rotateX(-10deg);
}

/* ネオングロウテキスト */
.neon-glow {
    text-shadow: 
        0 0 10px var(--primary-purple),
        0 0 20px var(--primary-purple),
        0 0 30px var(--primary-purple),
        0 0 40px var(--accent-cyan);
}

/* 購入セクションのパーティクル背景 */
.purchase-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.purchase-particles::before,
.purchase-particles::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.purchase-particles::before {
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.purchase-particles::after {
    bottom: -100px;
    right: -100px;
    animation-delay: 10s;
}

/* エネルギーリング */
.energy-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-purple);
    border-radius: 50%;
    opacity: 0;
    animation: energy-wave 2s ease-out infinite;
}

/* カスタムスクロールバー */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple);
}

/* プリローダーアニメーション */
.preload-animation {
    animation: fadeIn 0.5s ease-out;
}

/* パララックス効果 */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    will-change: transform;
}

/* マウスフォロワー */
.mouse-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--primary-purple);
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 9999;
    transition: transform 0.2s ease-out;
    opacity: 0.5;
}

/* インタラクティブ要素 */
.interactive {
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive:active {
    transform: scale(0.95);
}