@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@200;400;700&family=Noto+Sans+JP:wght@300;400;500;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --color-jp-charcoal: #1c1d1f;
  --color-jp-paper: #fcfbfa;
  --color-jp-warm-gray: #f4f1eb;
  --color-sakura: #ffb7c5;
  --color-sakura-dark: #e593a4;
  --color-tsubaki: #b22222;
  --color-macha: #6e8e5d;
  --color-macha-dark: #4b663e;
  --color-aizome: #1b2d42;
  --color-aizome-light: #526c8a;
  --color-tatami: #e8e1cf;
  --color-sumi: #2b2b2b;
}

body {
  font-family: var(--font-sans);
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.light .glass-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px) saturate(100%);
  -webkit-backdrop-filter: blur(12px) saturate(100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px 0 rgba(142, 114, 91, 0.08);
}

.glass-card-focus {
  background: rgba(12, 15, 20, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.light .glass-card-focus {
  background: rgba(253, 251, 247, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(132, 120, 105, 0.15);
}

/* Breath Animation */
@keyframes breathing {
  0%, 100% {
    transform: scale(1);
    opacity: 0.25;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.45;
  }
}

.breath-ring {
  animation: breathing 4s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 120, 0.25);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 120, 120, 0.45);
}

/* Audio Player Animations */
@keyframes barWave {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}
.audio-bar {
  width: 2px;
  background-color: currentColor;
  height: 4px;
  border-radius: 999px;
  animation: barWave 1s ease-in-out infinite;
}
.audio-bar:nth-child(2) { animation-delay: 0.15s; }
.audio-bar:nth-child(3) { animation-delay: 0.3s; }
.audio-bar:nth-child(4) { animation-delay: 0.45s; }
.audio-bar:nth-child(5) { animation-delay: 0.2s; }

/* Custom Range Inputs */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(120, 120, 120, 0.2);
  border-radius: 999px;
  height: 6px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  cursor: pointer;
  transition: transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Theme Accents (Color Presets) */
.accent-cherry {
  --accent-color: #ff6b8b;
  --accent-color-hover: #ff4772;
}
.accent-matcha {
  --accent-color: #7fa16f;
  --accent-color-hover: #678b56;
}
.accent-indigo {
  --accent-color: #5c7cfa;
  --accent-color-hover: #3b5bdb;
}
.accent-kobicha {
  --accent-color: #bfa98a;
  --accent-color-hover: #9c8567;
}

/* Modal Transitions */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-container {
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

/* Fullscreen Utilities */
.focus-active .hide-on-focus {
  display: none !important;
}

.focus-active #pomodoro-card {
  transform: scale(1.08);
  box-shadow: 0 20px 80px rgba(0,0,0,0.65);
}

.focus-active .focus-center-mode {
  transform: scale(1.06);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrollbar and custom utilities */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Background image transitions */
#bg-overlay {
  transition: opacity 1s ease-in-out;
}
