@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;600&family=Quicksand:wght@300;400;500&display=swap');

:root {
  --bg-base: #030a18; /* Deep navy */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-glow: rgba(56, 189, 248, 0.4);
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: 'Noto Serif JP', serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.font-en {
  font-family: 'Quicksand', sans-serif;
}

/* --- Water Paint Gradient Background --- */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-color: #030818; /* Deep navy core */
  overflow: hidden;
}

.ambient-bg::before,
.ambient-bg::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  filter: blur(100px);
  opacity: 0.6;
  pointer-events: none;
}

.ambient-bg::before {
  /* Gently mixed soft blue and indigo */
  background: radial-gradient(circle at 40% 40%, rgba(30, 58, 138, 0.6) 0%, transparent 40%),
              radial-gradient(circle at 60% 60%, rgba(12, 74, 110, 0.5) 0%, transparent 45%);
  animation: stirPaint1 30s infinite ease-in-out alternate;
}

.ambient-bg::after {
  /* Gently mixed cyan and dark violet */
  background: radial-gradient(circle at 70% 30%, rgba(49, 46, 129, 0.7) 0%, transparent 50%),
              radial-gradient(circle at 30% 70%, rgba(20, 184, 166, 0.25) 0%, transparent 45%);
  animation: stirPaint2 40s infinite ease-in-out alternate;
  mix-blend-mode: screen;
}

@keyframes stirPaint1 {
  0% { transform: translateX(-5%) translateY(-5%) rotate(0deg) scale(1); }
  50% { transform: translateX(8%) translateY(8%) rotate(35deg) scale(1.1); }
  100% { transform: translateX(0%) translateY(-5%) rotate(70deg) scale(1); }
}

@keyframes stirPaint2 {
  0% { transform: translateX(5%) translateY(10%) rotate(0deg) scale(1.1); }
  50% { transform: translateX(-8%) translateY(-5%) rotate(-25deg) scale(0.95); }
  100% { transform: translateX(5%) translateY(-10%) rotate(-50deg) scale(1.1); }
}

/* --- Slepazen タイトルアニメーション --- */
.title-slepazen {
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  background: linear-gradient(
    270deg, 
    #f8fafc 0%, 
    #bae6fd 25%, 
    #93c5fd 50%, 
    #c4b5fd 75%, 
    #f8fafc 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradientDrift 10s linear infinite;
  text-shadow: 0 0 30px rgba(147, 197, 253, 0.4);
  position: relative;
  display: inline-block;
}

@keyframes gradientDrift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Tranquil Chill Sleep Glassmorphism --- */
.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.03);
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.interactive-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.interactive-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.08) 50%, transparent 80%);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(147, 197, 253, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.15);
}

.interactive-card:hover::after {
  transform: translateX(150%) skewX(-15deg);
}

.card-arrow {
  opacity: 0.3;
  transition: all 0.3s ease;
}

.interactive-card:hover .card-arrow {
  opacity: 1;
  color: #93c5fd;
  transform: translateX(6px);
}

/* アイコンアニメーション */
.icon-power { animation: pulseOpacity 4s infinite alternate; }
.icon-cloud { animation: float 6s infinite ease-in-out; }
.icon-orbit { animation: spinSlow 30s linear infinite; }
.icon-hexagon { animation: crystalGlow 5s infinite alternate; }
.icon-database { animation: dataBlink 6s infinite alternate; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes pulseOpacity {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}
@keyframes crystalGlow {
  0% { filter: drop-shadow(0 0 2px rgba(125, 211, 252, 0.4)); transform: scale(0.98); }
  100% { filter: drop-shadow(0 0 10px rgba(125, 211, 252, 0.8)); transform: scale(1.02); }
}
@keyframes dataBlink {
  0%, 40%, 60%, 100% { opacity: 1; filter: saturate(1); }
  50% { opacity: 0.5; filter: saturate(0.5); }
}

.time-input {
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-family: 'Quicksand', sans-serif;
  font-weight: 300;
  text-align: center;
  outline: none;
  cursor: pointer;
  width: 100%;
  max-width: 280px;
}

.time-input::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.5);
  cursor: pointer;
  transition: opacity 0.3s;
  padding: 8px;
}

.toggle-container {
  position: relative;
  /* Subtly matches the glass look */
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px;
  display: flex;
  width: 100%;
  max-width: 320px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.toggle-btn {
  position: relative;
  z-index: 1;
  padding: 10px 12px;
  border-radius: 999px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  user-select: none;
}

.toggle-btn.active {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 15px rgba(255,255,255,0.1), inset 0 0 5px rgba(255,255,255,0.2);
}

/* --- Optimal Card Highlight --- */
.interactive-card.optimal-card {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(56, 189, 248, 0.05);
}

.interactive-card.optimal-card:hover {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.2);
}

.modal-backdrop {
  background: rgba(2, 6, 23, 0.8); /* Darker slate/navy background */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.fade-switch-enter {
  animation: fadeSwitchIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeSwitchIn {
  0% { opacity: 0; transform: translateY(8px); filter: blur(5px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.list-animate-enter {
  opacity: 0;
  animation: fadeInUpList 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUpList {
  0% { opacity: 0; transform: translateY(30px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

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

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