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

:root {
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --btn-bg: rgba(255, 255, 255, 0.10);
  --btn-hover: rgba(255, 255, 255, 0.40);
  --clock-bg: rgba(255, 255, 255, 0.20);
  --dock-bg: rgba(255, 255, 255, 0.12);
  --panel-bg: rgba(10, 26, 56, 0.42);
  --border: rgba(255, 255, 255, 0.14);
  --active: #59c3ff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

html {
  height: 100%;
  height: 100dvh;
}

body {
  font-family: Arial, sans-serif;
  color: var(--text);
  overflow: hidden;
  background: #071122;
  min-height: 100%;
  min-height: 100dvh;
}

.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  object-fit: cover;
  z-index: -3;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  z-index: -2;
  background:
    radial-gradient(circle at top left, rgba(20, 55, 110, 0.45), transparent 32%),
    radial-gradient(circle at top right, rgba(16, 83, 145, 0.35), transparent 30%),
    linear-gradient(135deg, rgba(5, 13, 26, 0.76), rgba(8, 22, 46, 0.74), rgba(12, 40, 78, 0.70));
  backdrop-filter: blur(1px);
}

/* ── Stage ── */
.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}

/* ── App Frame ── */
.app-frame {
  position: relative;
  width: 460px;
  height: 768px;
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 30px 70px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: floatFrame 5s ease-in-out infinite;
}

.frame-glow {
  position: absolute;
  inset: -1px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(89,195,255,0.18), transparent 30%, transparent 70%, rgba(89,195,255,0.12));
  pointer-events: none;
  opacity: 0.7;
}

@keyframes floatFrame {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* ── Top Row ── */
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.login-btn {
  flex: 1;
  height: 58px;
  border-radius: 18px;
  background: var(--btn-bg);
  border: 1px solid var(--border);
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.login-btn:hover {
  background: var(--btn-hover);
  transform: translateY(-2px) scale(1.01);
}

.login-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.95);
  animation: pulseRing 2.2s infinite;
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(89, 195, 255, 0.35); }
  70%  { box-shadow: 0 0 0 10px rgba(89, 195, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(89, 195, 255, 0); }
}

.login-text {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.mini-btn {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--border);
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.mini-btn svg {
  width: 22px;
  height: 22px;
  fill: rgba(255,255,255,0.85);
  flex-shrink: 0;
}

.mini-btn:hover {
  transform: translateY(-2px) rotate(8deg);
  background: rgba(255,255,255,0.22);
}

/* ── Dock ── */
.mini-dock {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 22px;
  background: var(--dock-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow: var(--shadow);
}

.dock-item {
  position: relative;
  width: 100%;
  height: 58px;
  border-radius: 16px;
  background: var(--btn-bg);
  border: 1px solid var(--border);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(0,0,0,0.18);
  transition: transform 0.18s ease, background 0.20s ease, border-color 0.20s ease;
}

.dock-item:hover { background: var(--btn-hover); }

.dock-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.18s ease;
}

.dock-item:hover svg { transform: scale(1.08); }

.dock-item.active {
  background: rgba(255,255,255,0.35);
  border-color: rgba(89, 195, 255, 0.28);
}

.indicator {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%) scale(0.7);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--active);
  box-shadow: 0 0 12px rgba(89, 195, 255, 0.85);
  opacity: 0;
  transition: 0.18s ease;
}

.dock-item.active .indicator {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ── Meta Row ── */
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 8px;
}

