/* Notebook paper background */
.notebook-bg {
  background-image:
    repeating-linear-gradient(
      transparent,
      transparent 31px,
      #e8e4df 31px,
      #e8e4df 32px
    );
  background-position: 0 40px;
}

/* Hand-drawn border effect */
.sketchy-border {
  border: 2.5px solid #2D2D2D;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}

.sketchy-border-grok {
  border: 2.5px solid #7C5CFC;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}

.sketchy-border-chatgpt {
  border: 2.5px solid #10A37F;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}

/* Speech bubble */
.speech-bubble {
  position: relative;
  border-radius: 20px 20px 20px 5px;
  border: 2px solid #2D2D2D;
}

.speech-bubble-right {
  position: relative;
  border-radius: 20px 20px 5px 20px;
  border: 2px solid #2D2D2D;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #fff;
}

.speech-bubble-right::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #fff;
}

/* Wobble animation */
@keyframes wobble {
  0%, 100% { transform: rotate(-1deg); }
  25% { transform: rotate(1deg); }
  50% { transform: rotate(-0.5deg); }
  75% { transform: rotate(0.5deg); }
}

.wobble-hover:hover {
  animation: wobble 0.4s ease-in-out;
}

/* Bounce in animation */
@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.bounce-in {
  animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Slide up animation */
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.slide-up {
  animation: slideUp 0.4s ease-out;
}

/* Typing cursor */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor::after {
  content: '|';
  animation: blink 0.7s infinite;
  color: #2D2D2D;
  font-weight: bold;
}

/* Pencil scribble animation */
@keyframes scribble {
  0% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(2px, -2px) rotate(5deg); }
  20% { transform: translate(-1px, 1px) rotate(-3deg); }
  30% { transform: translate(3px, 0) rotate(2deg); }
  40% { transform: translate(-2px, -1px) rotate(-5deg); }
  50% { transform: translate(1px, 2px) rotate(3deg); }
  60% { transform: translate(-3px, -2px) rotate(-2deg); }
  70% { transform: translate(2px, 1px) rotate(4deg); }
  80% { transform: translate(0, -3px) rotate(-4deg); }
  90% { transform: translate(-1px, 2px) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.scribble-anim {
  animation: scribble 0.3s infinite linear;
}

/* Confetti animation */
@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall 3s ease-in forwards;
  z-index: 9999;
  pointer-events: none;
}

/* VS badge pulse */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 209, 102, 0.5); }
  50% { box-shadow: 0 0 25px rgba(255, 209, 102, 0.9), 0 0 40px rgba(255, 209, 102, 0.4); }
}

.vs-pulse {
  animation: pulse-glow 1.5s infinite;
}

/* Energy lines */
@keyframes zap {
  0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
  50% { opacity: 1; transform: scaleX(1.1); }
}

.energy-line {
  animation: zap 0.8s infinite ease-in-out;
}

/* Crown bounce */
@keyframes crownBounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

.crown-bounce {
  animation: crownBounce 1s infinite ease-in-out;
}

/* Pencil mascot */
@keyframes pencilDance {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  25% { transform: rotate(5deg) translateY(-3px); }
  50% { transform: rotate(-3deg) translateY(-1px); }
  75% { transform: rotate(3deg) translateY(-4px); }
}

.pencil-dance {
  animation: pencilDance 2s ease-in-out infinite;
}

.pencil-excited {
  animation: pencilDance 0.3s ease-in-out infinite;
}

/* Card pin effect */
.pin-card {
  transform: rotate(-1deg);
  transition: transform 0.2s ease;
}

.pin-card:nth-child(even) {
  transform: rotate(0.5deg);
}

.pin-card:nth-child(3n) {
  transform: rotate(-0.5deg);
}

.pin-card:hover {
  transform: rotate(0deg) scale(1.02);
  z-index: 10;
}

/* Tug of war bar */
.tug-bar-grok {
  background: linear-gradient(90deg, #7C5CFC, #B8A5FF);
  transition: width 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.tug-bar-chatgpt {
  background: linear-gradient(90deg, #6DD4B1, #10A37F);
  transition: width 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Tab underline */
.tab-active {
  position: relative;
}

.tab-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: #FFD166;
  border-radius: 2px;
}

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

::-webkit-scrollbar-track {
  background: #FFF8F0;
}

::-webkit-scrollbar-thumb {
  background: #C4956A;
  border-radius: 4px;
}

/* Article content styling */
.article-content h1 { font-size: 1.8em; font-weight: bold; margin: 0.8em 0 0.4em; }
.article-content h2 { font-size: 1.4em; font-weight: bold; margin: 0.7em 0 0.3em; }
.article-content h3 { font-size: 1.2em; font-weight: bold; margin: 0.6em 0 0.3em; }
.article-content p { margin: 0.5em 0; line-height: 1.7; }
.article-content ul, .article-content ol { margin: 0.5em 0; padding-left: 1.5em; }
.article-content li { margin: 0.2em 0; }
.article-content blockquote { border-left: 3px solid #FFD166; padding-left: 1em; margin: 0.5em 0; font-style: italic; }