/* =====================================================
   LOSTMAN - Main Stylesheet
   医療系退学・中退者専門塾
   ===================================================== */

/* ===== CSS Variables ===== */
:root {
    /* Light Mode Colors - Bright & Hopeful */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #f472b6;
    --secondary-light: #f9a8d4;
    --accent: #34d399;
    --accent-light: #6ee7b7;
    
    /* Neon Colors */
    --neon-blue: #00f5ff;
    --neon-pink: #ff00ff;
    --neon-green: #00ff88;
    --neon-purple: #bf00ff;
    --neon-orange: #ff6b00;
    
    /* Background & Text */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #f472b6 100%);
    --gradient-secondary: linear-gradient(135deg, #34d399 0%, #6366f1 100%);
    --gradient-neon: linear-gradient(135deg, #00f5ff 0%, #ff00ff 50%, #00ff88 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-neon: 0 0 20px rgba(99, 102, 241, 0.5);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Z-Index */
    --z-cursor: 9999;
    --z-modal: 1000;
    --z-loading: 999;
    --z-header: 100;
    --z-counter: 90;
}

/* ===== Light Mode - Day Sky (青空・雲・太陽 - 夜空の昼版) ===== */
[data-theme="light"] .hero {
    background: transparent;
}

[data-theme="light"] .hero::before {
    background: none;
}

[data-theme="light"] .laser-background,
[data-theme="light"] .beam-noodle {
    display: none !important;
}

[data-theme="light"] #hero-3d-container {
    /* フォーマルなグラデーション背景 */
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

[data-theme="light"] .hero-badge {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #2a2a4a;
    backdrop-filter: blur(10px);
}

[data-theme="light"] .hero-title {
    color: #1a1a3a;
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .hero-tagline {
    color: #3a3a5a;
}

[data-theme="light"] .hero .text-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .highlight-item {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    color: #2a2a4a;
    backdrop-filter: blur(8px);
}

[data-theme="light"] .highlight-item:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(99, 102, 241, 0.4);
    color: #3a3a5a;
    backdrop-filter: blur(8px);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(99, 102, 241, 0.6);
}

/* ===== Dark Mode - Night Sky (月と星空) ===== */
[data-theme="dark"] {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-tertiary: #1a1a3a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
    --shadow-neon: 0 0 30px rgba(255, 215, 0, 0.5);
}

[data-theme="dark"] .hero {
    background: transparent;
}

[data-theme="dark"] .hero::before {
    background: none;
}

[data-theme="dark"] .laser-background,
[data-theme="dark"] .beam-noodle {
    display: none !important;
}

[data-theme="dark"] #hero-3d-container {
    background: linear-gradient(to bottom, #0a0a1a 0%, #0f1530 50%, #1a1040 100%);
}

[data-theme="dark"] .hero-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 180, 0, 0.3) 100%);
    border: 1px solid rgba(255, 215, 0, 0.5);
}

[data-theme="dark"] .hero-title {
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #0a0a1a;
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

/* Night sky hint - PC */
[data-theme="dark"] .hero::after {
    content: '✨ タップで流れ星';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* Mobile: ヒントを更新（自動流れ星あり） */
@media (max-width: 768px) {
    [data-theme="dark"] .hero::after {
        content: '🌠 流れ星に願いを';
        bottom: 15px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7rem;
        color: rgba(255, 215, 0, 0.6);
        background: rgba(0, 0, 0, 0.4);
        padding: 0.4rem 0.8rem;
        border-radius: 20px;
        backdrop-filter: blur(5px);
    }
}

/* Light mode: PCではヒント非表示 */
[data-theme="light"] .hero::after {
    content: '';
    display: none;
}

/* Light mode: スマホでは操作ヒント表示 */
@media (max-width: 768px) {
    [data-theme="light"] .hero::after {
        content: '📱 傾けて操作';
        display: block;
        position: absolute;
        bottom: 15px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7rem;
        color: rgba(0, 0, 0, 0.4);
        background: rgba(255, 255, 255, 0.6);
        padding: 0.4rem 0.8rem;
        border-radius: 20px;
        backdrop-filter: blur(5px);
        pointer-events: none;
        animation: fadeInOut 4s ease-in-out infinite;
    }
}

/* ===== Theme-specific Tagline Display ===== */
/* ライトモード：通常タグライン表示 */
.hero-tagline-light {
    display: block;
}
.hero-tagline-dark {
    display: none;
}

/* ダークモード：すべてのロストマンへ。表示 */
[data-theme="dark"] .hero-tagline-light {
    display: none;
}
[data-theme="dark"] .hero-tagline-dark {
    display: block;
}

/* ===== ライトモード専用タグラインエフェクト（フォーマル） ===== */
[data-theme="light"] .hero-tagline-light {
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #2c3e50;
}

/* 通常テキスト部分 - 永続ループアニメーション */
.light-tagline-text {
    display: inline-block;
    opacity: 1;
    animation: formalTextPulse 8s ease-in-out infinite;
}

.light-tagline-text:nth-child(1) {
    animation-delay: 0s;
}
.light-tagline-text:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes formalTextReveal {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 永続ループ：微細な呼吸アニメーション */
@keyframes formalTextPulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.85;
        transform: translateY(-2px);
    }
}

/* 「学歴」部分 - フォーマルな強調（永続ループ） */
.light-tagline-highlight {
    display: inline-block;
    position: relative;
    color: #1a1a2e;
    font-weight: 800;
    opacity: 1;
    animation: formalHighlightLoop 6s ease-in-out infinite;
}

@keyframes formalHighlightReveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
        letter-spacing: 0.2em;
    }
    60% {
        opacity: 1;
        letter-spacing: 0.15em;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 0.1em;
    }
}

