/* ===== CSS Custom Properties / Theme Variables ===== */
:root {
  /* Light Theme (default) */
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a8;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-color: rgba(0, 0, 0, 0.06);
  --shadow-color-strong: rgba(0, 0, 0, 0.12);
  --glow-color: rgba(242, 100, 25, 0.3);
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: rgba(0, 0, 0, 0.1);
  --input-focus-border: rgba(242, 100, 25, 0.5);
  --badge-bg: rgba(242, 100, 25, 0.1);
  --badge-text: #F26419;
  --countdown-bg: rgba(255, 255, 255, 0.5);
  --shape-color-1: rgba(242, 100, 25, 0.08);
  --shape-color-2: rgba(246, 174, 45, 0.08);
  --shape-color-3: rgba(47, 72, 88, 0.08);
  --shape-color-4: rgba(242, 100, 25, 0.05);
  --shape-color-5: rgba(246, 174, 45, 0.08);
  --shape-color-6: rgba(47, 72, 88, 0.05);
  --social-hover: #F26419;

  /* Gradient - Image palette */
  --gradient-1: #F26419;
  --gradient-2: #F6AE2D;
  --gradient-3: #2F4858;
  --gradient-4: #1a2e3a;

  --gradient-primary: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  --gradient-accent: linear-gradient(135deg, var(--gradient-2), var(--gradient-3));
  --gradient-warm: linear-gradient(135deg, var(--gradient-3), var(--gradient-1));
  --gradient-cool: linear-gradient(135deg, var(--gradient-1), var(--gradient-4));
  --gradient-hero: linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 50%, var(--gradient-3) 100%);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

[data-theme="dark"] {
  --bg-primary: linear-gradient(135deg, #1a2e3a 0%, #2F4858 50%, #1a2e3a 100%);
  --bg-secondary: #152530;
  --bg-card: rgba(21, 37, 48, 0.8);
  --text-primary: #f0f4f8;
  --text-secondary: #b0c4d0;
  --text-muted: #7a8a95;
  --border-color: rgba(255, 255, 255, 0.06);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-color-strong: rgba(0, 0, 0, 0.5);
  --glow-color: rgba(242, 100, 25, 0.5);
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus-border: rgba(242, 100, 25, 0.6);
  --badge-bg: rgba(242, 100, 25, 0.15);
  --badge-text: #F26419;
  --countdown-bg: rgba(255, 255, 255, 0.03);
  --shape-color-1: rgba(242, 100, 25, 0.12);
  --shape-color-2: rgba(246, 174, 45, 0.12);
  --shape-color-3: rgba(47, 72, 88, 0.12);
  --shape-color-4: rgba(242, 100, 25, 0.08);
  --shape-color-5: rgba(246, 174, 45, 0.12);
  --shape-color-6: rgba(47, 72, 88, 0.08);
  --social-hover: #F26419;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.4s ease;
  line-height: 1.6;
}

/* ===== Particles Canvas ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Floating Shapes ===== */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  transition: background-color 0.8s ease;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: var(--shape-color-1);
  top: -150px;
  right: -200px;
  animation: float-shape-1 20s ease-in-out infinite;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--shape-color-2);
  bottom: -100px;
  left: -100px;
  animation: float-shape-2 25s ease-in-out infinite;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: var(--shape-color-3);
  top: 40%;
  left: 10%;
  animation: float-shape-3 18s ease-in-out infinite;
}

.shape-4 {
  width: 200px;
  height: 200px;
  background: var(--shape-color-4);
  top: 20%;
  right: 25%;
  animation: float-shape-4 22s ease-in-out infinite;
}

.shape-5 {
  width: 350px;
  height: 350px;
  background: var(--shape-color-5);
  bottom: 20%;
  right: 10%;
  animation: float-shape-5 19s ease-in-out infinite;
}

.shape-6 {
  width: 250px;
  height: 250px;
  background: var(--shape-color-6);
  top: 60%;
  left: 50%;
  animation: float-shape-6 21s ease-in-out infinite;
}

@keyframes float-shape-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

@keyframes float-shape-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, -30px) scale(1.05); }
  66% { transform: translate(20px, 40px) scale(0.9); }
}

@keyframes float-shape-3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(20px, -40px) rotate(10deg); }
  66% { transform: translate(-30px, 20px) rotate(-5deg); }
}

@keyframes float-shape-4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, -30px) scale(1.2); }
}

@keyframes float-shape-5 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(40px, -20px); }
  66% { transform: translate(-10px, 40px); }
}

@keyframes float-shape-6 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 30px) scale(1.1); }
  66% { transform: translate(20px, -20px) scale(0.85); }
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 4px;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all 0.4s ease;
  animation: fade-slide-in 0.8s ease-out 0.3s both;
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px var(--shadow-color-strong);
}

.toggle-track {
  width: 56px;
  height: 28px;
  border-radius: 50px;
  position: relative;
  background: var(--gradient-primary);
  transition: background 0.4s ease;
}

.toggle-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toggle-indicator {
  transform: translateX(28px);
}

.toggle-indicator svg {
  width: 14px;
  height: 14px;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.icon-sun {
  color: #f39c12;
  opacity: 1;
  transform: rotate(0deg);
}

.icon-moon {
  color: #6c5ce7;
  opacity: 0;
  transform: rotate(-90deg);
}

[data-theme="dark"] .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}

[data-theme="dark"] .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* ===== Container ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Main Content ===== */
.main-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 0 60px;
}

/* ===== Logo ===== */
.logo-wrapper {
  margin-bottom: 40px;
  animation: fade-slide-up 1s ease-out 0.2s both;
}

