html {
  scroll-behavior: smooth;
}

/* Grok-style UI Styles */
body {
  background-color: #000;
  color: #f4f4f5;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Nebula / Milky Way Effect */
.nebula {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(76, 29, 149, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse at 80% 70%, rgba(30, 58, 138, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 80%),
    linear-gradient(135deg, transparent 20%, rgba(255, 255, 255, 0.02) 50%, transparent 80%);
  filter: blur(100px);
  pointer-events: none;
  z-index: -2;
  transform: scale(1.2) rotate(-10deg);
}

/* Tech Grid Pattern */
.tech-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

/* Live Name Design */
.live-name {
  background: linear-gradient(to right, #fff, #a1a1aa, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.grok-input-container {
  background: rgba(24, 24, 27, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(39, 39, 42, 1);
}
.grok-card {
  background: rgba(9, 9, 11, 0.5);
  border: 1px solid rgba(39, 39, 42, 0.5);
  transition: all 0.2s ease;
}
.grok-card:hover {
  border-color: rgba(63, 63, 70, 1);
  background: rgba(24, 24, 27, 0.5);
}
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}
.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* News Ticker Animation */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background-color: rgba(220, 38, 38, 0.1);
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
  padding: 10px 0;
  z-index: 40;
}

.ticker {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.ticker__item {
  display: inline-block;
  padding: 0 1rem;
  color: #ef4444;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Galaxy Loader */
#page-loader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-visual {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: rotate 3s linear infinite;
}

.loader-ring:nth-child(2) {
  inset: 15px;
  border-top-color: rgba(255, 255, 255, 0.2);
  animation-duration: 2s;
  animation-direction: reverse;
}

.loader-ring:nth-child(3) {
  inset: 30px;
  border-top-color: rgba(255, 255, 255, 0.1);
  animation-duration: 1.5s;
}

.loader-core {
  position: absolute;
  inset: 45px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(255, 255, 255, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

.loader-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: #52525b;
  text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.9); opacity: 0.5; }
}
