/* =============================================
   ZERGOM — Main Stylesheet
   Mobile-first, iPad-like home screen
   ============================================= */

:root {
  --icon-size: 72px;
  --icon-radius: 16px;
  --icon-gap: 24px;
  --dock-height: 80px;
  --dock-blur: 20px;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --glass: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.18);
  --text: #ffffff;
  --text-dim: rgba(255,255,255,0.6);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  overflow: hidden;
}

/* ---- Background ---- */
.home-body {
  background: #0a0a1a url('/assets/images/default-bg.jpg') center/cover no-repeat;
  position: relative;
}
.wallpaper-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
  z-index: 0;
  pointer-events: none;
}

/* ---- Clock ---- */
.clock-widget {
  position: fixed;
  top: max(20px, env(safe-area-inset-top, 20px));
  left: 0; right: 0;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}
.clock-time {
  font-size: clamp(48px, 10vw, 80px);
  font-weight: 200;
  letter-spacing: -2px;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.clock-date {
  font-size: clamp(14px, 3vw, 18px);
  font-weight: 300;
  opacity: 0.8;
  margin-top: 4px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* ---- Grid ---- */
.grid-container {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 5;
  padding: clamp(120px, 22vh, 180px) 16px calc(var(--dock-height) + 24px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.grid-container::-webkit-scrollbar { display: none; }

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--icon-size), 1fr));
  gap: var(--icon-gap);
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}

/* ---- Icon Item ---- */
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
}

.icon-wrapper {
  position: relative;
  width: var(--icon-size);
  height: var(--icon-size);
}

.icon-link {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--icon-radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--icon-radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  display: block;
}
.icon-link:active .icon-img,
.icon-link:hover .icon-img {
  transform: scale(0.95);
}

.icon-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--text);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  text-align: center;
  max-width: calc(var(--icon-size) + 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* ---- Delete button (shown in jiggle mode) ---- */
.delete-btn {
  display: none;
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  padding: 0;
}
.delete-btn:hover { background: #c0392b; }

/* ---- Jiggle mode ---- */
@keyframes jiggle {
  0%   { transform: rotate(-1.5deg) scale(1.02); }
  25%  { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(1.5deg) scale(1.02); }
  75%  { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(-1.5deg) scale(1.02); }
}

body.jiggle-mode .icon-item {
  animation: jiggle 0.5s ease-in-out infinite;
}
body.jiggle-mode .delete-btn {
  display: flex;
  animation: none;
}
body.jiggle-mode .icon-link {
  pointer-events: none;
}

/* ---- Folder ---- */
.folder-icon {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: var(--icon-radius);
  background: rgba(100,120,180,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 8px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  transition: transform var(--transition);
}
.folder-icon img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  object-fit: cover;
}
.folder-icon:hover { transform: scale(0.97); }

/* Drag-over target for folders */
.folder-icon.drag-over {
  background: rgba(59,130,246,0.6);
  box-shadow: 0 0 0 3px var(--accent);
}

/* ---- Drag ---- */
.icon-item.dragging {
  opacity: 0.4;
  transform: scale(1.1);
}
.icon-item.drag-over-item {
  transform: scale(1.08);
}
.icon-item.drag-placeholder {
  opacity: 0.3;
}

/* ---- Dock ---- */
.dock {
  position: fixed;
  bottom: env(safe-area-inset-bottom, 0);
  left: 0; right: 0;
  z-index: 100;
  padding: 8px 16px;
}
.dock-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--glass);
  backdrop-filter: blur(var(--dock-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--dock-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 8px 12px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 14px;
  transition: background var(--transition), transform var(--transition);
  min-width: 56px;
}
.dock-btn svg { width: 22px; height: 22px; }
.dock-btn span { font-size: 10px; opacity: 0.75; white-space: nowrap; }
.dock-btn:hover, .dock-btn:active {
  background: rgba(255,255,255,0.15);
  transform: scale(1.08);
}
.dock-btn.active { background: rgba(255,255,255,0.2); }

/* ---- Dropdown menu ---- */
.dropdown-menu {
  position: fixed;
  bottom: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px) + 8px);
  right: 16px;
  background: rgba(20,20,30,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 8px;
  min-width: 220px;
  z-index: 200;
  box-shadow: var(--shadow);
  display: none;
}
.dropdown-menu.open { display: block; }

.dropdown-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 8px;
}
.dropdown-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.dropdown-name { font-size: 14px; font-weight: 500; }
.dropdown-tier { font-size: 11px; opacity: 0.6; display: flex; align-items: center; gap: 4px; }