.logo {
  max-width: 120px;
  height: auto;
  filter: drop-shadow(0 4px 20px var(--glow-color));
  transition: all 0.4s ease;
  animation: pulse-glow 3s ease-in-out infinite;
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 8px 40px var(--glow-color));
}

/* ===== Badge ===== */
.badge-wrapper {
  margin-bottom: 32px;
  animation: fade-slide-up 1s ease-out 0.4s both;
}

.badge {
  display: inline-block;
  padding: 8px 24px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent,
    var(--badge-text),
    transparent 30%,
    transparent 70%,
    var(--badge-text) 100%
  );
  animation: rotate-badge 4s linear infinite;
  opacity: 0.1;
}

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

.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--glow-color);
}

/* ===== Headline ===== */
.headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fade-slide-up 1s ease-out 0.6s both;
}

.headline .text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 6s ease-in-out infinite;
  display: block;
}

.block-reveal {
  display: block;
  overflow: hidden;
  position: relative;
}

.block-inner {
  display: block;
  animation: block-reveal 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
  animation-delay: 1s;
}

.delay-200 .block-inner {
  animation-delay: 1.2s;
}

@keyframes block-reveal {
  0% {
    opacity: 0;
    transform: translateY(100%) skewY(5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) skewY(0deg);
  }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Subtitle ===== */
.subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 48px;
  line-height: 1.7;
  font-weight: 400;
  animation: fade-slide-up 1s ease-out 0.8s both;
}

/* ===== Countdown ===== */
.countdown-wrapper {
  margin-bottom: 56px;
  animation: fade-slide-up 1s ease-out 1s both;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.countdown-item {
  background: var(--countdown-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 24px;
  min-width: 100px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.countdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.countdown-item:hover::before {
  transform: scaleX(1);
}

.countdown-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--shadow-color-strong);
  border-color: var(--input-focus-border);
}

.countdown-item:hover .countdown-value {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.countdown-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.countdown-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.countdown-separator {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gradient-1);
  opacity: 0.5;
  padding-bottom: 16px;
  animation: pulse-separator 1s ease-in-out infinite;
}

@keyframes pulse-separator {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* ===== Notify Form ===== */
.notify-wrapper {
  max-width: 480px;
  margin: 0 auto 48px;
  animation: fade-slide-up 1s ease-out 1.2s both;
}

.notify-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 500;
}

.notify-form {
  width: 100%;
}

.input-group {
  display: flex;
  gap: 12px;
  position: relative;
}

.input-group input {
  flex: 1;
  padding: 16px 20px;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: 14px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-group input:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 4px var(--glow-color), 0 8px 32px var(--shadow-color);
  transform: translateY(-1px);
}

.input-group input:focus + .btn-primary {
  border-color: var(--input-focus-border);
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: var(--gradient-primary);
  color: #fff;
  border: 2px solid transparent;
  border-radius: 14px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.form-message {
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 24px;
  transition: all 0.3s ease;
}

.form-message.success {
  color: #00b894;
}

.form-message.error {
  color: #d63031;
}

/* Loading state for button */
.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary.loading .btn-arrow {
  animation: spin 1s linear infinite;
}

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

/* ===== Social Links ===== */
.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
  animation: fade-slide-up 1s ease-out 1.4s both;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-link svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-link:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: transparent;
  box-shadow: 0 8px 24px var(--shadow-color-strong);
}

.social-link:hover::before {
  opacity: 1;
}

.social-link:hover svg {
  color: #fff;
  transform: scale(1.1);
}

.social-link:active {
  transform: translateY(-1px) scale(1);
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fade-slide-up 1s ease-out 1.6s both, bounce-scroll 3s ease-in-out infinite 2.6s;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  position: relative;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.wheel {
  width: 3px;
  height: 8px;
  background: var(--gradient-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.scroll-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.scroll-arrow span {
  display: block;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  opacity: 0.4;
  animation: scroll-arrow 2s ease-in-out infinite;
}

.scroll-arrow span:nth-child(2) { animation-delay: 0.2s; }
.scroll-arrow span:nth-child(3) { animation-delay: 0.4s; }

@keyframes scroll-arrow {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; }
}

@keyframes bounce-scroll {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border-color);
  animation: fade-in 1s ease-out 2s both;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===== Keyframe Animations ===== */
@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 4px 20px var(--glow-color));
  }
  50% {
    filter: drop-shadow(0 8px 40px var(--glow-color));
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .theme-toggle {
    top: 16px;
    right: 16px;
  }

  .logo {
    max-width: 90px;
  }

  .countdown-grid {
    gap: 6px;
  }

  .countdown-item {
    min-width: 70px;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .countdown-value {
    font-size: 1.8rem;
  }

  .countdown-label {
    font-size: 0.65rem;
  }

  .countdown-separator {
    font-size: 1.5rem;
    padding-bottom: 12px;
  }

  .input-group {
    flex-direction: column;
  }

  .btn-primary {
    justify-content: center;
    padding: 14px 24px;
  }

  .social-link {
    width: 44px;
    height: 44px;
  }

  .social-link svg {
    width: 18px;
    height: 18px;
  }

  .main-content {
    padding: 80px 0 40px;
  }
}

@media (max-width: 480px) {
  .countdown-item {
    min-width: 56px;
    padding: 10px 12px;
  }

  .countdown-value {
    font-size: 1.4rem;
  }

  .countdown-label {
    font-size: 0.6rem;
  }

  .badge {
    padding: 6px 16px;
    font-size: 0.75rem;
  }
}

/* ===== Reduce Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .block-inner {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== Selection Styling ===== */
::selection {
  background: var(--gradient-1);
  color: #fff;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-accent);
}