.brand {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.clock-box {
  min-width: 150px;
  height: 58px;
  border-radius: 18px;
  background: var(--clock-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 32px;
  font-weight: 700;
  user-select: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(0,0,0,0.18);
}

.clock-colon {
  display: inline-block;
  width: 12px;
  text-align: center;
  transition: opacity 0.2s ease;
}

.clock-colon.blink-off { opacity: 0.2; }

/* ── Screen ── */
.screen {
  flex: 1;
  min-height: 0;
  border-radius: 26px;
  background: var(--panel-bg);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(89,195,255,0.14), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  pointer-events: none;
}

.screen-content {
  position: relative;
  height: 100%;
  padding: 62px 22px 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  animation: fadeInUp 0.35s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.screen-badge {
  position: absolute;
  top: 18px;
  left: 22px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}

.screen-content h1 {
  font-size: clamp(34px, 5vw, 50px);
  margin-bottom: 14px;
  text-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.screen-content p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
  max-width: 90%;
}

.sub-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 42px;
}

.sub-btn {
  padding: 13px 26px;
  border-radius: 16px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 6px 16px rgba(0,0,0,0.18);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.35s ease both;
}

.sub-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.sub-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(89,195,255,0.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 24px rgba(0,0,0,0.22), 0 0 18px rgba(89,195,255,0.12);
  transform: translateY(-3px) scale(1.04);
}

.sub-btn:hover::before {
  opacity: 1;
}

.sub-btn:active {
  transform: translateY(0) scale(0.97);
  background: rgba(255,255,255,0.28);
  transition-duration: 0.08s;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Home Dashboard ── */
.hm-screen { padding: 0 !important; }

.hm-head {
  padding: 20px 18px 16px;
  background: linear-gradient(180deg, rgba(89,195,255,0.07) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  animation: fadeInUp 0.3s ease;
}
.hm-greet { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.4); letter-spacing: 0.3px; }
.hm-name  { font-size: 26px; font-weight: 800; color: #fff; line-height: 1.1; margin-top: 2px; }
.hm-date  { font-size: 11px; color: rgba(255,255,255,0.28); margin-top: 5px; letter-spacing: 0.2px; }

.hm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 14px 10px;
  animation: fadeInUp 0.38s ease both;
}
.hm-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.hm-card:active { transform: scale(0.96); }
.hm-card:hover  { transform: translateY(-2px); }
.hm-card-ico  { width: 22px; height: 22px; margin-bottom: 6px; }
.hm-card-ico svg { width: 100%; height: 100%; }
.hm-card-val  { font-size: 30px; font-weight: 800; line-height: 1; }
.hm-card-name { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px; margin-top: 3px; }
.hm-card-hint { font-size: 11px; color: rgba(255,255,255,0.32); margin-top: 2px; }

.hm-card-blue   { border-color: rgba(89,195,255,0.24);  background: rgba(89,195,255,0.06); }
.hm-card-green  { border-color: rgba(125,211,168,0.24); background: rgba(125,211,168,0.06); }
.hm-card-purple { border-color: rgba(185,169,255,0.24); background: rgba(185,169,255,0.06); }
.hm-card-orange { border-color: rgba(255,179,71,0.24);  background: rgba(255,179,71,0.06); }
.hm-card-blue   .hm-card-ico, .hm-card-blue   .hm-card-val, .hm-card-blue   .hm-card-name { color: #59c3ff; }
.hm-card-green  .hm-card-ico, .hm-card-green  .hm-card-val, .hm-card-green  .hm-card-name { color: #7dd3a8; }
.hm-card-purple .hm-card-ico, .hm-card-purple .hm-card-val, .hm-card-purple .hm-card-name { color: #b8a9ff; }
.hm-card-orange .hm-card-ico, .hm-card-orange .hm-card-val, .hm-card-orange .hm-card-name { color: #ffb347; }
.hm-card-blue:hover   { background: rgba(89,195,255,0.11); }
.hm-card-green:hover  { background: rgba(125,211,168,0.11); }
.hm-card-purple:hover { background: rgba(185,169,255,0.11); }
.hm-card-orange:hover { background: rgba(255,179,71,0.11); }

.hm-overdue {
  display: flex; align-items: center; gap: 7px;
  margin: 0 14px 10px;
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.2);
  border-radius: 11px;
  padding: 9px 13px;
  font-size: 12px; color: #ff8080; font-weight: 600;
  text-decoration: none;
  animation: fadeInUp 0.42s ease both;
  transition: background 0.18s;
}
.hm-overdue:hover { background: rgba(255,107,107,0.14); }
.hm-overdue svg { flex-shrink: 0; }

.hm-section { padding: 12px 14px 5px; animation: fadeInUp 0.44s ease both; }
.hm-section-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255,255,255,0.28);
}

.hm-tasks { display: flex; flex-direction: column; gap: 6px; padding: 0 14px; animation: fadeInUp 0.46s ease both; }
.hm-task {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 9px 11px;
  transition: background 0.15s;
}
.hm-task:hover { background: rgba(255,255,255,0.07); }
.hm-task-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.hm-task-dot.high   { background: #ff6b6b; box-shadow: 0 0 7px rgba(255,107,107,0.7); }
.hm-task-dot.medium { background: #ffb347; box-shadow: 0 0 7px rgba(255,179,71,0.7); }
.hm-task-dot.low    { background: #7dd3a8; box-shadow: 0 0 7px rgba(125,211,168,0.6); }
.hm-task-text { font-size: 13px; color: rgba(255,255,255,0.8); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tasks-more { font-size: 11px; color: rgba(255,255,255,0.28); text-align: center; padding: 3px 0; }

.hm-activity { display: flex; gap: 8px; padding: 0 14px; animation: fadeInUp 0.48s ease both; }
.hm-act-card {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}
.hm-act-num   { font-size: 22px; font-weight: 800; }
.hm-act-label { font-size: 9px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }

/* ── Responsive ── */
@media (max-width: 560px) {
  .stage {
    padding: max(12px, env(safe-area-inset-top))
             max(12px, env(safe-area-inset-right))
             max(12px, env(safe-area-inset-bottom))
             max(12px, env(safe-area-inset-left));
    min-height: 100dvh;
    align-items: flex-start;
  }

  .app-frame {
    width: 100%;
    height: calc(
      100dvh
      - max(12px, env(safe-area-inset-top))
      - max(12px, env(safe-area-inset-bottom))
    );
    min-height: 580px;
    border-radius: 24px;
    padding: 14px;
    animation: none;
  }

  .login-btn, .mini-btn, .clock-box, .dock-item { height: 52px; }
  .login-text { font-size: 20px; }
  .brand { font-size: 24px; }
  .clock-box { min-width: 128px; font-size: 28px; }
  .mini-dock { gap: 8px; padding: 8px; }
  .screen-content { padding: 24px 20px; }
  .screen-content p { max-width: 100%; font-size: 16px; }
}
