:root {
  --primary: #f6851b; /* Doge Orange */
  --primary-hover: #e27616;
  --secondary: #fcd535; /* Yellow */
  --dark: #452a1b; /* Dark Brown */
  --darker: #2b1a11;
  --light: #fff8eb;
  --white: #ffffff;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Nunito", sans-serif;
  background-color: var(--light);
  color: var(--dark);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  line-height: 1.6;
}

h1,
h2,
h3,
.badge,
.btn {
  font-family: "Fredoka One", cursive;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.text-center {
  text-align: center;
}
.text-white {
  color: var(--white);
}

/* Buttons & Links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 0 var(--darker);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--darker);
}

/* Custom Social Links */
.socials {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: "Fredoka One", cursive;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--white);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 3px solid var(--dark);
  box-shadow: 4px 4px 0 var(--dark);
}

.social-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--dark);
}
.social-link:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--dark);
}

.tg-link {
  background-color: #2ca5e0;
}
.x-link {
  background-color: #000000;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  position: relative;
  z-index: 10;
  width: 100%;
  overflow-x: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--dark);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  margin-bottom: 24px;
  border: 2px solid var(--dark);
  box-shadow: 3px 3px 0 var(--dark);
  transform: rotate(-2deg);
}

.title {
  font-size: 5rem;
  line-height: 1.1;
  color: var(--primary);
  text-shadow: 4px 4px 0 var(--dark);
  margin-bottom: 16px;
}
.title .chinese {
  color: var(--dark);
  font-size: 3.5rem;
  text-shadow: none;
  -webkit-text-stroke: 1px var(--dark);
}

.subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--darker);
  max-width: 500px;
  margin-bottom: 32px;
}

/* Copier */
.ca-box {
  background: var(--white);
  border: 3px solid var(--dark);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 6px 6px 0 var(--primary);
  max-width: 100%;
}

.ca-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#ca-text {
  flex-grow: 1;
  font-family: monospace;
  font-size: 1rem;
  background: #f4f4f4;
  padding: 10px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #ddd;
}

.btn-icon {
  background: var(--secondary);
  border: 2px solid var(--dark);
  color: var(--dark);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--dark);
}
.btn-icon:hover {
  background: #fee46b;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--dark);
}
.btn-icon:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--dark);
}

/* Hero Image */
.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: auto;
}
.image-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  animation: pulse-slow 4s ease-in-out infinite;
}
.hero-image {
  width: 100%;
  height: auto;
  border-radius: 30px;
  border: 6px solid var(--dark);
  box-shadow: 12px 12px 0 var(--primary);
  object-fit: cover;
  /* Optimize Image Loading */
  content-visibility: auto;
  contain: paint;
}

/* Story Section */
.story-section {
  padding: 100px 0;
  background-color: var(--white);
  position: relative;
}

.story-section::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 40px;
  background-color: var(--white);
  border-radius: 50% 50% 0 0;
}

.story-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.story-card {
  background: var(--light);
  border: 4px solid var(--dark);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 8px 8px 0 var(--secondary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 12px 12px 0 var(--primary);
}

.story-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  background: var(--white);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid var(--dark);
  box-shadow: 4px 4px 0 var(--secondary);
}

.story-card h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.story-card p {
  color: var(--darker);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Section styling */
.section-title {
  font-size: 3rem;
  margin-bottom: 16px;
  color: var(--dark);
}
.section-desc {
  font-size: 1.25rem;
  max-width: 600px;
  margin-bottom: 40px;
  margin-inline: auto;
}

/* Viral Section with Skew */
.skew-section {
  background: var(--primary);
  padding: 120px 0;
  transform: skewY(-3deg);
  margin-top: 60px;
  border-top: 4px solid var(--dark);
  border-bottom: 4px solid var(--dark);
}
.skew-reverse {
  transform: skewY(3deg);
}

.video-card {
  position: relative;
  width: 100%;
  max-width: 800px;
  border-radius: var(--radius-lg);
  border: 8px solid var(--dark);
  overflow: hidden;
  box-shadow: 15px 15px 0 var(--secondary);
  aspect-ratio: 16/9;
  background: #000;
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) grayscale(50%);
  opacity: 0.8;
}
.stats-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--dark);
  color: var(--secondary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: "Fredoka One", cursive;
  font-size: 1.2rem;
  z-index: 3;
  animation: tilt 3s ease-in-out infinite;
}

/* Chart Section */
.chart-section {
  background: var(--darker);
  padding: 100px 0;
}
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--light);
  padding: 60px 0;
  border-top: 5px dashed var(--secondary);
}
.footer-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  margin-bottom: 16px;
}
.footer h2 {
  margin-bottom: 8px;
  color: var(--primary);
}

/* Toast */
.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: bold;
  font-family: "Fredoka One", cursive;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--secondary);
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}
.toast.show {
  bottom: 40px;
}

/* Animations */
.floating {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
  100% {
    transform: translateY(0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(246, 133, 27, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(246, 133, 27, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(246, 133, 27, 0);
  }
}

@keyframes tilt {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}
.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}
.delay-3 {
  animation-delay: 0.6s;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Background Shapes */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  opacity: 0.6;
  filter: blur(4px);
}
.shape1 {
  width: 300px;
  height: 300px;
  background: var(--secondary);
  top: -100px;
  left: -100px;
  animation: float 8s infinite alternate;
}
.shape2 {
  width: 150px;
  height: 150px;
  background: var(--primary);
  bottom: 20%;
  right: 5%;
  animation: float 6s infinite alternate-reverse;
}
.shape3 {
  width: 80px;
  height: 80px;
  background: var(--dark);
  top: 40%;
  left: 10%;
  animation: float 5s infinite;
}

/* Responsive */
@media (max-width: 992px) {
  body {
    overflow-x: hidden;
  }
  .container {
    padding: 0 16px;
    overflow-x: hidden;
  }
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    width: 100%;
    margin: 0;
  }
  .hero-image-wrapper {
    order: -1;
    max-width: 400px;
  }
  .subtitle {
    margin: 0 auto 32px;
  }
  .socials {
    justify-content: center;
  }
  .ca-box {
    margin: 0 auto;
    text-align: left;
  }
  .title {
    font-size: 3.5rem;
  }
  .video-card {
    border-width: 4px;
  }
  .section-title {
    font-size: 2.5rem;
  }
  .story-cards {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-inline: auto;
  }
}
@media (max-width: 480px) {
  body {
    overflow-x: hidden;
  }
  .container {
    padding: 0 12px;
  }
  .title {
    font-size: 2.5rem;
  }
  .title .chinese {
    font-size: 1.8rem;
  }
  .social-link {
    width: 100%;
    justify-content: center;
  }
  #ca-text {
    font-size: 0.85rem;
  }
  .chart-container iframe {
    height: 400px;
  }
}
