/**
 * MINEHUT.GAY — Component Styles
 * UI Components & Interactive Elements
 */

/* ===== BACKGROUND EFFECTS ===== */
#canvas3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas, 0);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay, 1);
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 70% at 50% 50%,
    transparent 0%,
    rgba(7, 4, 12, 0.6) 50%,
    rgba(7, 4, 12, 0.98) 100%
  );
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: var(--z-scanlines, 2);
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  opacity: 0.4;
}

/* ===== NEWS TICKER ===== */
.news-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 58, 92, 0.95),
    rgba(179, 102, 255, 0.95)
  );
  padding: var(--space-2) 0;
  z-index: var(--z-ticker, 200);
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(255, 58, 92, 0.3);
}

.news-ticker-content {
  display: flex;
  white-space: nowrap;
  width: max-content;
  /* Animation handled by JavaScript for Firefox compatibility */
}

.news-ticker-item {
  padding: 0 var(--space-16);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.news-ticker-item::before {
  content: "⚠";
  font-size: 1em;
  animation: ticker-icon-pulse 1s ease-in-out infinite;
}

@keyframes ticker-icon-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

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

/* ===== CONTROLS ===== */
.controls {
  position: fixed;
  top: calc(40px + var(--space-4));
  right: var(--space-6);
  z-index: var(--z-controls, 100);
  display: flex;
  gap: var(--space-2);
}

.ctrl-btn {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-xl);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ctrl-btn:hover {
  background: rgba(255, 58, 92, 0.15);
  border-color: rgba(255, 58, 92, 0.3);
  transform: translateY(-2px);
}

.ctrl-btn.active {
  color: var(--accent);
  border-color: rgba(255, 58, 92, 0.4);
  box-shadow: 0 0 20px rgba(255, 58, 92, 0.2);
}

/* ===== BADGE COMPONENTS ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-glass);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

.badge--danger {
  background: rgba(255, 58, 92, 0.12);
  border-color: rgba(255, 58, 92, 0.4);
  color: var(--accent);
  box-shadow: 0 0 30px rgba(255, 58, 92, 0.15);
}

.badge--danger::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px #ff5a7c, 0 0 25px var(--accent),
    0 0 40px rgba(255, 58, 92, 0.5);
  animation: pulse-glow 2s ease-in-out infinite;
}

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

/* ===== TRUSTPILOT BADGE ===== */
.trustpilot-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  background: linear-gradient(
    135deg,
    rgba(255, 58, 92, 0.12) 0%,
    rgba(255, 58, 92, 0.08) 100%
  );
  border: 1px solid rgba(255, 58, 92, 0.35);
  border-radius: var(--radius-2xl);
  padding: var(--space-5) var(--space-8);
  margin-top: var(--space-8);
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 8px 32px rgba(255, 58, 92, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.trustpilot-badge:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(255, 58, 92, 0.2);
}

.trustpilot-score {
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  color: var(--accent);
  line-height: var(--leading-none);
  text-shadow: 0 0 30px rgba(255, 58, 92, 0.5);
}

.trustpilot-info {
  text-align: left;
}

.trustpilot-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  color: var(--text-dim);
  text-transform: uppercase;
}

.trustpilot-stars {
  color: var(--accent);
  font-size: var(--text-lg);
  margin: var(--space-1) 0;
  letter-spacing: 2px;
}

.trustpilot-reviews {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ===== STAT INDICATORS ===== */
.stat-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.stat-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-spring);
  border: 2px solid transparent;
}

.stat-dot:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

.stat-dot.active {
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
  transform: scale(1.3);
  border-color: var(--accent-glow);
}

/* ===== CHART COMPONENTS ===== */
.chart-wrapper {
  background: linear-gradient(
    135deg,
    rgba(18, 12, 28, 0.92) 0%,
    rgba(24, 16, 38, 0.88) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-3xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-massive), inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 80px rgba(179, 102, 255, 0.05);
  transition: all var(--duration-slow) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.chart-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(179, 102, 255, 0.3) 50%,
    transparent 100%
  );
}