/* 「学歴」永続ループアニメーション */
@keyframes formalHighlightLoop {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        letter-spacing: 0.1em;
    }
    25% {
        opacity: 0.95;
        transform: scale(1.02);
        letter-spacing: 0.12em;
    }
    50% {
        opacity: 1;
        transform: scale(1);
        letter-spacing: 0.1em;
    }
    75% {
        opacity: 0.95;
        transform: scale(1.02);
        letter-spacing: 0.12em;
    }
}

/* 「学歴」の下線 - 永続ループ光が流れる */
.light-tagline-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c9a227 25%, #d4af37 50%, #c9a227 75%, transparent 100%);
    background-size: 200% 100%;
    animation: formalUnderlineFlow 3s ease-in-out infinite;
}

@keyframes formalUnderlineSlide {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* 下線の光が流れるループ */
@keyframes formalUnderlineFlow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 「人生をやり直す」部分 - メインアクセント（永続ループ） */
.light-tagline-accent {
    display: inline-block;
    position: relative;
    font-weight: 700;
    opacity: 1;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #2c3e50 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: formalGradientShift 4s ease-in-out infinite;
}

@keyframes formalAccentReveal {
    0% {
        opacity: 0;
        transform: translateX(-10px);
        filter: blur(4px);
    }
    50% {
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes formalGradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 「人生をやり直す」の装飾線 */
.light-tagline-accent::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #3498db 50%, transparent 100%);
    animation: accentLineExpand 0.6s ease-out 1.8s forwards;
}

@keyframes accentLineExpand {
    0% {
        width: 0;
        left: 50%;
    }
    100% {
        width: 100%;
        left: 0;
    }
}

/* ===== ダークモード専用タグラインエフェクト ===== */
[data-theme="dark"] .hero-tagline-dark {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #ffffff;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.2);
}

/* 通常テキスト部分のアニメーション */
.tagline-text-animate {
    display: inline-block;
    opacity: 0;
    animation: taglineTextFadeIn 1s ease-out forwards;
}

.tagline-text-animate:nth-child(1) {
    animation-delay: 0.5s;
}
.tagline-text-animate:nth-child(3) {
    animation-delay: 1.5s;
}

@keyframes taglineTextFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 「ロストマン」部分の華麗なエフェクト */
.tagline-highlight-animate {
    display: inline-block;
    position: relative;
    color: #ffd700;
    font-weight: 900;
    opacity: 0;
    animation: 
        lostmanReveal 1.2s ease-out 1s forwards,
        lostmanGlow 2s ease-in-out 2.2s infinite;
}

@keyframes lostmanReveal {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
        filter: blur(10px);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px) scale(1.05);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes lostmanGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255, 215, 0, 0.5),
            0 0 20px rgba(255, 215, 0, 0.3),
            0 0 30px rgba(255, 215, 0, 0.1);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.5),
            0 0 60px rgba(255, 215, 0, 0.3),
            0 0 80px rgba(255, 215, 0, 0.1);
    }
}

