:root {
  --bg: #08090a;
  --surface: #0f1318;
  --surface-elevated: #161b22;
  --border: #212833;
  --accent: #7058de;
  --accent-light: #9d8bf7;
  --green: #00e676;
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  padding: 0 20px;
}

.ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 350px;
  background: radial-gradient(circle, rgba(112, 88, 222, 0.22) 0%, rgba(8, 9, 10, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 60px auto 40px auto;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(112, 88, 222, 0.15);
  border: 1px solid rgba(112, 88, 222, 0.35);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent-light);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(180deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px auto;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 30px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(112, 88, 222, 0.35);
}

.btn-primary {
  background: linear-gradient(135deg, #7058de 0%, #583ec9 100%);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(112, 88, 222, 0.55);
}

.download-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.safe-badge {
  color: var(--green);
  font-weight: 500;
}

/* Demo Section */
.demo-section {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto 60px auto;
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.demo-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.demo-tab {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 18px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-light);
}

.phone-mockup {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 240px;
  background: #000;
  border: 2px solid #282f3c;
  border-radius: 36px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.phone-camera-hole {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 50%;
  z-index: 10;
}

/* Dynamic Island Capsule */
.island-capsule {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  min-height: 32px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  user-select: none;
}

.island-capsule.expanded {
  width: 320px;
  height: 160px;
  border-radius: 24px;
  padding: 16px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.island-content {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.island-content.visible {
  display: flex;
}

.island-capsule.expanded .island-content {
  display: none;
}

.island-center-gap {
  width: 24px;
  flex-shrink: 0;
}

/* Music Island Layout */
.music-left .album-thumb {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ff007f, #7928ca);
}

.music-right .eq-bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 16px;
}

.eq-bars .bar {
  width: 3px;
  border-radius: 2px;
  background: var(--green);
  animation: bounce 0.8s ease-in-out infinite alternate;
}

.bar-treble { height: 10px; animation-duration: 0.5s; background: var(--green); }
.bar-highmid { height: 14px; animation-duration: 0.7s; background: var(--accent-light); }
.bar-lowmid { height: 12px; animation-duration: 0.6s; background: var(--accent); }
.bar-bass { height: 16px; animation-duration: 0.9s; background: var(--green); }

@keyframes bounce {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

/* Timer Island Layout */
.timer-left {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.timer-right .pill-btn {
  background: #181d24;
  border: none;
  color: #fff;
  font-size: 0.65rem;
  border-radius: 10px;
  padding: 2px 6px;
  cursor: pointer;
}

/* Charging & Call Layouts */
.charge-left, .call-left {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
}

.charge-right, .call-right {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.call-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Expanded View Inside Island */
.island-expanded-panel {
  display: none;
  width: 100%;
  height: 100%;
}

.island-capsule.expanded .island-expanded-panel {
  display: flex;
  flex-direction: column;
}

.expanded-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.exp-badge {
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
}

.expanded-body h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
}

.expanded-body p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.expanded-actions {
  display: flex;
  gap: 8px;
}

.exp-btn {
  flex: 1;
  background: #181d24;
  border: 1px solid #282f3c;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.exp-btn-primary {
  background: var(--accent);
  border-color: var(--accent-light);
}

.demo-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 14px;
}

/* Features Grid */
.features {
  max-width: 960px;
  margin: 60px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(112, 88, 222, 0.4);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.feature-note {
  font-size: 0.75rem;
  color: var(--accent-light);
  background: rgba(112, 88, 222, 0.1);
  padding: 6px 12px;
  border-radius: 10px;
  display: inline-block;
}

/* Setup Guide */
.setup-guide {
  max-width: 800px;
  margin: 60px auto;
  text-align: center;
}

.setup-guide h2 {
  font-size: 1.8rem;
  margin-bottom: 30px;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 16px;
  text-align: left;
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 14px;
}

.step h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 60px;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: var(--accent-light);
  text-decoration: none;
}
