:root {
  /* Neutral palette (no blue UI) */
  --bg: #0a0c12;
  --bg-2: #12131a;
  --card: rgba(18, 19, 26, 0.86);
  --text: #f3f5ff;
  --muted: #c9cff6;
  --accent: #af7eff;         /* violet */
  --accent-2: #e56cff;       /* magenta */
  --ring: rgba(235, 120, 255, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Anonymous Pro', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace;
  color: var(--text);
  background:
    radial-gradient(1000px 800px at 80% 0%, rgba(0, 13, 255, 0.15), transparent 60%),
    radial-gradient(900px 700px at 20% 100%, rgba(255, 51, 102, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

/* Reveal overlay */
.reveal-overlay {
  position: fixed;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 3000; /* below custom cursor */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 18, 0.35); /* subtle dark tint */
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  color: var(--text);
  user-select: none;
  cursor: pointer;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.reveal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Prevent scrolling while overlay is visible */
body.overlay-open {
  overflow: hidden;
}

/* Always show custom cursor */
.cursor-dot,
.cursor-outline {
  display: block !important;
}

.reveal-text {
  font-size: clamp(16px, 2.6vw, 22px);
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* Hide cursor only on desktop/mouse devices */
@media (pointer: fine) {
  body {
    cursor: none; /* hide default cursor */
  }
}

/* Show normal cursor on touch devices */
@media (pointer: coarse) {
  body {
    cursor: auto !important; /* force default cursor on touch devices */
  }
  
  /* Hide custom cursor elements on touch devices */
  .cursor-dot, .cursor-outline {
    display: none !important;
  }
}

/* full-page background image overlay */
.page-background::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('https://i.redd.it/1hukd0zav0w51.png') center/cover no-repeat fixed;
  filter: saturate(1.2) brightness(0.6);
}

/* Keep the OS cursor hidden on interactive elements only on desktop */
@media (pointer: fine) {
  button,
  a,
  input,
  select,
  textarea,
  [role='button'] {
    cursor: none !important;
  }
}

.music-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  z-index: 12;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.music-toggle:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.95);
}

.audio-controls {
  position: fixed;
  top: 54px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 12, 18, 0.7);
  border-radius: 16px;
  padding: 8px 12px;
  z-index: 11;
  display: none; /* hidden by default */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.audio-btn {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0f24;
  font-weight: 800;
  width: 36px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s;
}

.audio-btn:active {
  transform: scale(0.95);
}

.audio-volume {
  width: 140px;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 6px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Style the volume slider thumb */
.audio-volume::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.audio-volume::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Apply cursor: none only on desktop devices */
@media (pointer: fine) {
  .audio-volume::-webkit-slider-thumb {
    cursor: none !important;
  }
  
  .audio-volume::-moz-range-thumb {
    cursor: none !important;
  }
}

/* Style the volume slider track */
.audio-volume::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.audio-volume::-moz-range-track {
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

/* Custom cursor */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(88, 101, 242, 0.6);
}

.cursor-outline {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  /* iOS-like glass ring: translucent fill + backdrop blur */
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px) saturate(120%);
  -webkit-backdrop-filter: blur(4px) saturate(120%);
  transition: width 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-radius 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    left 120ms ease, top 120ms ease,
    background-color 160ms ease, border-color 160ms ease, box-shadow 200ms ease;
}

.cursor-outline.stuck {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(2.5px) saturate(120%);
  -webkit-backdrop-filter: blur(2.5px) saturate(120%);
}

/* Elements that temporarily follow the cursor */
.stick-following {
  position: relative;
  z-index: 5;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.page {
  display: grid;
  place-items: start center;
  padding: 24px 12px 48px;
  min-height: 100%;
}

.clock {
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.12), 0 0 18px rgba(88, 101, 242, 0.25);
  margin-bottom: 12px;
}

.card {
  width: min(420px, 92vw);
  background: rgba(10, 12, 18, 0.38);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: visible; /* allow avatar to overlap the top edge */
  position: relative;
  min-height: clamp(80px, 50vh, 50px);
  padding-bottom: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), 0 0 60px rgba(0, 13, 255, 0.15);
}

/* banner removed */

.avatar {
  position: absolute;
  left: 20px;
  top: -36px; /* lift avatar above the glass card without clipping */
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid rgba(10, 12, 18, 0.5);
  outline: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  object-fit: cover;
  background: #111;
  z-index: 20; /* ensure it sits above card and effects */
}

.profile {
  padding: 56px 16px 8px 16px; /* extra top padding to accommodate lowered avatar */
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.display-name {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 28px;
}

.device-badge {
  opacity: 0.7;
}

.handle {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.handle:hover {
  text-decoration: underline;
}

.divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0));
  margin: 4px 0 0 0;
}

.section-title {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 16px 4px;
}

.about-text {
  margin: 0 16px;
  color: #e9dbff;
  font-size: 14px;
}

/* connected accounts removed */

.message-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 16px 16px 16px;
}

.message-input {
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  font-size: 15px;
}

.message-input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15);
}

/* Prevent iOS zoom on focus */
@media (pointer: coarse) {
  .message-input {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
}

.send-button {
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0f24;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, filter 0.2s;
}

.send-button:hover {
  filter: brightness(1.05);
}

.send-button:active {
  transform: scale(0.97);
  filter: brightness(0.95);
}

/* Mobile optimizations */
.mobile-device {
  cursor: auto !important; /* Restore default cursor on mobile */
}

/* Touch-friendly controls */
.touch-friendly.audio-btn {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.touch-friendly.audio-volume {
  width: 160px;
  height: 10px;
}

.touch-friendly.audio-volume::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
}

.touch-friendly.audio-volume::-moz-range-thumb {
  width: 22px;
  height: 22px;
}

.touch-friendly.message-input {
  height: 48px;
  font-size: 16px;
}

.touch-friendly.send-button {
  height: 48px;
  font-size: 16px;
  padding: 0 18px;
}

/* Responsive adjustments */
@media (max-width: 520px) {
  .avatar {
    width: 72px;
    height: 72px;
    top: -36px; /* Adjusted for mobile */
  }
  
  .profile {
    padding-top: 40px;
  }
  
  .display-name {
    font-size: 24px;
  }
  
  .music-toggle {
    width: 44px;
    height: 44px;
    font-size: 20px;
    right: 16px;
    top: 16px;
  }
  
  .audio-controls {
    top: 16px;
    right: 70px; /* Position next to music toggle */
    padding: 8px 12px;
  }
  
  .card {
    width: min(400px, 94vw);
    padding-bottom: 16px;
  }
  
  .message-form {
    padding: 8px 12px 12px 12px;
    gap: 8px;
  }
  
  .about-text {
    font-size: 15px;
  }
}

/* Small mobile devices */
@media (max-width: 360px) {
  .card {
    width: 96vw;
  }
  
  .audio-controls {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    top: 70px;
    right: 16px;
  }
  
  .audio-volume {
    width: 120px;
  }
  
  .profile {
    padding-top: 50px;
  }
}