/* 「ロストマン」の下線アニメーション */
.tagline-highlight-animate::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #ffd700 20%, 
        #ffffff 50%, 
        #ffd700 80%, 
        transparent 100%);
    animation: underlineExpand 0.8s ease-out 2s forwards;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes underlineExpand {
    0% {
        width: 0;
        left: 50%;
    }
    100% {
        width: 100%;
        left: 0;
    }
}

/* 星がキラキラ浮かぶエフェクト */
.tagline-highlight-animate::before {
    content: '✨';
    position: absolute;
    top: -15px;
    right: -25px;
    font-size: 1rem;
    opacity: 0;
    animation: starSparkle 3s ease-in-out 2.5s infinite;
}

@keyframes starSparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1) rotate(20deg);
    }
    40% {
        opacity: 0.5;
        transform: scale(0.8) rotate(-10deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) rotate(15deg);
    }
    80% {
        opacity: 0.3;
        transform: scale(0.6) rotate(-5deg);
    }
}

/* ダークモード タグライン切り替え構造 - 永続ループ */
.dark-tagline-switcher {
    position: relative;
    min-height: 3rem;
}

/* 最初のタグライン：すべてのロストマンへ。（永続ループ） */
.dark-tagline-first {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    animation: darkTaglineLoop 10s ease-in-out infinite;
}

@keyframes firstTaglineIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 永続ループ：表示→フェードアウト→0→フェードイン→表示 */
@keyframes darkTaglineLoop {
    0%, 5% {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(3px);
    }
    10%, 40% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    45%, 100% {
        opacity: 0;
        transform: translateY(-10px);
        filter: blur(3px);
    }
}

@keyframes firstTaglineOut {
    0% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
        filter: blur(5px);
    }
}

/* 2番目のタグライン：私たちはきっと、大丈夫だ。（永続ループ） */
.dark-tagline-second {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    animation: darkTaglineLoopSecond 10s ease-in-out infinite;
}

@keyframes secondTaglineIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(8px);
    }
    50% {
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* 永続ループ（最初のタグラインと交互に表示） */
@keyframes darkTaglineLoopSecond {
    0%, 45% {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(3px);
    }
    50%, 55% {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(3px);
    }
    60%, 90% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    95%, 100% {
        opacity: 0;
        transform: translateY(-10px);
        filter: blur(3px);
    }
}

/* 「私たちはきっと、」テキスト部分 */
.tagline-second-text {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 0.08em;
}

/* 「大丈夫だ。」ハイライト部分 */
.tagline-second-highlight {
    display: inline-block;
    position: relative;
    color: #ffffff;
    font-weight: 700;
    animation: secondHighlightGlow 3s ease-in-out 6.5s infinite;
}

@keyframes secondHighlightGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.4),
            0 0 20px rgba(255, 215, 0, 0.2);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.7),
            0 0 40px rgba(255, 215, 0, 0.4),
            0 0 60px rgba(255, 215, 0, 0.2);
    }
}

/* 「大丈夫だ。」の下に光の線 */
.tagline-second-highlight::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.8) 30%,
        rgba(255, 215, 0, 0.6) 50%,
        rgba(255, 255, 255, 0.8) 70%,
        transparent 100%);
    animation: hopeLine 0.6s ease-out 6s forwards;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

@keyframes hopeLine {
    0% {
        width: 0;
    }
    100% {
        width: 120%;
    }
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Hide scrollbar but keep functionality */
body::-webkit-scrollbar {
    width: 8px;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Neon Cursor ===== */
.neon-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--gradient-neon);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-cursor);
    mix-blend-mode: screen;
    transition: transform 0.1s ease-out;
    box-shadow: 
        0 0 10px var(--neon-blue),
        0 0 20px var(--neon-pink),
        0 0 30px var(--neon-purple);
    animation: neonPulse 2s ease-in-out infinite;
}

.neon-cursor-trail {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    pointer-events: none;
    z-index: calc(var(--z-cursor) - 1);
    transition: transform 0.3s ease-out;
    animation: trailPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

@keyframes trailPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Hide cursor on mobile */
@media (max-width: 768px) {
    .neon-cursor, .neon-cursor-trail {
        display: none;
    }
}

/* ===== Loading Screen - Enhanced ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0a12 0%, #12101f 40%, #1a152a 70%, #1f1835 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

/* ローディング画面の星空背景 */
.loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 10% 20%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 25% 35%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 45% 15%, #fff, transparent),
        radial-gradient(2px 2px at 60% 45%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 75% 25%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 85% 55%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 15% 65%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 35% 80%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 55% 70%, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 90% 85%, rgba(255,255,255,0.7), transparent);
    background-size: 100% 100%;
    animation: loadingStarsMove 60s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes loadingStarsMove {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-5px) translateX(3px); }
    100% { transform: translateY(0) translateX(0); }
}

