* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    cursor: crosshair;
}

.experience-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* ローディング画面 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-text {
    font-size: 2rem;
    margin-bottom: 2rem;
    letter-spacing: 0.2em;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    transition: width 0.1s ease;
}

/* メインビジュアル */
.main-visual {
    position: relative;
    width: 100%;
    height: 100%;
}

/* キャンバス */
canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#tunnelCanvas {
    z-index: 1;
}

#particleStorm {
    z-index: 2;
    mix-blend-mode: screen;
}

#matrixCanvas {
    z-index: 3;
    opacity: 0.7;
}

/* エネルギーフィールド */
.energy-field {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: 4;
    pointer-events: none;
}

.energy-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #fff 0%, #00ffff 30%, transparent 70%);
    border-radius: 50%;
    filter: blur(5px);
    animation: coreGlow 2s ease-in-out infinite;
}

@keyframes coreGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.energy-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid;
    border-radius: 50%;
    opacity: 0.5;
}

.ring-1 {
    width: 200px;
    height: 200px;
    border-color: #00ffff;
    animation: ringRotate 3s linear infinite;
}

.ring-2 {
    width: 300px;
    height: 300px;
    border-color: #ff00ff;
    animation: ringRotate 4s linear infinite reverse;
}

.ring-3 {
    width: 400px;
    height: 400px;
    border-color: #ffff00;
    animation: ringRotate 5s linear infinite;
}

@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.energy-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: waveExpand 2s ease-out infinite;
}

@keyframes waveExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* テキストエフェクト */
.text-explosion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}

.wow-text {
    font-size: 10rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-align: center;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradient 2s linear infinite, textScale 3s ease-in-out infinite;
    text-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
}

@keyframes textGradient {
    from { background-position: 0% 50%; }
    to { background-position: 300% 50%; }
}

@keyframes textScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.text-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}

.text-particle {
    position: absolute;
    font-weight: bold;
    animation: particleFloat 3s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--vx) * 20px), calc(-50% + var(--vy) * 20px)) scale(1);
        opacity: 0;
    }
}

/* リアクティブオーブ */
.reactive-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: 6;
    pointer-events: none;
}

.orb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
}

.orb-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(100, 200, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: orbPulse 2s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.orb-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wave-circle {
    fill: none;
    stroke: #00ffff;
    stroke-width: 2;
    filter: url(#glow);
}

/* 光線バースト */
.light-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 7;
    pointer-events: none;
}

.burst-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 300px;
    background: linear-gradient(to bottom, transparent 0%, #fff 50%, transparent 100%);
    transform-origin: center bottom;
    opacity: 0.8;
}

.initial-burst .burst-ray {
    animation: burstFlash 0.5s ease-out;
}

@keyframes burstFlash {
    0% {
        transform: rotate(var(--angle)) scaleY(0);
        opacity: 1;
    }
    50% {
        transform: rotate(var(--angle)) scaleY(2);
        opacity: 1;
    }
    100% {
        transform: rotate(var(--angle)) scaleY(1);
        opacity: 0.8;
    }
}

/* データストリーム */
.data-stream {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* グリッチエフェクト */
.glitch-container {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    pointer-events: none;
}

.glitch-text {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    color: #fff;
    letter-spacing: 0.1em;
}

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

.glitching .glitch-text::before {
    animation: glitch1 0.2s infinite;
    color: #00ffff;
    z-index: -1;
}

.glitching .glitch-text::after {
    animation: glitch2 0.2s infinite;
    color: #ff00ff;
    z-index: -2;
}

@keyframes glitch1 {
    0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px, 0); }
    20% { clip-path: inset(92% 0 1% 0); transform: translate(2px, 0); }
    40% { clip-path: inset(43% 0 1% 0); transform: translate(0, -2px); }
    60% { clip-path: inset(25% 0 58% 0); transform: translate(2px, 0); }
    80% { clip-path: inset(54% 0 7% 0); transform: translate(-2px, 0); }
    100% { clip-path: inset(58% 0 43% 0); transform: translate(0, 2px); }
}

@keyframes glitch2 {
    0% { clip-path: inset(65% 0 8% 0); transform: translate(2px, 0); }
    20% { clip-path: inset(13% 0 48% 0); transform: translate(-2px, 0); }
    40% { clip-path: inset(1% 0 38% 0); transform: translate(0, 2px); }
    60% { clip-path: inset(32% 0 65% 0); transform: translate(-2px, 0); }
    80% { clip-path: inset(98% 0 1% 0); transform: translate(2px, 0); }
    100% { clip-path: inset(31% 0 21% 0); transform: translate(0, -2px); }
}

/* インタラクションヒント */
.interaction-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

.interaction-hint p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.hint-arrow {
    font-size: 2rem;
    animation: arrowBounce 1s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* コントロール */
.controls {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 400px;
    z-index: 1000;
}

.effect-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.effect-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.effect-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* フルスクリーンボタン */
.fullscreen-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.fullscreen-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

/* 画面フラッシュ */
.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    pointer-events: none;
    z-index: 9999;
    animation: flash 0.5s ease-out forwards;
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .wow-text {
        font-size: 5rem;
    }
    
    .glitch-text {
        font-size: 2.5rem;
    }
    
    .controls {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .effect-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}