.trial-badge {
  background: var(--accent);
  color: white;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
}
.trial-countdown { font-size: 10px; opacity: 0.5; margin-top: 2px; }

.dropdown-divider { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 4px 0; }

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}
.dropdown-item:hover { background: rgba(255,255,255,0.1); }
.dropdown-admin { color: #fbbf24; }
.dropdown-logout { color: var(--danger); }

/* ---- Language selector ---- */
.lang-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
}
.lang-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
}
.lang-btn.active { background: var(--accent); border-color: var(--accent); }
.lang-btn:hover { background: rgba(255,255,255,0.2); }

/* ---- Modals ---- */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
}
.modal-backdrop.open { display: block; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.open { display: flex; }

.modal-card {
  background: rgba(18,18,30,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  position: relative;
  animation: modal-in 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modal-in {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}
.modal-card input[type="text"],
.modal-card input[type="url"],
.modal-card input[type="email"],
.modal-card input[type="password"] {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  padding: 12px 14px;
  margin-bottom: 10px;
  outline: none;
  transition: border-color var(--transition);
}
.modal-card input:focus { border-color: var(--accent); }
.modal-card input::placeholder { color: var(--text-dim); }

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--text);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }

.save-limit-info {
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 12px;
}

/* ---- Radio Page (full-screen slide-in) ---- */
.radio-page {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 8, 20, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.radio-page.open {
  transform: translateX(0);
}

.radio-page-header {
  display: flex;
  align-items: center;
  padding: max(16px, env(safe-area-inset-top, 16px)) 16px 12px;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.radio-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.radio-back-btn:hover { opacity: 0.7; }
.radio-page-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  flex: 1;
}
.radio-page-spacer { flex-shrink: 0; width: 60px; }

.radio-page-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 14px;
  flex-shrink: 0;
}
.radio-page-search input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.radio-page-search input::placeholder { color: var(--text-dim); }
.radio-page-search svg { color: var(--text-dim); flex-shrink: 0; }

.radio-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.radio-list::-webkit-scrollbar { width: 4px; }
.radio-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.radio-item:hover { background: rgba(255,255,255,0.08); }
.radio-item.playing { background: rgba(59,130,246,0.15); }
.radio-item img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; flex-shrink: 0; }
.radio-item-info { flex: 1; min-width: 0; }
.radio-item-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-item-country { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.radio-item-play { flex-shrink: 0; color: var(--text-dim); }
.radio-item.playing .radio-item-play { color: var(--accent); }

.radio-loading { padding: 40px; text-align: center; color: var(--text-dim); font-size: 14px; }

/* Now playing bar (inside radio page) */
.radio-now-playing-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(59,130,246,0.12);
  border-top: 1px solid rgba(59,130,246,0.25);
  flex-shrink: 0;
}
#radio-np-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; flex-shrink: 0; }
.radio-np-info { flex: 1; min-width: 0; }
#radio-np-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#radio-np-country { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.radio-np-stop {
  background: rgba(255,255,255,0.1);
  border: none; color: white;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.radio-np-stop:hover { background: rgba(255,255,255,0.2); }

/* EQ animation (playing indicator) */
.radio-eq, .radio-np-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.radio-eq span, .radio-np-eq span {
  display: block;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}