/* 星の点滅アニメーション（汎用） */
@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.4);
        box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    }
}

/* 星のゆらぎアニメーション */
@keyframes starFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(2px, -2px);
    }
    50% {
        transform: translate(-1px, 1px);
    }
    75% {
        transform: translate(1px, 2px);
    }
}

/* ローディング画面の流れ星アニメーション（緩速） */
@keyframes loadingMeteorFall {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) rotate(var(--angle, 45deg));
    }
    10% {
        opacity: 1;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateX(150px) translateY(200px) rotate(var(--angle, 45deg));
    }
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ===== シンプルローディング画面 ===== */

.loading-content {
    text-align: center;
    animation: loadingFadeIn 0.8s ease-out;
}

@keyframes loadingFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ネオン調 LOSTMAN タイトル（白文字＋紫グロー） */
.loading-neon-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    position: relative;
    animation: neonFlicker 2s ease-in-out infinite;
    text-shadow:
        0 0 2px #fff,
        0 0 5px rgba(255, 255, 255, 0.9),
        0 0 15px rgba(124, 102, 255, 0.8),
        0 0 30px rgba(100, 80, 220, 0.5),
        0 0 50px rgba(80, 60, 180, 0.4),
        0 0 80px rgba(60, 40, 140, 0.2);
}

/* ===== ネオンプログレスバー（グラデーション） ===== */
.loading-neon-progress-bar {
    width: 85%;
    max-width: 300px;
    height: 4px;
    margin: 0.5rem auto 2rem auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 5px rgba(100, 80, 180, 0.2),
        inset 0 0 2px rgba(0, 0, 0, 0.3);
}

.loading-neon-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        #4c4a9e,      /* ディープインディゴ */
        #6b5bb5,      /* ミディアムバイオレット */
        #8470c8,      /* ソフトパープル */
        #9d8ad8,      /* ライトラベンダー */
        #8470c8,      /* ソフトパープル */
        #6b5bb5,      /* ミディアムバイオレット */
        #4c4a9e       /* ディープインディゴ */
    );
    background-size: 400% 100%;
    border-radius: 2px;
    animation: neonProgressFill 1.8s ease-out forwards, neonProgressShimmer 1.5s linear infinite;
    box-shadow: 
        0 0 6px rgba(100, 90, 180, 0.6),
        0 0 12px rgba(130, 110, 200, 0.4);
}

@keyframes neonProgressFill {
    0% { width: 0%; }
    10% { width: 12%; }
    25% { width: 30%; }
    45% { width: 52%; }
    65% { width: 72%; }
    85% { width: 90%; }
    100% { width: 100%; }
}

@keyframes neonProgressShimmer {
    0% { background-position: 300% 0; }
    100% { background-position: -300% 0; }
}

.loading-neon-progress-glow {
    position: absolute;
    top: -2px;
    left: 0;
    width: 20%;
    height: calc(100% + 4px);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: neonGlowSweep 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes neonGlowSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(600%); }
}

/* パーセント＆ステータス廃止 */

@keyframes neonFlicker {
    0%, 100% {
        opacity: 1;
        text-shadow:
            0 0 2px #fff,
            0 0 5px rgba(255, 255, 255, 0.9),
            0 0 15px rgba(124, 102, 255, 0.7),
            0 0 30px rgba(100, 80, 220, 0.4),
            0 0 50px rgba(80, 60, 180, 0.3);
    }
    25% {
        opacity: 0.98;
        text-shadow:
            0 0 2px #fff,
            0 0 8px rgba(255, 255, 255, 0.95),
            0 0 20px rgba(110, 90, 200, 0.8),
            0 0 40px rgba(90, 70, 180, 0.5);
    }
    50% {
        opacity: 1;
        text-shadow:
            0 0 3px #fff,
            0 0 10px rgba(255, 255, 255, 0.95),
            0 0 25px rgba(130, 110, 220, 0.9),
            0 0 50px rgba(100, 80, 190, 0.5),
            0 0 70px rgba(80, 60, 160, 0.3);
    }
    75% {
        opacity: 0.95;
        text-shadow:
            0 0 2px #fff,
            0 0 6px rgba(255, 255, 255, 0.9),
            0 0 12px rgba(140, 120, 210, 0.5),
            0 0 25px rgba(110, 90, 200, 0.4);
    }
}

