@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --glass-blur: blur(36px) saturate(180%) brightness(1.08);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --drag-x: 0px;
  --progress: 0;
  --icon-morph: 0;
}

.main-panel.light-mode {
  --bg-base: #f7f6fa;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --orb-1: #ffb7b2;
  --orb-2: #e2f0cb;
  --orb-3: #b5ead7;
  --orb-4: #c7ceea;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border-top: rgba(255, 255, 255, 0.95);
  --glass-border-left: rgba(255, 255, 255, 0.85);
  --glass-border-sub: rgba(255, 255, 255, 0.4);
  --glass-shadow:
    0 20px 40px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  --glare-gradient: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.2) 30%,
    rgba(255, 255, 255, 0) 50%
  );
  --accent-color: #ff9a76;
}

.main-panel.dark-mode {
  --bg-base: #0a0a0c;
  --text-main: #f5f5f7;
  --text-muted: #86868b;
  --orb-1: #3a1c71;
  --orb-2: #d76d77;
  --orb-3: #283e51;
  --orb-4: #4b79a1;
  --glass-bg: rgba(25, 25, 30, 0.45);
  --glass-border-top: rgba(255, 255, 255, 0.15);
  --glass-border-left: rgba(255, 255, 255, 0.1);
  --glass-border-sub: rgba(0, 0, 0, 0.3);
  --glass-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
  --glare-gradient: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0) 50%
  );
  --accent-color: #a881af;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #18181b 0%, #09090b 100%);
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-mockup {
  position: relative;
  width: 375px;
  height: 812px;
  background-color: #000;
  border-radius: 45px;
  box-shadow:
    0 0 0 12px #111,
    0 0 0 14px #222,
    0 30px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  flex-shrink: 0;
  transform: scale(var(--device-scale, 1));
  transform-origin: center center;
}

.device-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 30px;
  background: #111;
  border-radius: 0 0 20px 20px;
  z-index: 999;
}

.app-container {
  position: relative;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

.sidebar {
  position: absolute;
  top: 0;
  right: 0;
  width: 80%;
  height: 100%;
  padding: 90px 30px;
  box-sizing: border-box;
  color: white;
  z-index: 1;
  background-color: #000;
}

.sidebar h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: 1px;
  color: #fff;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  font-size: 16px;
  font-weight: 300;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #888;
  display: flex;
  justify-content: space-between;
}

.theme-toggle {
  position: absolute;
  bottom: 50px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(40, 40, 45, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  z-index: 10;
  transform: scale(calc(0.5 + 0.5 * var(--progress)));
  opacity: var(--progress);
  transition: transform 0.2s var(--ease-spring);
}

.icon-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.morph-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  overflow: visible;
}

.moon-shadow {
  cx: calc(16px + (var(--icon-morph) * 12px));
  cy: calc(8px - (var(--icon-morph) * 12px));
  transition: all 0.6s var(--ease-spring);
}

.core {
  transform-origin: 12px 12px;
  transform: scale(calc(1 - 0.15 * var(--icon-morph)));
  transition: transform 0.6s var(--ease-spring);
}

.rays {
  transform-origin: 12px 12px;
  transform: scale(var(--icon-morph)) rotate(calc(var(--icon-morph) * 90deg));
  opacity: var(--icon-morph);
  transition:
    transform 0.6s var(--ease-spring),
    opacity 0.4s ease;
}

.main-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background-color: var(--bg-base);
  overflow: hidden;
  touch-action: none;

  transform: translateX(var(--drag-x)) scale(calc(1 - 0.1 * var(--progress)));
  border-radius: calc(45px * var(--progress));
  box-shadow: calc(var(--progress) * -20px) 0px calc(var(--progress) * 40px)
    rgba(0, 0, 0, 0.8);
  transform-origin: center right;

  transition:
    transform 0.5s var(--ease-spring),
    border-radius 0.5s var(--ease-spring),
    box-shadow 0.5s ease,
    background-color 0.8s ease;
}

.main-panel.is-dragging {
  transition: background-color 0.8s ease !important;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 12s ease-in-out infinite alternate;
  transition:
    background-color 0.8s ease,
    opacity 0.8s ease;
}

.bg-orb.o1 {
  width: 300px;
  height: 300px;
  background-color: var(--orb-1);
  top: -5%;
  left: -15%;
  opacity: 0.5;
}

.bg-orb.o2 {
  width: 350px;
  height: 350px;
  background-color: var(--orb-2);
  top: 10%;
  right: -25%;
  opacity: 0.4;
  animation-delay: -3s;
  animation-duration: 15s;
}

.bg-orb.o3 {
  width: 250px;
  height: 250px;
  background-color: var(--orb-3);
  bottom: 5%;
  left: 10%;
  opacity: 0.4;
  animation-delay: -5s;
  animation-duration: 18s;
}

.bg-orb.o4 {
  width: 280px;
  height: 280px;
  background-color: var(--orb-4);
  bottom: -10%;
  right: -10%;
  opacity: 0.3;
  animation-delay: -2s;
  animation-duration: 11s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -30px) scale(1.05);
  }
  100% {
    transform: translate(-15px, 15px) scale(0.95);
  }
}

.noise-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.3;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.content-wrapper {
  position: relative;
  z-index: 5;
  padding: 70px 24px 0 24px;
  height: 100%;
  box-sizing: border-box;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.content-wrapper.fade-out {
  opacity: 0;
  transform: translateY(15px) scale(0.98);
}

.content-header {
  margin-bottom: 30px;
}

.greeting {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.user-name {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.5px;
}

.glass-panel {
  position: relative;
  background-color: var(--glass-bg);
  border-top: 1px solid var(--glass-border-top);
  border-left: 1px solid var(--glass-border-left);
  border-right: 1px solid var(--glass-border-sub);
  border-bottom: 1px solid var(--glass-border-sub);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  transition:
    background-color 0.1s,
    border-color 0.1s,
    box-shadow 0.1s;
  overflow: hidden;
}

.glare-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: var(--glare-gradient);
  pointer-events: none;
  z-index: 1;
}

.hero-card {
  padding: 30px 24px;
  border-radius: 32px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-card span {
  position: relative;
  z-index: 2;
}

.hero-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.hero-value {
  font-size: 64px;
  font-weight: 300;
  color: var(--text-main);
  margin-bottom: 5px;
  line-height: 1;
}

.hero-sub {
  font-size: 14px;
  font-weight: 400;
  color: var(--accent-color);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-left: 8px;
}

.action-card {
  padding: 20px;
  border-radius: 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.card-icon {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  font-size: 20px;
}

.card-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.card-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.bottom-action-bar {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  padding: 18px 24px;
  border-radius: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-icon {
  position: relative;
  z-index: 2;
  cursor: pointer;
  width: 24px;
  height: 24px;
  stroke: var(--text-muted);
  transition:
    stroke 0.3s,
    transform 0.2s;
}

.nav-icon.active {
  stroke: var(--text-main);
}

.nav-icon:hover {
  transform: translateY(-3px);
  stroke: var(--text-main);
}
