/* ========================================== */
/* === UPDATE SYSTEM STYLES === */
/* ========================================== */

/* Top-left icon area (mirrors .top-right-icons) */
.top-left-icons {
  position: absolute;
  top: 20px;
  left: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 1;
  transition: opacity 0.35s ease;
  pointer-events: auto;
}
body.profile-view .top-left-icons {
  opacity: 0;
  pointer-events: none;
}
.top-left-icons .icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease;
  padding: 0;
  color: #fff;
}
.top-left-icons .icon-btn:hover {
  transform: rotate(-10deg);
  box-shadow: 0 8px 22px rgba(168, 92, 255, 0.16);
}
.top-left-icons .icon-btn svg {
  opacity: 0.9;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}
body.light-theme .top-left-icons .icon-btn {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(124, 58, 237, 0.08);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  color: #333;
}
body.light-theme .top-left-icons .icon-btn:hover {
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.12);
}

/* Premium button golden glow */
.top-left-icons .premium-icon-btn {
  border-color: rgba(255, 185, 0, 0.25);
  color: #ffb900;
}
.top-left-icons .premium-icon-btn:hover {
  transform: rotate(-10deg);
  box-shadow: 0 8px 22px rgba(255, 185, 0, 0.25);
  border-color: rgba(255, 185, 0, 0.4);
}
.top-left-icons .premium-icon-btn svg {
  opacity: 1;
  filter: drop-shadow(0 2px 8px rgba(255, 185, 0, 0.4));
}
body.light-theme .top-left-icons .premium-icon-btn {
  color: #e6a200;
  border-color: rgba(255, 185, 0, 0.2);
}

/* Premium active state — green crown when user has premium */
.top-left-icons .premium-icon-btn.premium-active {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}
.top-left-icons .premium-icon-btn.premium-active svg {
  filter: drop-shadow(0 2px 8px rgba(34, 197, 94, 0.5));
}
.top-left-icons .premium-icon-btn.premium-active:hover {
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.55);
}

/* Update badge (notification count) */
.update-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239,68,68,0.4);
  animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ── Update Overlay ── */
.update-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  flex-direction: column;
  animation: updateFadeIn 0.3s ease;
}
.update-overlay.active {
  display: flex;
}

@keyframes updateFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.update-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* Header */
.update-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  flex-shrink: 0;
}
.update-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.update-close-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: #888;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.update-close-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Scrollable update list */
.update-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 16px;
}

/* Individual update entry */
.update-entry {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.update-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.update-entry-version {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.update-entry-date {
  font-size: 11px;
  color: #666;
}
.update-entry-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #a85cff);
  margin-bottom: 8px;
}
.update-entry-changes {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.update-entry-changes li {
  font-size: 12px;
  color: #aaa;
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
}
.update-entry-changes li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent, #a85cff);
  font-weight: 700;
}

/* Download button */
.update-download-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: var(--accent, #a85cff);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Segoe UI', sans-serif;
}
.update-download-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.update-download-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* "Up to date" message */
.update-uptodate {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 13px;
}
.update-uptodate-icon {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
  opacity: 0.5;
}

/* ── Fullscreen Overlays (spinner + intro) ── */
.kzn-fullscreen-overlay {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 99999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#installSpinnerOverlay {
  background: rgba(0,0,0,0.92);
}
.install-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent, #a85cff);
  border-radius: 50%;
  animation: installSpin 0.9s linear infinite;
}
@keyframes installSpin {
  to { transform: rotate(360deg); }
}
.kzn-spinner-text {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-top: 24px;
  text-align: center;
}
.kzn-spinner-sub {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  margin-top: 8px;
  text-align: center;
}

/* ── Post-update Intro Screen ── */
.kzn-intro-screen {
  background: #000;
}
.kzn-intro-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
  transform: scale(1.5);
}
.kzn-intro-madeby {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.kzn-intro-madeby-img {
  max-width: 60%;
  max-height: 40%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease;
  transform: scale(2);
}

/* ── Download Progress ── */
.update-progress-wrap {
  padding: 16px 20px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.update-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.update-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent, #a85cff), #c084fc);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.update-progress-status {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 8px;
}
.update-log {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'Consolas', monospace;
  font-size: 10px;
  color: #666;
  max-height: 100px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}
