/* ==========================================================================
   Notchy - Clean, Playful & Premium Aesthetics ("Playful Precision")
   Balanced warmth, generous whitespace, sleek Apple/Raycast craft.
   No sterile AI slop, no carnival clutter.
   ========================================================================== */

:root {
  --spring: cubic-bezier(0.32, 1.25, 0.45, 1);
  --snappy: cubic-bezier(0.16, 1, 0.3, 1);
  
  --bg-deep: #0b0c13;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.055);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  
  --accent-violet: #818cf8;
  --accent-pink: #f472b6;
  --accent-mint: #34d399;
  --accent-amber: #fbbf24;
  
  --notch-e: 10px;
  --sim-tint: 129 140 248;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: #f1f5f9;
  color-scheme: dark;
}

/* Tasteful Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0b0c13;
}
::-webkit-scrollbar-thumb {
  background: #272738;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3e3e56;
}

/* Subtle, Warm Twilight Mesh */
.bg-warm-twilight {
  background-color: #0b0c13;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(129, 140, 248, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 30% at 80% 60%, rgba(244, 114, 182, 0.08), transparent 60%);
  background-attachment: fixed;
}

/* Refined Premium Glass Card */
.premium-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  transition: all 0.3s var(--snappy);
}

.premium-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 20px -5px rgba(129, 140, 248, 0.1);
}

/* Segmented Control Pill */
.segmented-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
}

.segmented-btn {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.segmented-btn:hover {
  color: #f8fafc;
}

.segmented-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   INTERACTIVE SIMULATOR (BEZEL & NOTCH)
   ========================================================================== */

.sim-bezel {
  position: relative;
  background: #06070a;
  border-top: 2px solid #1a1b26;
  box-shadow: 
    0 25px 70px -15px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 35px -5px rgba(129, 140, 248, 0.12);
  border-radius: 18px 18px 0 0;
  overflow: visible;
}

.sim-screen-content {
  background: radial-gradient(circle at 50% 20%, #131420 0%, #0a0b12 100%);
  border-radius: 14px 14px 0 0;
  min-height: 390px;
  position: relative;
  overflow: hidden;
}

/* Notch Island Element with authentic SVG ears */
.sim-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #000000;
  color: #fff;
  z-index: 40;
  user-select: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: 
    width 0.5s var(--spring),
    height 0.5s var(--spring),
    border-radius 0.35s ease,
    background-color 0.3s ease,
    box-shadow 0.35s ease;
}

/* Authentic Ear Fillets */
.sim-notch::before,
.sim-notch::after {
  content: "";
  position: absolute;
  top: 0;
  width: calc(var(--notch-e) + 1px);
  height: var(--notch-e);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  transition: width 0.5s var(--spring), height 0.5s var(--spring);
}

.sim-notch::before {
  right: calc(100% - 1px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 101 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0 A100 100 0 0 1 100 100 L101 100 L101 0 Z' fill='%23000'/%3E%3C/svg%3E");
}

.sim-notch::after {
  left: calc(100% - 1px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 101 100' preserveAspectRatio='none'%3E%3Cpath d='M101 0 A100 100 0 0 0 1 100 L0 100 L0 0 Z' fill='%23000'/%3E%3C/svg%3E");
}

/* Ambient glow layer */
.sim-notch .sim-ambient {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.08), transparent);
  transition: opacity 0.35s ease, height 0.35s ease, background 0.35s ease;
}

.sim-notch.tinted .sim-ambient {
  height: 90%;
  background: linear-gradient(to top, rgb(var(--sim-tint) / 0.45), rgb(var(--sim-tint) / 0.1) 65%, transparent);
}

/* Modes Geometry */
.sim-notch.mode-eyes {
  width: 164px;
  height: 34px;
  border-radius: 0 0 17px 17px;
  --notch-e: 11px;
}

.sim-notch.mode-music {
  width: 430px;
  height: 148px;
  border-radius: 0 0 28px 28px;
  --notch-e: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px -5px rgba(244, 114, 182, 0.25);
}

.sim-notch.mode-lyrics {
  width: 520px;
  height: 148px;
  border-radius: 0 0 28px 28px;
  --notch-e: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px -5px rgba(129, 140, 248, 0.25);
}

.sim-notch.mode-network {
  width: 410px;
  height: 136px;
  border-radius: 0 0 26px 26px;
  --notch-e: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8), 0 0 25px -5px rgba(52, 211, 153, 0.2);
}

.sim-notch.mode-toast {
  width: 380px;
  height: 74px;
  border-radius: 0 0 22px 22px;
  --notch-e: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px -2px rgba(52, 211, 153, 0.25);
}

.sim-notch.mode-timer {
  width: 410px;
  height: 136px;
  border-radius: 0 0 26px 26px;
  --notch-e: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8), 0 0 25px -5px rgba(251, 191, 36, 0.2);
}

.sim-notch.mode-tucked {
  width: 90px;
  height: 6px;
  border-radius: 0 0 4px 4px;
  --notch-e: 4px;
  background: #34d399;
  box-shadow: 0 2px 12px rgba(52, 211, 153, 0.7);
}

/* Mascot Eyes */
.sim-eyes-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  height: 100%;
  transition: transform 0.2s var(--spring);
}

