:root {
  --bg1: #050519;
  --bg2: #0f1636;
  --neon1: #00e0ff;
  --neon2: #7b4bff;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.07);
  --accent-shadow: 0 10px 30px rgba(0, 224, 255, 0.08);
}

/* Reset */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
}

html, body {
  height: 100%;
  margin: 0;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(0, 224, 255, 0.03), transparent 8%),
    radial-gradient(1000px 400px at 90% 90%, rgba(123, 75, 255, 0.03), transparent 8%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  color: #e8f6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Main Container */
.container {
  width: 540px;
  max-width: calc(100% - 40px);
  height: 680px;
  padding: 30px;
  border-radius: 24px;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 20px 60px rgba(5,10,40,0.6);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

/* Glow Border */
.container::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: conic-gradient(
    from 0deg,
    rgba(0,224,255,0.12),
    rgba(123,75,255,0.08),
    rgba(0,224,255,0.12)
  );
  filter: blur(30px);
  z-index: 0;
}

/* Top Bar */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}

.title .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon1), var(--neon2));
  box-shadow: 0 0 18px rgba(0,224,255,0.5);
}

.version {
  font-size: 13px;
  opacity: 0.8;
}

/* Stage */
.stage {
  position: relative;
  width: 100%;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

canvas#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Core */
.core {
  width: 220px;
  height: 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.aura {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,224,255,0.08), transparent 70%);
  filter: blur(14px);
}

/* Rings */
.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(0,224,255,0.6);
  border-right-color: rgba(123,75,255,0.4);
  animation: spin 10s linear infinite;
}

.spin.two {
  transform: scale(0.85);
  animation-duration: 14s;
  animation-direction: reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Sphere */
.sphere {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 30%, rgba(255,255,255,0.15), rgba(0,224,255,0.06)),
    linear-gradient(180deg, rgba(8,18,40,0.9), rgba(2,6,20,0.95));
  box-shadow:
    inset 0 6px 18px rgba(255,255,255,0.04),
    0 20px 50px rgba(0,224,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.label {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(0,224,255,0.6);
}

/* Date Time */
.datetime {
  margin-top: 16px;
  text-align: center;
}

.time {
  font-family: "Orbitron", sans-serif;
  font-size: 28px;
  color: #e6fbff;
}

.date {
  font-size: 13px;
  opacity: 0.85;
}

/* Controls */
.controls {
  margin-top: auto;
  display: flex;
  gap: 12px;
  z-index: 5;
}

.input {
  flex: 1;
  height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.05);
  color: #e8f6ff;
  font-size: 15px;
  outline: none;
}

.input::placeholder {
  color: #9fdcff;
  opacity: 0.7;
}

.right {
  display: flex;
  gap: 10px;
}

/* Buttons */
.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, #0c1228, #05051a);
  color: var(--neon1);
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.icon-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0,224,255,0.15);
}

.icon-btn.active {
  color: #ff4b4b;
  box-shadow: 0 0 20px rgba(255,75,75,0.4);
}

/* Popups */
.popup {
  position: absolute;
  width: 320px;
  border-radius: 12px;
  padding: 14px;
  background: rgba(10,12,25,0.98);
  border: 1px solid rgba(0,224,255,0.08);
  box-shadow: 0 30px 60px rgba(3,8,30,0.8);
  display: none;
  z-index: 20;
}

#appPopup { left: -340px; top: 120px; }
#modPopup { right: -340px; top: 140px; }

#appPopup.active { left: 40px; display: block; }
#modPopup.active { right: 40px; display: block; }

.popup .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--neon1);
}

.close {
  cursor: pointer;
  padding: 4px 8px;
}

.app-item {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
}

.app-item:hover {
  background: rgba(0,224,255,0.12);
}

/* Responsive */
@media (max-width: 560px) {
  .container {
    height: 86vh;
    padding: 18px;
  }
  .core {
    width: 180px;
    height: 180px;
  }
  .sphere {
    width: 100px;
    height: 100px;
  }
}