.chart-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-massive), 0 0 60px rgba(179, 102, 255, 0.1);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.chart-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: var(--tracking-tight);
}

.chart-legend {
  display: flex;
  gap: var(--space-6);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px currentColor;
}

.chart-canvas-large {
  width: 100%;
  height: 350px;
}

/* ===== TIMELINE COMPONENTS ===== */
.timeline-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-width: 1000px;
  padding: var(--space-10) 0;
}

.timeline-line {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--accent));
  border-radius: var(--radius-full);
  box-shadow: 0 0 20px rgba(179, 102, 255, 0.4);
}

.timeline-node {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 0 var(--space-5);
}

.timeline-dot {
  width: 22px;
  height: 22px;
  background: var(--bg);
  border: 4px solid var(--accent);
  border-radius: var(--radius-full);
  margin: 38px auto var(--space-5);
  position: relative;
  z-index: 2;
  box-shadow: 0 0 25px var(--accent);
  transition: all var(--duration-normal) var(--ease-spring);
}

.timeline-node:nth-child(1) .timeline-dot {
  border-color: var(--cyan);
  box-shadow: 0 0 25px var(--cyan);
}

.timeline-node:nth-child(2) .timeline-dot {
  border-color: var(--purple);
  box-shadow: 0 0 25px var(--purple);
}

.timeline-node:nth-child(3) .timeline-dot {
  border-color: var(--ember);
  box-shadow: 0 0 25px var(--ember);
}

.timeline-node:nth-child(4) .timeline-dot {
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--accent);
}

.timeline-node:hover .timeline-dot {
  transform: scale(1.4);
}

.timeline-date {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  color: var(--text-dim);
  margin-bottom: var(--space-10);
}

.timeline-content {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  text-align: left;
  transition: all var(--duration-normal) var(--ease-out);
}

.timeline-node:hover .timeline-content {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

.timeline-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
  letter-spacing: var(--tracking-wide);
}

.timeline-node:nth-child(1) .timeline-title {
  color: var(--cyan);
  text-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
}
.timeline-node:nth-child(2) .timeline-title {
  color: var(--purple);
  text-shadow: 0 0 30px rgba(179, 102, 255, 0.5);
}
.timeline-node:nth-child(3) .timeline-title {
  color: var(--ember);
  text-shadow: 0 0 30px rgba(255, 123, 58, 0.5);
}
.timeline-node:nth-child(4) .timeline-title {
  color: var(--accent);
  text-shadow: 0 0 30px rgba(255, 58, 92, 0.5);
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ===== COUNTDOWN COMPONENT ===== */
.countdown-section {
  text-align: center;
  padding: var(--space-20) var(--space-6);
}

.countdown-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-8);
  background: linear-gradient(
    180deg,
    rgba(12, 8, 20, 0.95) 0%,
    rgba(18, 12, 28, 0.9) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.countdown-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
}

.countdown-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.4em;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  text-transform: uppercase;
}

.countdown-timer-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.countdown-value {
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-weight: var(--weight-black);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease;
}

.countdown-value.flip {
  animation: countdown-flip 0.3s ease;
}

@keyframes countdown-flip {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.countdown-unit-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-top: var(--space-2);
  text-transform: uppercase;
}

.countdown-separator {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: var(--weight-bold);
  color: rgba(255, 255, 255, 0.3);
  margin: 0 var(--space-1);
  align-self: flex-start;
  padding-top: 0.5rem;
  animation: separator-pulse 1s ease-in-out infinite;
}

@keyframes separator-pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.2;
  }
}

.countdown-date {
  margin-top: var(--space-6);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
}

.countdown-tagline {
  margin-top: var(--space-2);
  color: var(--text-dim);
  font-size: var(--text-xs);
  font-style: italic;
  letter-spacing: var(--tracking-wide);
}

@media (max-width: 640px) {
  .countdown-container {
    padding: var(--space-6) var(--space-4);
  }

  .countdown-unit {
    min-width: 70px;
  }

  .countdown-separator {
    font-size: 1.5rem;
    margin: 0;
  }

  .countdown-timer-wrapper {
    gap: var(--space-1);
  }
}

