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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #667eea 75%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.7);
    /* 時間帯別グラデーション - 実際の空の色 */
    --dawn-gradient: radial-gradient(ellipse at bottom, #ff9a56 0%, #ff6b6b 30%, #4ecdc4 70%, #45b7d1 100%); /* 朝焼け：オレンジ→ピンク→水色 */
    --morning-gradient: radial-gradient(ellipse at bottom, #87ceeb 0%, #98d8e8 50%, #b8e6ff 100%); /* 朝：明るい空色 */
    --noon-gradient: radial-gradient(ellipse at bottom, #87ceeb 0%, #4da6d9 50%, #2e86ab 100%); /* 昼：青空 */
    --afternoon-gradient: radial-gradient(ellipse at bottom, #ffd89b 0%, #19547b 50%, #1e3a8a 100%); /* 午後：薄い黄色→青 */
    --sunset-gradient: radial-gradient(ellipse at bottom, #ff9500 0%, #ff5722 30%, #e91e63 60%, #3f51b5 100%); /* 夕焼け：オレンジ→赤→紫→紺 */
    --twilight-gradient: radial-gradient(ellipse at bottom, #667eea 0%, #764ba2 50%, #2c1810 100%); /* 薄暮：紫→濃い紫→黒 */
    --night-gradient: radial-gradient(ellipse at bottom, #1a1a2e 0%, #16213e 50%, #0f0c29 100%); /* 夜：濃い紺→黒 */
    --midnight-gradient: radial-gradient(ellipse at bottom, #000428 0%, #004e92 30%, #000000 100%); /* 深夜：黒→濃い青→真っ黒 */
}

html {
    height: 100%;
    overflow: hidden; /* htmlレベルでも縦横スクロールを完全に禁止 */
    width: 100%;
}

body {
    height: 100vh;
    background: var(--primary-gradient);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden; /* 縦横両方のスクロールを完全に無効化 */
    cursor: none;
    transition: background 3s ease;
    width: 100%;
    max-width: 100vw; /* 最大幅を制限 */
    position: relative;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    perspective: 1000px;
}

/* カード表示時のスクロール禁止 (既に全体で無効化済み) */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* 星空コンテナ */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    contain: layout style paint; /* パフォーマンス向上 */
}

/* 星空エフェクト */
#stars {
    width: 1px;
    height: 1px;
    background: transparent;
    animation: animStar 600s linear infinite;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    transform: translateZ(0); /* ハードウェアアクセラレーション */
    will-change: transform; /* パフォーマンス最適化 */
}

#stars:after {
    content: " ";
    position: absolute;
    left: 200vw; /* 相対値でデバイスに合わせる */
    width: 1px;
    height: 1px;
    background: transparent;
}

#stars2 {
    width: 2px;
    height: 2px;
    background: transparent;
    animation: animStar 800s linear infinite;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    transform: translateZ(0);
    will-change: transform;
}

#stars2:after {
    content: " ";
    position: absolute;
    left: 200vw;
    width: 2px;
    height: 2px;
    background: transparent;
}

#stars3 {
    width: 3px;
    height: 3px;
    background: transparent;
    animation: animStar 1000s linear infinite;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    transform: translateZ(0);
    will-change: transform;
}

#stars3:after {
    content: " ";
    position: absolute;
    left: 200vw;
    width: 3px;
    height: 3px;
    background: transparent;
}

@keyframes animStar {
    from {
        transform: translateX(0px) translateZ(0);
    }
    to {
        transform: translateX(-100vw) translateZ(0); /* 相対値で異なるデバイスに対応 */
    }
}

/* モバイルでは通常のカーソル */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }
    .cursor,
    .cursor-follower,
    .gradient-trail,
    .particle {
        display: none !important;
    }
    
    /* タッチデバイス用のカードホバー効果を無効化 */
    .interactive-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* タッチ用のアクティブ状態 */
    .interactive-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

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

/* カスタムカーソル */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    will-change: transform;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    will-change: transform;
}

/* パーティクル追尾システム */
.particle {
    position: fixed;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 182, 193, 0.6) 30%, 
        rgba(173, 216, 230, 0.4) 60%, 
        transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    will-change: transform, opacity;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.particle:nth-child(3n) {
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, 
        rgba(255, 182, 193, 0.8) 0%, 
        rgba(173, 216, 230, 0.5) 50%, 
        transparent 100%);
}

.particle:nth-child(5n) {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, 
        rgba(173, 216, 230, 0.7) 0%, 
        rgba(255, 182, 193, 0.4) 40%, 
        transparent 80%);
}

/* グラデーション追尾 */
.gradient-trail {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, 
        rgba(255,255,255,0.15) 0%, 
        rgba(255,182,193,0.1) 30%, 
        rgba(173,216,230,0.08) 60%, 
        transparent 80%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: blur(25px);
    animation: trailPulse 3s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes trailPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.2); opacity: 0.8; }
}

/* メインコンテンツ */
.container {
    position: relative;
    z-index: 10;
    flex: 1; /* 余ったスペースを占有 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 2rem 2rem 2rem; /* 下のパディングを減らした */
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.title {
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    position: relative;
    z-index: 15;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 200;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
    position: relative;
    z-index: 15;
}

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

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
    position: relative;
    z-index: 15;
}

.interactive-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 3rem;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 15;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255,255,255,0.1), 
        rgba(255,182,193,0.08),
        rgba(173,216,230,0.06),
        transparent);
    background-size: 200% 200%;
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    animation: shimmer 4s ease-in-out infinite;
}

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

