/* Malik Prediction – mobile-first responsive */
:root {
  --bg: #0f0a1a;
  --surface: #1a1228;
  --surface-alt: #241833;
  --accent: #4e2a84;
  --accent-light: #6b3da8;
  --text: #f0ebf5;
  --text-muted: #a89bb8;
  --radius: 12px;
  --radius-sm: 8px;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
  --safe-right: env(safe-area-inset-right, 0);
  --max-width: 1200px;
  --mobile-width: 430px;
  --header-h: 56px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  min-height: 100vh;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

.app {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .app {
    max-width: var(--mobile-width);
    box-shadow: 0 0 0 1px rgba(78, 42, 132, 0.2);
  }
}

/* Header – mobile */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 10, 26, 0.9);
  backdrop-filter: blur(12px);
  padding-top: var(--safe-top);
  border-bottom: 1px solid rgba(78, 42, 132, 0.3);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.nav-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.nav-menu.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(var(--header-h) + var(--safe-top));
  left: var(--safe-left);
  right: var(--safe-right);
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(78, 42, 132, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: block;
}

.nav-menu a:hover {
  background: var(--surface-alt);
  color: var(--accent-light);
}

/* Main */
.main {
  position: relative;
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 24px 16px 32px;
  padding-bottom: calc(32px + var(--safe-bottom));
}

/* Placeholder until video is injected (after PSD loads) */
.poster-bg-video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg);
}

/* Video background – covers full .main size, endless loop */
.poster-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* PSD-only content: design from .psd file only */
.psd-section {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  margin-bottom: 32px;
}

.psd-loading {
  position: relative;
  z-index: 1;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.psd-display {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(78, 42, 132, 0.25);
}

.psd-canvas {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  vertical-align: middle;
}

/* Full PSD poster clickable – redirect to Telegram + Meta Pixel */
.psd-poster-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Logo overlay – 227×227, X:427, Y:63 (1080×1920), slow coin spin */
.logo-overlay {
  position: absolute;
  left: 39.54%;
  top: 3.28%;
  width: 21.02%;
  z-index: 45;
  perspective: 800px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.logo-overlay-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
  animation: logo-coin-spin 6s linear infinite;
}

@keyframes logo-coin-spin {
  from {
    transform: rotateY(0deg) rotateX(5deg);
  }
  to {
    transform: rotateY(360deg) rotateX(5deg);
  }
}

/* Join Now button overlay – PSD dimensions: 458×95, X:311, Y:706, radius 32 (1080×1920 design) */
.join-now-btn {
  position: absolute;
  left: 28.8%;
  top: 36.8%;
  width: 42.4%;
  z-index: 40;
  display: block;
  text-decoration: none;
  border-radius: 32px;
  overflow: visible;
  transition: transform 0.2s ease, opacity 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.join-now-btn:hover {
  transform: scale(1.02);
  opacity: 0.95;
}

.join-now-btn:active {
  transform: scale(0.98);
}

.join-now-btn-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 458 / 95;
  object-fit: contain;
  vertical-align: middle;
}

/* Joinnow.png inside button – layer 277×51, X:360 Y:728 (relative to button 311,706 458×95) */
.join-now-label {
  position: absolute;
  left: 10.7%;
  top: 23.2%;
  width: 60.5%;
  height: auto;
  aspect-ratio: 277 / 51;
  object-fit: contain;
  pointer-events: none;
  vertical-align: middle;
}

/* Tele.png beside Join Now – layer 58×48, X:658, Y:730 (1080×1920 design) */
.tele-beside-join {
  position: absolute;
  left: 60.93%;
  top: 38.02%;
  width: 5.37%;
  z-index: 40;
  display: block;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.tele-beside-join:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.tele-beside-join:active {
  transform: scale(0.96);
}

.tele-beside-join img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 58 / 48;
  object-fit: contain;
}

.psd-error {
  margin: 0;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 20px 16px;
  padding-bottom: calc(20px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid rgba(78, 42, 132, 0.25);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--text);
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Telegram logo – bottom right of the poster, above poster content, link to Krish_Content */
.telegram-fab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0.62, 0.87, 0.95);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0.62, 0.87, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.telegram-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0.62, 0.87, 0.5);
}

.telegram-fab:active {
  transform: scale(0.96);
}

.telegram-icon {
  display: block;
  width: 100px;
  height: 96px;
  object-fit: contain;
}

/* Keep mobile view on all screen sizes – no desktop layout switch */