/* ===== FLOATING QUOTE ===== */
.floating-quote {
  position: absolute;
  padding: 16px 24px;
  background: rgba(22, 14, 35, 0.95);
  border: 1px solid rgba(179, 102, 255, 0.3);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(210, 200, 230, 1);
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(179, 102, 255, 0.15);
  pointer-events: none;
  z-index: 10;
  will-change: transform, opacity;
  /* No CSS animation - handled by JavaScript for Firefox compatibility */
}

.floating-quote::before {
  content: "❝";
  position: absolute;
  top: -10px;
  left: 16px;
  font-size: 1.8rem;
  color: #b366ff;
  opacity: 0.6;
  text-shadow: 0 0 15px rgba(179, 102, 255, 0.5);
}

/* ===== FOOTER ===== */
.footer {
  padding: var(--space-10) var(--space-6);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: var(--tracking-wide);
  z-index: var(--z-content);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, transparent, rgba(7, 4, 12, 0.5));
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .chart-wrapper {
    padding: var(--space-6);
  }

  .chart-canvas-large {
    height: 250px;
  }

  .controls {
    top: 48px;
    right: var(--space-4);
  }

  .ctrl-btn {
    padding: var(--space-2) var(--space-3);
    font-size: 0.7rem;
  }

  .news-ticker {
    padding: var(--space-1) 0;
  }

  .news-ticker-item {
    font-size: 0.65rem;
    padding: 0 var(--space-8);
  }

  .trustpilot-badge {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
  }

  .trustpilot-info {
    text-align: center;
  }

  .trustpilot-score {
    font-size: var(--text-3xl);
  }

  /* Timeline Mobile */
  .timeline-track {
    flex-direction: column;
    min-width: unset;
    padding: var(--space-6) 0;
  }

  .timeline-line {
    display: none;
  }

  .timeline-node {
    padding: 0;
    margin-bottom: var(--space-6);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-4);
    text-align: left;
  }

  .timeline-dot {
    margin: 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
  }

  .timeline-date {
    font-size: 0.65rem;
    margin-bottom: var(--space-2);
  }

  .timeline-content {
    flex: 1;
    padding: var(--space-4);
  }

  .timeline-title {
    font-size: var(--text-sm);
  }

  .timeline-desc {
    font-size: var(--text-xs);
  }

  /* Countdown Mobile */
  .countdown-timer {
    font-size: clamp(2rem, 10vw, 5rem);
  }

  .countdown-label {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
  }

  /* Floating Quotes Mobile */
  .floating-quote {
    max-width: 220px;
    font-size: var(--text-xs);
    padding: var(--space-3) var(--space-4);
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .controls {
    top: 42px;
    right: var(--space-2);
    gap: var(--space-1);
  }

  .ctrl-btn {
    padding: var(--space-1) var(--space-2);
    font-size: 0.6rem;
    border-radius: var(--radius-lg);
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .chart-legend {
    gap: var(--space-4);
  }

  .chart-canvas-large {
    height: 200px;
  }

  .trustpilot-badge {
    padding: var(--space-3) var(--space-4);
    margin-top: var(--space-6);
  }

  .trustpilot-score {
    font-size: var(--text-2xl);
  }
}

/* Large Screens / TV */
@media (min-width: 1920px) {
  .chart-canvas-large {
    height: 450px;
  }

  .timeline-content {
    padding: var(--space-8);
  }

  .floating-quote {
    max-width: 380px;
    font-size: var(--text-base);
  }

  .countdown-timer {
    font-size: clamp(6rem, 14vw, 12rem);
  }
}

/* 4K / Ultra Wide */
@media (min-width: 2560px) {
  .chart-canvas-large {
    height: 550px;
  }

  .trustpilot-score {
    font-size: var(--text-5xl);
  }
}

/* ===== CONTAINER QUERIES (Modern Feature) ===== */
@container (min-width: 600px) {
  .chart-header {
    flex-direction: row;
  }
}

@supports (container-type: inline-size) {
  .chart-section {
    container-type: inline-size;
    container-name: chart-container;
  }
}