.interactive-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.company-info-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 3rem;
    margin-top: 2rem;
    max-width: 600px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
    z-index: 15;
}

.company-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255,255,255,0.1), 
        rgba(255,182,193,0.08),
        rgba(173,216,230,0.06),
        transparent);
    background-size: 200% 200%;
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    animation: shimmer 4s ease-in-out infinite;
}

.company-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.company-details {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    text-align: left;
}

.company-details p {
    margin-bottom: 0.8rem;
}

.company-details strong {
    color: var(--text-primary);
    font-weight: 600;
    display: inline-block;
    min-width: 100px;
}

/* 波形エフェクト */
.wave {
    position: fixed;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    animation: wave-pulse 2s infinite;
}

@keyframes wave-pulse {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* お問い合わせボタン */
.contact-button {
    margin-top: 2rem;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
    position: relative;
    z-index: 15;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

/* メインコンテンツのモバイル対応 */
@media (max-width: 768px) {
    html, body {
        overflow: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        height: 100vh !important;
    }
    
    .container {
        justify-content: center;
        padding: 1rem;
        flex: 1;
        max-width: 100vw;
        box-sizing: border-box;
        height: 100vh;
    }
    
    .title {
        font-size: clamp(1.8rem, 8vw, 3rem);
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: clamp(1rem, 4vw, 1.5rem);
        margin-bottom: 2rem;
    }
    
    .cards-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }
    
    .interactive-card, .company-info-card {
        padding: 1.5rem;
        min-width: auto;
        width: calc(100% - 1rem);
        max-width: 400px;
        box-sizing: border-box;
    }
    
    .company-info-card {
        margin-top: 1rem;
    }

    .company-details strong {
        display: block;
        margin-bottom: 0.3rem;
        font-size: 0.9rem;
    }
    
    .company-details p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .time-notice {
        margin-top: 1.5rem;
        padding: 1rem;
    }
    
    .time-notice p {
        font-size: 0.6rem;
    }
    
    .footer {
        position: relative;
        margin-top: 0.5rem;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        padding: 0.5rem 1rem;
    }
    
    .footer p {
        font-size: 0.75rem;
    }
}

/* 時間変化の案内 */
.time-notice {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    max-width: 600px;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease 1s forwards;
    position: relative;
    z-index: 15;
}

.time-notice p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    margin: 0;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* フッター（コピーライト） */
.footer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    margin-top: auto; /* フレックスボックス内で自動的に下に配置 */
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    flex-shrink: 0; /* フッターが縮まないように */
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
    letter-spacing: 0.5px;
}

/* アクセシビリティ向上 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* リンクのフォーカス状態 */
a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}

/* スキップリンク */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0 0 10px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    z-index: 9999;
}

/* スライドエフェクト */
.main-view {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-view.slide-left {
    transform: translateX(-70%);
}

.main-view.slide-right {
    transform: translateX(70%);
}

/* 大きなカード - スライドで表示 */
.big-card {
    position: fixed;
    width: 70%;
    height: 90vh;
    top: 5vh;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    overflow-y: auto;
    padding: 3rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /* スクロールバーをカスタマイズ */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Webkitブラウザ用スクロールバー */
.big-card::-webkit-scrollbar {
    width: 6px;
}

.big-card::-webkit-scrollbar-track {
    background: transparent;
}

.big-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.big-card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.big-card.left-card {
    right: 10%;
}

.big-card.right-card {
    left: 10%;
}

.big-card.show {
    opacity: 1;
    visibility: visible;
}

.close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
}

.big-card h3 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
}

.detail-content {
    color: var(--text-secondary);
    line-height: 1.8;
    width: 100%;
    font-size: 1.1rem;
}

.detail-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-content li {
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    padding-left: 3rem;
}

.detail-content li::before {
    content: '✓';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.3rem;
}

.detail-content li:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.detail-content p {
    font-size: 1.2rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    border-left: 5px solid #4ecdc4;
    margin-top: 2rem;
    text-align: center;
}

/* タブレット対応 */
@media (max-width: 1024px) {
    .big-card {
        width: 80%;
        padding: 2.5rem;
    }
    
    .big-card.left-card {
        right: 5%;
    }
    
    .big-card.right-card {
        left: 5%;
    }
}

/* スマートフォン対応 */
@media (max-width: 768px) {
    .main-view.slide-left {
        transform: translateX(-100%);
    }
    
    .main-view.slide-right {
        transform: translateX(100%);
    }
    
    .big-card {
        width: 100%;
        height: 100vh;
        top: 0;
        padding: 1.5rem;
        border-radius: 0;
        right: 0 !important;
        left: 0 !important;
    }
    
    .big-card.left-card,
    .big-card.right-card {
        right: 0;
        left: 0;
    }
    
    .big-card h3 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .detail-content {
        font-size: 1rem;
    }
    
    .detail-content ul {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .detail-content li {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .detail-content p {
        font-size: 1rem;
        padding: 1.5rem;
    }
    
    .close-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* 小さなスマートフォン対応 */
@media (max-width: 480px) {
    .big-card {
        padding: 1rem;
    }
    
    .big-card h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .detail-content li {
        padding: 0.8rem;
        font-size: 0.85rem;
        padding-left: 2.5rem;
    }
    
    .detail-content li::before {
        left: 0.8rem;
        font-size: 1.1rem;
    }
    
    .detail-content p {
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}