/* ========================================
   Fukui-D | Jurassic Digital Museum
   Main Stylesheet
======================================== */

:root {
  --bg-deep: #050608;
  --bg-alt: #0b0e12;
  --fg-light: #f5f7fb;
  --accent-blue: #00b4ec;
  --muted: #9ea4b4;
  --border: #242936;
}

/* ========== リセット & 基本設定 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--bg-deep);
  color: var(--fg-light);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #5de6ff;
}

/* ========== D-GATE Container ========== */
#d-gate-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-deep);
}

#d-gate-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ========== Overlay UI ========== */
.gate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  padding: 1rem;
}

/* ロゴ */
.gate-logo {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(0, 180, 236, 0.6);
  animation: fadeInDown 1.2s ease-out;
}

.logo-main {
  color: var(--fg-light);
}

.logo-d {
  color: var(--accent-blue);
  padding: 4px 12px;
  border: 2px solid rgba(0, 180, 236, 0.4);
  border-radius: 8px;
  background: radial-gradient(circle at 30% 0, rgba(0, 180, 236, 0.15), transparent);
  box-shadow: 0 0 20px rgba(0, 180, 236, 0.3);
}

/* タグライン */
.gate-tagline {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  animation: fadeInUp 1.4s ease-out 0.3s backwards;
  max-width: 600px;
}

/* 日付 */
.gate-date {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
  animation: fadeInUp 1.6s ease-out 0.5s backwards;
}

/* Enter ボタン */
.btn-enter {
  pointer-events: all;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 600;
  color: #020308;
  background: linear-gradient(135deg, #00b4ec, #5de6ff);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(0, 180, 236, 0.5);
  transition: all 0.3s ease;
  animation: fadeInUp 1.8s ease-out 0.7s backwards;
}

.btn-enter:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(0, 180, 236, 0.8);
}

.btn-enter:active {
  transform: translateY(0);
}

/* ローディングインジケーター */
.loading-indicator {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 180, 236, 0.2);
  border-top-color: #00b4ec;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-indicator p {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== レスポンシブ ========== */
@media (max-width: 768px) {
  .gate-logo {
    flex-direction: column;
    gap: 0.2em;
    align-items: center;
  }
  
  .gate-tagline {
    font-size: 0.95rem;
    padding: 0 1rem;
  }
  
  .btn-enter {
    padding: 10px 24px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .gate-logo {
    font-size: 1.8rem;
  }
  
  .logo-d {
    padding: 3px 8px;
  }
  
  .gate-tagline {
    font-size: 0.85rem;
  }
  
  .gate-date {
    font-size: 0.75rem;
  }
}

/* ========== ユーティリティ ========== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ========== フッター(共通) ========== */
footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at bottom, #161a22, #050608);
}

footer a {
  color: var(--accent-blue);
  margin: 0 0.5rem;
}

footer a:hover {
  text-decoration: underline;
}