.loading-message-main {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    
    /* タイプライター風カーソル点滅 */
    border-right: 3px solid rgba(110, 90, 200, 0.8);
    padding-right: 0.3rem;
    animation: 
        messageGlow 2.5s ease-in-out 1s infinite,
        cursorBlink 0.7s step-end infinite;
    
    /* 紫のグロー */
    text-shadow: 
        0 0 10px rgba(110, 90, 200, 0.5),
        0 0 20px rgba(100, 80, 180, 0.3),
        0 0 30px rgba(80, 60, 160, 0.2);
}

/* メッセージのグロー呼吸アニメーション */
@keyframes messageGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(110, 90, 200, 0.5),
            0 0 20px rgba(100, 80, 180, 0.3),
            0 0 30px rgba(80, 60, 160, 0.2);
        filter: brightness(1);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(120, 100, 210, 0.7),
            0 0 30px rgba(100, 80, 190, 0.5),
            0 0 45px rgba(90, 70, 180, 0.3),
            0 0 60px rgba(80, 60, 160, 0.2);
        filter: brightness(1.1);
    }
}

/* カーソル点滅 */
@keyframes cursorBlink {
    0%, 100% {
        border-color: rgba(110, 90, 200, 0.8);
    }
    50% {
        border-color: transparent;
    }
}



/* 一文字ずつ出現するアニメーション */
.message-char {
    display: inline-block;
    opacity: 0;
    animation: 
        charReveal 0.5s ease-out forwards,
        charFloat 3s ease-in-out 1.5s infinite,
        charColorWave 4s ease-in-out 2s infinite;
}

/* 文字ごとに波打つような遅延 */
.message-char:nth-child(1) { --float-delay: 0s; --color-delay: 0s; }
.message-char:nth-child(2) { --float-delay: 0.1s; --color-delay: 0.15s; }
.message-char:nth-child(3) { --float-delay: 0.2s; --color-delay: 0.3s; }
.message-char:nth-child(4) { --float-delay: 0.3s; --color-delay: 0.45s; }
.message-char:nth-child(5) { --float-delay: 0.4s; --color-delay: 0.6s; }
.message-char:nth-child(6) { --float-delay: 0.5s; --color-delay: 0.75s; }
.message-char:nth-child(7) { --float-delay: 0.6s; --color-delay: 0.9s; }
.message-char:nth-child(8) { --float-delay: 0.7s; --color-delay: 1.05s; }
.message-char:nth-child(9) { --float-delay: 0.8s; --color-delay: 1.2s; }
.message-char:nth-child(10) { --float-delay: 0.9s; --color-delay: 1.35s; }
.message-char:nth-child(11) { --float-delay: 1s; --color-delay: 1.5s; }
.message-char:nth-child(12) { --float-delay: 1.1s; --color-delay: 1.65s; }
.message-char:nth-child(13) { --float-delay: 1.2s; --color-delay: 1.8s; }
.message-char:nth-child(14) { --float-delay: 1.3s; --color-delay: 1.95s; }
.message-char:nth-child(15) { --float-delay: 1.4s; --color-delay: 2.1s; }

.message-char:nth-child(n) {
    animation-delay: 
        calc(var(--float-delay, 0s)),
        calc(1.5s + var(--float-delay, 0s) * 0.5),
        calc(2s + var(--color-delay, 0s) * 0.3);
}

@keyframes charReveal {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.5) rotateX(90deg);
        filter: blur(8px);
        color: rgba(168, 85, 247, 0);
        text-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
    }
    40% {
        color: rgba(168, 85, 247, 1);
        transform: translateY(-5px) scale(1.2) rotateX(-10deg);
        filter: blur(0);
        text-shadow: 0 0 30px rgba(168, 85, 247, 1), 0 0 60px rgba(236, 72, 153, 0.5);
    }
    70% {
        color: rgba(236, 72, 153, 0.9);
        transform: translateY(2px) scale(0.95) rotateX(5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0);
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    }
}

