/* 劇団暗号資産 メインスタイル */

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本設定 */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* メインコンテナ */
.main-container {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #0a0a0a 100%);
    overflow: hidden;
}

/* パーティクル背景 */
#particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* メインコンテンツ */
.content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1200px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ヒーローセクション */
.hero {
    margin-bottom: 1.5rem;
}

.main-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 900;
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    line-height: 1.0;
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(255, 255, 255, 0.1);
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.main-title.loaded {
    opacity: 1;
    animation: none;
}

.title-line {
    display: block;
    margin-bottom: 0.1rem;
    position: relative;
    opacity: inherit;
    animation: inherit;
}

.title-line:nth-child(1) {
    animation-delay: 0.5s;
}

.title-line:nth-child(2) {
    animation-delay: 0.8s;
}

.title-line:nth-child(3) {
    animation-delay: 1.1s;
}

/* 引用セクション */
.quote {
    margin-bottom: 1.2rem;
}

.philosophy {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.6;
    color: #00ff88;
    text-shadow: 
        0 0 10px rgba(0, 255, 136, 0.5),
        0 0 20px rgba(0, 255, 136, 0.3);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
    font-weight: 400;
}

.philosophy.loaded {
    opacity: 1;
    animation: none;
}

.philosophy .desktop-lines,
.philosophy .mobile-lines {
    opacity: inherit;
}

.philosophy p {
    margin-bottom: 0.4rem;
}

/* デスクトップ用改行調整 */
.philosophy .mobile-lines {
    display: none !important;
}

.philosophy .desktop-lines {
    display: block !important;
}

/* クレジット */
.credit {
    margin-bottom: 1rem;
}

.author {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.3rem, 2.8vw, 1.8rem);
    color: #ffffff;
    font-weight: 700;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: fadeInUp 1s ease-out 2s forwards;
}

.author.loaded {
    opacity: 1;
    animation: none;
}

/* 準備中メッセージ */
.coming-soon {
    margin-top: 1rem;
}

.preparing {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #00ffff;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 255, 255, 0.3);
    opacity: 0;
    animation: fadeInUp 1s ease-out 2.5s forwards, blink 2s infinite 3s;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* グリッチエフェクト */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    background: 
        linear-gradient(90deg, transparent 98%, rgba(0, 255, 136, 0.1) 100%),
        linear-gradient(180deg, transparent 98%, rgba(0, 255, 255, 0.1) 100%);
    animation: glitch 6s infinite;
}

/* アニメーション定義 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    10% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    20% {
        transform: translate(2px, -2px);
        filter: hue-rotate(180deg);
    }
    30% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(270deg);
    }
    40% {
        transform: translate(2px, 2px);
        filter: hue-rotate(360deg);
    }
    50% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(45deg);
    }
    60% {
        transform: translate(2px, -2px);
        filter: hue-rotate(135deg);
    }
    70% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(225deg);
    }
    80% {
        transform: translate(2px, 2px);
        filter: hue-rotate(315deg);
    }
}

/* ホバーエフェクト（一時的に無効化） */
/*.main-title:hover .title-line {
    animation: textGlitch 0.5s ease-in-out;
}*/

@keyframes textGlitch {
    0% { 
        transform: translate(0);
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.2);
    }
    20% { 
        transform: translate(-2px, 2px);
        text-shadow: 
            2px 0 0 rgba(255, 0, 0, 0.5),
            -2px 0 0 rgba(0, 255, 255, 0.5);
    }
    40% { 
        transform: translate(2px, -2px);
        text-shadow: 
            -2px 0 0 rgba(255, 0, 0, 0.5),
            2px 0 0 rgba(0, 255, 255, 0.5);
    }
    60% { 
        transform: translate(-2px, -2px);
        text-shadow: 
            2px 0 0 rgba(255, 0, 0, 0.5),
            -2px 0 0 rgba(0, 255, 255, 0.5);
    }
    80% { 
        transform: translate(2px, 2px);
        text-shadow: 
            -2px 0 0 rgba(255, 0, 0, 0.5),
            2px 0 0 rgba(0, 255, 255, 0.5);
    }
    100% { 
        transform: translate(0);
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.2);
    }
}

/* パフォーマンス最適化 */
.main-title,
.philosophy,
.author,
.preparing {
    will-change: transform, opacity;
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 高解像度ディスプレイ対応 */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min--moz-device-pixel-ratio: 2),
       only screen and (-o-min-device-pixel-ratio: 2/1),
       only screen and (min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi),
       only screen and (min-resolution: 2dppx) {
    
    .main-title {
        text-shadow: 
            0 0 5px rgba(255, 255, 255, 0.3),
            0 0 10px rgba(255, 255, 255, 0.2),
            0 0 15px rgba(255, 255, 255, 0.1);
    }
    
    .philosophy {
        text-shadow: 
            0 0 5px rgba(0, 255, 136, 0.5),
            0 0 10px rgba(0, 255, 136, 0.3);
    }
    
    .preparing {
        text-shadow: 
            0 0 5px rgba(0, 255, 255, 0.5),
            0 0 10px rgba(0, 255, 255, 0.3);
    }
}