.sim-eye {
  width: 8.5px;
  height: 13px;
  background: #ffffff;
  border-radius: 4px;
  display: inline-block;
  transition: transform 0.15s ease, border-radius 0.18s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.sim-eye.blink {
  transform: scaleY(0.1) !important;
}

.sim-eyes-container.happy .sim-eye {
  width: 12px;
  height: 7px;
  border-radius: 12px 12px 0 0;
  background: #fde047;
}

.sim-eyes-container.hearts .sim-eye {
  width: 11px;
  height: 11px;
  background: #f472b6;
  border-radius: 50% 50% 0 0;
  transform: rotate(-45deg);
}

/* Equalizer Bars: Clean & Elegant */
.equalizer-bar {
  width: 3px;
  background: #818cf8;
  border-radius: 2px;
  animation: eq-subtle 0.8s ease-in-out infinite alternate;
}

.equalizer-bar:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.equalizer-bar:nth-child(2) { height: 18px; animation-delay: 0.25s; }
.equalizer-bar:nth-child(3) { height: 22px; animation-delay: 0.05s; }
.equalizer-bar:nth-child(4) { height: 14px; animation-delay: 0.3s; }

@keyframes eq-subtle {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

/* Rotating Vinyl */
.spin-vinyl {
  animation: vinyl-spin 4s linear infinite;
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* High-Converting Primary Button */
.btn-primary {
  background: #ffffff;
  color: #0b0c13;
  font-weight: 700;
  box-shadow: 0 4px 20px -2px rgba(255, 255, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.2s var(--snappy);
}

.btn-primary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -2px rgba(255, 255, 255, 0.35);
}

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

/* Secondary Ghost Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: #ffffff;
}

/* Bilingual Helpers */
body.lang-en [data-lang="id"] {
  display: none !important;
}

body.lang-id [data-lang="en"] {
  display: none !important;
}


/* ==========================================================================
   INTERACTIVE SIMULATOR EYE THEMES & CHARGING MODE
   ========================================================================== */

.sim-theme-btn {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
  cursor: pointer;
}
.sim-theme-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.sim-theme-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

/* Theme: Anime Sparkle ✨ */
.sim-eyes-container.theme-anime .sim-eye {
  position: relative;
}
.sim-eyes-container.theme-anime .sim-eye::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 1.5px;
  width: 3.8px;
  height: 3.8px;
  background: #ffffff;
  clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.95));
  animation: anime-glint 2.2s ease-in-out infinite alternate;
}
.sim-eyes-container.theme-anime .sim-eye::before {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.85;
}
@keyframes anime-glint {
  0% { transform: scale(0.75) rotate(0deg); opacity: 0.6; }
  50% { transform: scale(1.3) rotate(45deg); opacity: 1; }
  100% { transform: scale(0.85) rotate(90deg); opacity: 0.75; }
}

/* Theme: Retro Pixel 👾 */
.sim-eyes-container.theme-pixel .sim-eye {
  width: 8px;
  height: 12px;
  border-radius: 0 !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 6px 1px rgba(255, 255, 255, 0.5);
  image-rendering: pixelated;
}

/* Theme: Cat Eyes 🐱 */
.sim-eyes-container.theme-cat .sim-eye {
  width: 10px;
  height: 13px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 6px 1px rgba(255, 209, 102, 0.6);
  overflow: hidden;
  position: relative;
}
.sim-eyes-container.theme-cat .sim-eye::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + var(--sim-lx, 0px) * 0.28), -50%);
  width: 2.8px;
  height: 9.5px;
  border-radius: 50%;
  background: #0d0f17;
  transition: transform 0.15s ease;
}

/* Theme: Cartoon Pupil 👀 */
.sim-eyes-container.theme-cartoon .sim-eye {
  width: 10px;
  height: 13.5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.55);
  overflow: hidden;
  position: relative;
}
.sim-eyes-container.theme-cartoon .sim-eye::before {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 2.2px;
  height: 2.2px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.95;
  z-index: 3;
  pointer-events: none;
}
.sim-eyes-container.theme-cartoon .sim-eye::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5.4px;
  height: 6.4px;
  border-radius: 50%;
  background: #0f172a;
  transform: translate(calc(-50% + var(--sim-lx, 0px) * 0.35), calc(-50% + var(--sim-ly, 0px) * 0.25));
  transition: transform 0.15s ease;
  z-index: 2;
}

/* Charging Mode Geometry & Layer */
.sim-notch.mode-charging {
  width: 216px;
  height: 34px;
  border-radius: 0 0 17px 17px;
  --notch-e: 11px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px -2px rgba(52, 211, 153, 0.25);
}

.sim-charging-layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 14px;
}

.sim-charge-ring {
  width: 19px;
  height: 19px;
  transform: rotate(-90deg);
  flex-shrink: 0;
}
.sim-charge-ring circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2.2;
}
.sim-charge-ring .fill {
  stroke: #34d399;
  stroke-linecap: round;
}
.sim-charge-ring path {
  fill: #34d399;
  transform: rotate(90deg);
  transform-origin: 10px 10px;
}
.sim-charge-eyes {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-charge-eyes .sim-eye {
  animation: charging-energy 3s ease-in-out infinite alternate;
}
@keyframes charging-energy {
  0% { box-shadow: 0 0 6px 1px rgba(52, 211, 153, 0.55); }
  100% { box-shadow: 0 0 12px 3px rgba(52, 211, 153, 0.85); }
}
.sim-charge-time {
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  color: #e6edf3;
}
