/* ==========================================================================
   Hollow - Pure Optical Light Physics Styling (Zero-Bloat, Minimalist)
   ========================================================================== */

/* Register custom properties for smooth GPU-accelerated gradient rotation */
@property --rainbow-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg-color: #000000;
  --surface-card: rgba(12, 12, 16, 0.72);
  --surface-border: rgba(255, 255, 255, 0.12);
  --surface-border-hover: rgba(255, 255, 255, 0.28);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.40);

  /* Spectral Rainbow Accents */
  --spectrum-red: #ff3366;
  --spectrum-orange: #ff7700;
  --spectrum-yellow: #ffcc00;
  --spectrum-green: #00ff88;
  --spectrum-cyan: #00e5ff;
  --spectrum-blue: #3377ff;
  --spectrum-violet: #b537f2;

  /* Modern Physics-based spring easing */
  --spring-easing: linear(
    0, 0.016 0.5%, 0.06 1%, 0.226 2%, 1.116 5.4%, 1.375 6.6%, 
    1.527 7.7%, 1.565 8.2%, 1.585 8.8%, 1.581 9.3%, 1.559 9.8%, 
    1.458 10.9%, 0.937 14.3%, 0.784 15.5%, 0.693 16.6%, 0.67 17.1%, 
    0.657 17.7%, 0.671 18.7%, 0.729 19.8%, 1.042 23.3%, 1.13 24.5%, 
    1.182 25.6%, 1.201 26.7%, 1.192 27.7%, 1.156 28.8%, 0.977 32.2%, 
    0.925 33.4%, 0.894 34.5%, 0.882 35.6%, 0.887 36.6%, 0.907 37.7%, 
    1.045 42.4%, 1.069 44.5%, 1.059 46.3%, 0.979 50.9%, 0.96 53.4%, 
    0.966 55.3%, 1.013 59.9%, 1.024 62.3%, 0.986 71.2%, 1.008 79.9%, 
    0.995 88.9%, 1
  );

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Base Reset & Optimization */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-stack);
  overflow-x: hidden;
  background-attachment: fixed;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 20px);
  position: relative;
}

/* Background Canvas - GPU Rendered Optics */
#lightCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  touch-action: none;
}

/* Ambient Vignette & Micro-Glow */
.chromatic-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0.90) 100%
  );
}

/* Foreground Center Container */
.portal-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 1.5rem 1rem;
}

/* Frosted Pitch-Black Card */
.glass-card {
  background: var(--surface-card);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--surface-border);
  border-radius: 28px;
  padding: 2.5rem 2rem 2.25rem;
  box-shadow: 
    0 24px 60px -12px rgba(0, 0, 0, 0.85),
    0 0 1px 1px rgba(255, 255, 255, 0.08) inset;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  contain: layout style;
}

.glass-card:hover {
  border-color: var(--surface-border-hover);
  box-shadow: 
    0 30px 70px -12px rgba(0, 0, 0, 0.95),
    0 0 25px -4px rgba(255, 255, 255, 0.06),
    0 0 1px 1px rgba(255, 255, 255, 0.14) inset;
}

/* Prism Emblem */
.prism-emblem {
  width: 54px;
  height: 54px;
  margin-bottom: 1.25rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: transform 0.6s var(--spring-easing), border-color 0.3s ease;
}

.prism-svg {
  width: 32px;
  height: 32px;
  overflow: visible;
  transition: filter 0.3s ease;
}

.glass-card:hover .prism-emblem {
  transform: translateY(-2px) scale(1.06);
  border-color: rgba(255, 255, 255, 0.25);
}

.glass-card:hover .prism-svg {
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.55));
}

/* Profile Header */
.profile-header {
  margin-bottom: 1.85rem;
}

.profile-title {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  display: inline-block;
  background: linear-gradient(135deg, #ffffff 50%, rgba(255, 255, 255, 0.72) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.2;
}

/* Navigation / Actions Group */
.action-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0; /* No footer below */
}

/* Base Interactive Button */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  border-radius: 16px;
  padding: 2px; /* Holds the glowing rainbow ring */
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  transition: transform 0.45s var(--spring-easing), box-shadow 0.3s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Rainbow Iridescent Border via @property animation */
.btn-glow-border {
  position: absolute;
  inset: -150%;
  background: conic-gradient(
    from var(--rainbow-angle),
    var(--spectrum-red) 0%,
    var(--spectrum-orange) 16%,
    var(--spectrum-yellow) 33%,
    var(--spectrum-green) 50%,
    var(--spectrum-cyan) 66%,
    var(--spectrum-blue) 83%,
    var(--spectrum-violet) 92%,
    var(--spectrum-red) 100%
  );
  opacity: 0.35;
  transition: opacity 0.35s ease;
  animation: rotateRainbow 6s linear infinite;
}

@keyframes rotateRainbow {
  from { --rainbow-angle: 0deg; }
  to { --rainbow-angle: 360deg; }
}

.btn:hover .btn-glow-border,
.btn:focus-visible .btn-glow-border {
  opacity: 1;
  animation-duration: 3s; /* Sped up dynamic sheen */
}

/* Button Internal Surface */
.btn-inner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  background: #09090b;
  border-radius: 14px;
  z-index: 1;
  transition: background 0.3s ease;
}

.btn:hover .btn-inner {
  background: #111115;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #ffffff;
  flex-shrink: 0;
  transition: transform 0.4s var(--spring-easing), background-color 0.3s ease, border-color 0.3s ease;
}

.btn:hover .btn-icon {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.kofi-icon svg {
  color: #ff5e5b;
}

.btn-content {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex-grow: 1;
}

.btn-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.btn-arrow {
  color: var(--text-tertiary);
  font-size: 1.25rem;
  font-weight: 300;
  transition: transform 0.4s var(--spring-easing), color 0.3s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
  color: #ffffff;
}

/* Button Spring Transforms */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.75);
}

.btn:active {
  transform: translateY(0px) scale(0.985);
  transition-duration: 0.12s;
}

/* Focus Visibility for Accessibility */
.btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* Responsive Adaptations for Mobile */
@media (max-width: 480px) {
  .portal-container {
    max-width: 100%;
    padding: 1rem;
  }

  .glass-card {
    padding: 2.25rem 1.35rem 2rem;
    border-radius: 24px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .btn-glow-border {
    animation: none;
    opacity: 0.6;
  }

  .btn, .btn-icon, .btn-arrow, .prism-emblem {
    transition: none !important;
  }
}
