/* ========================================
   KITE Landing Page - Mobile-First CSS
   Single-screen layout, no scrolling
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #06060e;
  --bg-secondary: #0d0d1a;
  --bg-card: #111128;
  --bg-card-hover: #16163a;
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(99, 102, 241, 0.3);
  --text-primary: #f0f0f5;
  --text-secondary: #8888a8;
  --text-muted: #55556a;
  --accent-green: #00d68f;
  --accent-green-dim: rgba(0, 214, 143, 0.15);
  --accent-blue: #6366f1;
  --accent-blue-dim: rgba(99, 102, 241, 0.12);
  --accent-cyan: #22d3ee;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --gradient-main: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-green: linear-gradient(135deg, #00d68f 0%, #00b377 100%);
  --gradient-card: linear-gradient(145deg, rgba(17, 17, 40, 0.9) 0%, rgba(13, 13, 26, 0.95) 100%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- Background Effects --- */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: orbFloat 12s ease-in-out infinite;
}

.bg-orb--1 {
  width: 250px;
  height: 250px;
  background: var(--accent-blue);
  top: -80px;
  right: -60px;
  animation-delay: 0s;
}

.bg-orb--2 {
  width: 200px;
  height: 200px;
  background: #8b5cf6;
  bottom: 5%;
  left: -80px;
  animation-delay: -4s;
}

.bg-orb--3 {
  width: 160px;
  height: 160px;
  background: var(--accent-cyan);
  top: 50%;
  right: -50px;
  opacity: 0.1;
  animation-delay: -8s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(0.95); }
}

/* --- Layout --- */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 14px;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 8px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__logo {
  width: 30px;
  height: 30px;
  background: var(--gradient-main);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.5px;
}

.header__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header__live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--accent-green-dim);
  border: 1px solid rgba(0, 214, 143, 0.25);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header__live-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

/* --- Language Switcher --- */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  min-height: 30px;
  white-space: nowrap;
}

.lang-btn:active,
.lang-btn--active {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.lang-btn__flag {
  font-size: 13px;
  line-height: 1;
}

.lang-btn__name {
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-btn__arrow {
  font-size: 9px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.lang-btn--active .lang-btn__arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 150px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: 4px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.lang-dropdown--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
  min-height: 34px;
}

.lang-option:active,
.lang-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.lang-option--active {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.lang-option__flag {
  font-size: 15px;
  line-height: 1;
}

.lang-option__name {
  flex: 1;
}

.lang-option__check {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-blue);
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 214, 143, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(0, 214, 143, 0); }
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 10px 0 6px;
  flex-shrink: 0;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.hero__label-dot {
  width: 5px;
  height: 5px;
  background: var(--accent-green);
  border-radius: 50%;
}

.hero__count {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 2px;
  background: linear-gradient(180deg, #fff 0%, #a0a0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  font-weight: 500;
}

.hero__recent {
  font-size: 11px;
  color: var(--accent-green);
  font-weight: 600;
}

.hero__recent span {
  font-weight: 700;
}

/* --- Tags --- */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 0 0 8px;
  flex-shrink: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tag__icon {
  font-size: 11px;
}

/* --- Timer Card --- */
.timer-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 14px 16px 12px;
  text-align: center;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.timer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
}

.timer-card__label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.timer-card__amount {
  font-size: 13px;
  color: var(--accent-amber);
  font-weight: 600;
  margin-bottom: 6px;
}

.timer-card__countdown {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}

.timer-card__unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 10px;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar__fill {
  height: 100%;
  background: var(--gradient-main);
  border-radius: var(--radius-full);
  transition: width 1s linear;
}

/* CTA Button */
.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--gradient-main);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.cta-btn:active {
  transform: scale(0.97);
}

.cta-btn--disabled {
  opacity: 0.6;
  pointer-events: none;
}

.cta-btn__timer {
  font-size: 13px;
  opacity: 0.85;
}

/* --- Slots Card --- */
.slots-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.slots-card__left {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.slots-card__right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.slots-card__number {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-amber);
}

.slots-card__label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Live Feed --- */
.feed {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 8px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.feed__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.feed__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.feed__live {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feed__live-dot {
  width: 5px;
  height: 5px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

.feed__table-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.feed__list {
  overflow: hidden;
  position: relative;
  flex: 1;
  min-height: 0;
}

.feed__list-inner {
  transition: transform 0.5s ease;
}

.feed__row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  padding: 7px 14px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  animation: feedSlideIn 0.4s ease;
}

@keyframes feedSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.feed__time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.feed__user {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.feed__user-flag {
  font-size: 13px;
  flex-shrink: 0;
}

.feed__user-bonus {
  font-size: 9px;
  color: var(--accent-cyan);
  font-weight: 600;
  background: rgba(34, 211, 238, 0.1);
  padding: 1px 5px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.feed__amount {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Info Section --- */
.info-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.info-card__text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
}

.info-card__text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 6px 0 4px;
  border-top: 1px solid var(--border-color);
  margin-top: 0;
  flex-shrink: 0;
}

.footer__text {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 2px;
}

.footer__link {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
  min-height: 24px;
  display: flex;
  align-items: center;
}

.footer__link:active {
  color: var(--accent-blue);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay--open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-overlay--open .modal {
  transform: translateY(0) scale(1);
}

.modal__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-green);
  margin-bottom: 8px;
  line-height: 1.3;
}

.modal__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal__desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: transform 0.15s, opacity 0.15s;
}

.modal__btn:active {
  transform: scale(0.97);
}

.modal__btn--primary {
  background: var(--gradient-green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 214, 143, 0.3);
}

.modal__btn--secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.modal__btn--secondary:active {
  background: rgba(255, 255, 255, 0.05);
}

/* Modal success state */
.modal__success-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.modal__success-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-green);
  margin-bottom: 6px;
}

.modal__success-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* --- Utility Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.animate-in--delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-in--delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-in--delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-in--delay-4 { animation-delay: 0.4s; opacity: 0; }

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* --- Selection --- */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}