/* 出現後の浮遊アニメーション */
@keyframes charFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* 色の波アニメーション */
@keyframes charColorWave {
    0%, 100% {
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    }
    25% {
        color: rgba(200, 180, 255, 1);
        text-shadow: 0 0 15px rgba(168, 85, 247, 0.7), 0 0 25px rgba(139, 92, 246, 0.4);
    }
    50% {
        color: rgba(236, 200, 255, 1);
        text-shadow: 0 0 20px rgba(236, 72, 153, 0.6), 0 0 35px rgba(168, 85, 247, 0.3);
    }
    75% {
        color: rgba(220, 190, 255, 1);
        text-shadow: 0 0 15px rgba(139, 92, 246, 0.6), 0 0 25px rgba(168, 85, 247, 0.4);
    }
}

/* ドットの特別なアニメーション */
.message-char:nth-last-child(-n+3) {
    animation: dotReveal 0.6s ease-out forwards, dotPulseLoop 1s ease-in-out 1.2s infinite;
}

@keyframes dotReveal {
    0% {
        opacity: 0;
        transform: scale(0) translateY(10px);
    }
    60% {
        opacity: 1;
        transform: scale(1.5) translateY(-5px);
        text-shadow: 0 0 20px rgba(168, 85, 247, 1);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes dotPulseLoop {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1) translateY(0);
        text-shadow: 0 0 5px rgba(168, 85, 247, 0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.4) translateY(-3px);
        text-shadow: 0 0 15px rgba(168, 85, 247, 1), 0 0 25px rgba(236, 72, 153, 0.6);
    }
}

/* 各ドットに異なる遅延 */
.message-char:nth-last-child(3) {
    animation-delay: 0.75s, 1.2s;
}
.message-char:nth-last-child(2) {
    animation-delay: 0.8s, 1.4s;
}
.message-char:nth-last-child(1) {
    animation-delay: 0.85s, 1.6s;
}

/* 旧ゲーム風プログレスバー（廃止・上のネオンプログレスバーに統合） */

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: #c9a227;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 旧Phase 2スタイルは統合デザインに移行済み */

/* 従来の静止画ロゴ用（後方互換） */
.loading-logo-container {
    margin-bottom: 1.5rem;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.loading-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(201, 162, 39, 0.6));
    animation: logoZoomBreath 2.5s ease-in-out infinite;
}

@keyframes logoZoomBreath {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(201, 162, 39, 0.5));
    }
    50% {
        transform: scale(1.12);
        filter: drop-shadow(0 0 50px rgba(201, 162, 39, 0.8));
    }
}

@keyframes logoGlow {
    from {
        filter: drop-shadow(0 0 15px rgba(201, 162, 39, 0.4));
    }
    to {
        filter: drop-shadow(0 0 30px rgba(201, 162, 39, 0.7));
    }
}

.loading-text-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.loading-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2em;
    animation: brandReveal 1s ease both 0.3s;
}

@keyframes brandReveal {
    from {
        opacity: 0;
        letter-spacing: 0.5em;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        letter-spacing: 0.2em;
        filter: blur(0);
    }
}

.loading-tagline {
    font-size: 1rem;
    color: #c9a227;
    font-weight: 500;
    letter-spacing: 0.15em;
    animation: taglineReveal 0.8s ease both 0.6s;
}

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

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    margin: 0 auto 1rem;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0;
    background: var(--gradient-neon);
    border-radius: var(--radius-full);
    animation: loadProgress 2s ease-out forwards;
}

@keyframes loadProgress {
    0% { width: 0; }
    100% { width: 100%; }
}

.loading-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    animation: fadeInOut 2s ease-in-out infinite;
}

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

/* ===== Stars Background ===== */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: shootingStar linear forwards;
}

@keyframes shootingStar {
    0% {
        transform: translateY(-100vh) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(-50vw);
        opacity: 0;
    }
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: var(--z-header);
    transition: all var(--transition-normal);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 50px;
    width: auto;
    transition: all var(--transition-normal);
}

.logo:hover .logo-image {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(255, 238, 0, 0.5));
}

/* 3D Navigation */
.nav-3d {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.nav-link span {
    display: block;
    transition: transform var(--transition-normal);
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 100%) rotateX(-90deg);
    transform-origin: center;
    color: var(--primary);
    font-weight: 600;
    opacity: 0;
    transition: all var(--transition-normal);
}

.nav-link:hover span {
    transform: translateY(-100%) rotateX(90deg);
    opacity: 0;
}