.radio-eq span:nth-child(1), .radio-np-eq span:nth-child(1) { height: 6px; animation-delay: 0s; }
.radio-eq span:nth-child(2), .radio-np-eq span:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.radio-eq span:nth-child(3), .radio-np-eq span:nth-child(3) { height: 9px; animation-delay: 0.3s; }
.radio-eq span:nth-child(4), .radio-np-eq span:nth-child(4) { height: 14px; animation-delay: 0.45s; }
@keyframes eq-bounce {
  from { transform: scaleY(0.3); }
  to   { transform: scaleY(1); }
}

/* Mini radio player (floating above dock on home) */
.radio-mini-player {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--dock-height) + 12px + env(safe-area-inset-bottom, 0px));
  background: rgba(20,20,40,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 50;
  animation: mini-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes mini-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
#mini-radio-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; flex-shrink: 0; }
.radio-mini-info { flex: 1; min-width: 0; }
#mini-radio-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-mini-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-top: 3px;
}
.radio-mini-eq span {
  display: block;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}
.radio-mini-eq span:nth-child(1) { height: 5px; animation-delay: 0s; }
.radio-mini-eq span:nth-child(2) { height: 10px; animation-delay: 0.2s; }
.radio-mini-eq span:nth-child(3) { height: 7px; animation-delay: 0.4s; }
.radio-mini-open {
  background: rgba(255,255,255,0.1);
  border: none; color: white;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.radio-mini-open:hover { background: rgba(255,255,255,0.2); }
.radio-mini-stop {
  background: none;
  border: none; color: var(--text-dim);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color var(--transition);
}
.radio-mini-stop:hover { color: var(--danger); }

/* ---- Apps picker ---- */
.apps-card { max-width: 600px; max-height: 80vh; display: flex; flex-direction: column; }
.apps-search { margin-bottom: 12px; }
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  overflow-y: auto;
  max-height: 320px;
  padding: 4px;
  scrollbar-width: thin;
}
.app-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: 14px;
  transition: background var(--transition);
}
.app-picker-item:hover { background: rgba(255,255,255,0.1); }
.app-picker-item img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.app-picker-item span { font-size: 10px; text-align: center; opacity: 0.8; }
.apps-upload {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 12px;
  margin-top: 12px;
}
.apps-upload h4 { font-size: 13px; opacity: 0.7; margin-bottom: 8px; }
.apps-upload input { width: 100%; margin-bottom: 8px; }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
  flex: 1;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary.btn-full { width: 100%; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--transition);
  flex: 1;
}
.btn-secondary:hover { background: rgba(255,255,255,0.18); }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  width: 100%;
  margin-top: 8px;
}
.btn-google:hover { background: rgba(255,255,255,0.18); }

/* ---- Auth page ---- */
.auth-body {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a1a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: auto;
}
.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 24px 16px;
}
.auth-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo img { height: 60px; }
.auth-logo h1 { font-size: 28px; font-weight: 700; margin-top: 8px; }

.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.auth-tab.active {
  background: rgba(255,255,255,0.14);
  color: var(--text);
}

.form-group { margin-bottom: 10px; }
.form-group input {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  padding: 13px 14px;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-dim); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-dim);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.12);
}

.auth-link {
  display: block;
  text-align: center;
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
  margin-top: 14px;
}
.auth-link:hover { text-decoration: underline; }

.auth-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #fca5a5;
  margin-bottom: 14px;
}
.auth-success {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #86efac;
  margin-bottom: 14px;
}

/* ---- Responsive ---- */
@media (min-width: 480px) {
  :root { --icon-size: 80px; --icon-gap: 28px; }
}
@media (min-width: 768px) {
  :root { --icon-size: 88px; --icon-gap: 32px; }
  .clock-widget { top: 40px; }
}
@media (min-width: 1024px) {
  :root { --icon-size: 96px; --icon-gap: 36px; }
}

/* Tesla browser — no hover effects */
@media (hover: none) and (pointer: coarse) {
  .dock-btn:hover { background: none; transform: none; }
}

/* PWA standalone */
@media (display-mode: standalone) {
  .clock-widget { top: max(32px, env(safe-area-inset-top, 32px)); }
}