.nav-link:hover::before {
    transform: translate(-50%, -50%) rotateX(0deg);
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    transition: width var(--transition-normal);
    border-radius: var(--radius-full);
}

.nav-link:hover::after {
    width: 80%;
}

/* Nav Link Glow Effect */
.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 
        0 0 20px rgba(99, 102, 241, 0.3),
        inset 0 0 20px rgba(99, 102, 241, 0.1);
}

/* Contact Button in Nav */
.nav-link.contact-btn {
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
}

.nav-link.contact-btn::before {
    color: #fff;
}

.nav-link.contact-btn::after {
    display: none;
}

.nav-link.contact-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-neon);
}

/* Theme Toggle */
.theme-toggle {
    margin-left: 1rem;
}

.theme-switch {
    display: none;
}

.theme-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 60px;
    height: 30px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 4px;
    cursor: pointer;
    position: relative;
    transition: background var(--transition-normal);
}

.theme-label i {
    font-size: 0.9rem;
    z-index: 1;
}

.theme-label .fa-sun {
    color: #f59e0b;
}

.theme-label .fa-moon {
    color: #6366f1;
}

.toggle-ball {
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    left: 4px;
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.theme-switch:checked + .theme-label .toggle-ball {
    transform: translateX(30px);
}

[data-theme="dark"] .theme-label {
    background: var(--bg-tertiary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    z-index: calc(var(--z-header) + 1);
}

.mobile-menu-btn .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation - Enhanced with drawer and swipe */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    z-index: 999;
    pointer-events: none;
}

.mobile-nav.active {
    pointer-events: auto;
}

/* Overlay - smooth backdrop */
.mobile-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mobile-nav.active .mobile-nav-overlay {
    opacity: 1;
}

/* Drawer - glass morphism design */
.mobile-nav-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: var(--bg-primary);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.25);
    will-change: transform;
    touch-action: pan-y;
}

[data-theme="dark"] .mobile-nav-drawer {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.5);
}

.mobile-nav.active .mobile-nav-drawer {
    transform: translateX(0);
}

/* Swipe indicator - enhanced visibility */
.mobile-nav-swipe-indicator {
    padding: 1rem 0 0.5rem;
    display: flex;
    justify-content: center;
}

.swipe-bar {
    width: 48px;
    height: 5px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-nav-drawer:active .swipe-bar {
    transform: scaleX(1.2);
}

/* Header - clean with more space */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.mobile-nav-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.mobile-nav-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.mobile-nav-close:active {
    transform: scale(0.9);
    background: var(--primary);
    color: #fff;
}

/* Navigation list - spacious design */
.mobile-nav-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-list li {
    position: relative;
}

/* Each menu item - larger touch target */
.mobile-nav-list a {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    position: relative;
}

/* Icon container - refined */
.mobile-nav-list a .nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--primary);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

/* Active & Current states */
.mobile-nav-list a:active,
.mobile-nav-list a.current {
    background: rgba(99, 102, 241, 0.08);
    border-left-color: var(--primary);
}

.mobile-nav-list a:active .nav-icon,
.mobile-nav-list a.current .nav-icon {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.05);
}

/* Tap feedback */
.mobile-nav-list a.tapped {
    background: rgba(99, 102, 241, 0.15);
    transform: scale(0.98);
}

.mobile-nav-list a.tapped .nav-icon {
    transform: scale(0.9);
}

/* CTA section - breathing room */
.mobile-nav-cta {
    padding: 1.75rem 1.5rem;
    border-top: 1px solid var(--bg-tertiary);
    background: var(--bg-secondary);
}

.mobile-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.1rem 1.5rem;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.mobile-contact-btn:active {
    transform: scale(0.97);
    opacity: 0.95;
}

/* Footer hint - subtle */
.mobile-nav-footer {
    padding: 1rem 1rem 1.5rem;
    text-align: center;
    background: var(--bg-secondary);
}

.mobile-nav-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mobile-nav-footer p::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--text-muted);
    opacity: 0.5;
}

.mobile-nav-footer p::after {
    content: '→';
    opacity: 0.5;
    animation: swipeHint 1.5s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(5px); opacity: 1; }
}

/* ===== Access Counter (removed) ===== */

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(244, 114, 182, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

/* Text Morph Container */
.text-morph-container {
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.morph-text {
    display: inline-block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: morphTextGlow 3s ease-in-out infinite;
}

@keyframes morphTextGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.8));
    }
}

.hero-tagline {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

[data-theme="dark"] .text-gradient {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-neon);
    border-color: var(--primary);
}

/* Medical re-entry highlight - special styling */
.highlight-item.highlight-medical {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: var(--accent);
    margin-top: 0.5rem;
}

.highlight-item.highlight-medical iconify-icon {
    color: var(--accent);
}

.highlight-item.highlight-medical:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}

.highlight-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

.highlight-item span {
    font-weight: 500;
    color: var(--text-primary);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

/* Hero Slider */
.hero-slider {
    width: 100%;
    max-width: 600px;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.hero-slider .swiper-slide {
    padding: 2rem;
}

.slide-content {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all var(--transition-normal);
}

.slide-content:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-neon);
}

.slide-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.slide-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.slide-content p {
    color: var(--text-secondary);
}

/* Medical re-entry text in slide */
.slide-content .slide-medical {
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(52, 211, 153, 0.3);
}

.hero-slider .swiper-pagination-bullet {
    background: var(--primary);
    opacity: 0.5;
}

.hero-slider .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--gradient-primary);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 円拡大エフェクト用の背景 */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 300%;
    height: 300%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-neon);
    color: var(--primary);
}

/* 矢印アイコンの色反転 */
.btn-primary iconify-icon,
.btn-primary .btn-arrow {
    transition: color 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover iconify-icon,
.btn-primary:hover .btn-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 左から右に色が切り替わるエフェクト */
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    color: #fff;
    border-color: transparent;
}

.btn-secondary iconify-icon,
.btn-secondary .btn-arrow {
    transition: color 0.3s ease, transform 0.3s ease;
}

.btn-secondary:hover iconify-icon,
.btn-secondary:hover .btn-arrow {
    color: #fff;
    transform: translateX(4px);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Button Animation - シャインエフェクト */
.btn-animated {
    position: relative;
    overflow: hidden;
}

.btn-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-animated:hover::after {
    left: 100%;
}

/* ===== Section Titles ===== */
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.title-decoration {
    color: var(--primary);
    margin: 0 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    font-size: 1.05rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .nav-3d {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-nav {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 1rem;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .access-counter {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem;
        font-size: 0.75rem;
    }
    
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-highlights {
        flex-direction: column;
    }
    
    .highlight-item {
        width: 100%;
        justify-content: center;
    }
    
    /* Section spacing for mobile */
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        padding: 0 0.5rem;
    }
    
    .section-subtitle {
        margin-bottom: 2.5rem;
        padding: 0 1rem;
        font-size: 0.95rem;
    }
    
    /* Container padding for mobile */
    .container {
        padding: 0 1.25rem;
    }
    
    /* ===== Mobile Tagline Adjustments ===== */
    /* ライトモード タグライン（モバイル） */
    [data-theme="light"] .hero-tagline-light {
        font-size: clamp(1.1rem, 5vw, 1.6rem);
        line-height: 1.6;
        padding: 0 0.5rem;
    }
    
    .light-tagline-highlight::after {
        height: 1.5px;
        bottom: -1px;
    }
    
    .light-tagline-accent::before {
        height: 1px;
        bottom: -3px;
    }
    
    /* ダークモード タグライン（モバイル） */
    [data-theme="dark"] .hero-tagline-dark {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
        letter-spacing: 0.1em;
    }
    
    .dark-tagline-switcher {
        min-height: 2.5rem;
    }
    
    .dark-tagline-second {
        font-size: clamp(1rem, 4.5vw, 1.5rem);
    }
    
    .tagline-highlight-animate::before {
        font-size: 0.8rem;
        top: -12px;
        right: -18px;
    }
    
    .tagline-highlight-animate::after {
        height: 1.5px;
        bottom: -3px;
    }
    
    .tagline-second-highlight::after {
        height: 1px;
        bottom: -2px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    /* ライトモード タグライン（小画面） */
    [data-theme="light"] .hero-tagline-light {
        font-size: clamp(0.95rem, 5vw, 1.3rem);
    }
    
    /* ダークモード タグライン（小画面） */
    [data-theme="dark"] .hero-tagline-dark {
        font-size: clamp(1rem, 5vw, 1.4rem);
        letter-spacing: 0.08em;
    }
    
    .dark-tagline-second {
        font-size: clamp(0.85rem, 4vw, 1.2rem);
    }
    
    .tagline-highlight-animate::before {
        display: none;
    }
}

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