/* Polandball Universe - Main Stylesheet */

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  overflow-x: hidden;
}

/* ===== Typography ===== */
.font-bangers {
  font-family: 'Bangers', cursive;
  letter-spacing: 1px;
}

.font-comic {
  font-family: 'Comic Neue', cursive;
}

/* ===== Poland Gradient ===== */
.poland-gradient {
  background: linear-gradient(180deg, #dc143c 50%, #ffffff 50%);
}

/* ===== Ball Styles ===== */
.ball-shadow {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.ball-hover {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.ball-hover:hover {
  transform: translateY(-8px) scale(1.1);
}

/* ===== Hero Section ===== */
.hero-section {
  position: relative;
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

.hero-main-ball {
  transition: transform 0.3s ease;
}

.hero-main-ball:hover {
  transform: scale(1.1) rotate(5deg);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0) rotate(0deg); 
  }
  50% { 
    transform: translateY(-20px) rotate(3deg); 
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

.animate-wiggle {
  animation: wiggle 2s ease-in-out infinite;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-bounce-slow {
  animation: bounce 2s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spin 10s linear infinite;
}

.eyes-blink {
  animation: blink 4s infinite;
  transform-origin: center;
}

/* ===== Fun Pattern Background ===== */
.fun-pattern {
  background-color: #fef6e4;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 107, 107, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(78, 205, 196, 0.05) 0%, transparent 50%);
}

/* ===== Speech Bubbles ===== */
.speech-bubble {
  position: relative;
  background: #ffffff;
  border-radius: 1.5em;
  padding: 1em;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 30px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-top-color: #ffffff;
  border-bottom: 0;
  margin-left: -10px;
}

/* ===== Country Cards ===== */
.country-card {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.country-card:hover {
  transform: translateY(-5px) rotate(2deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ===== Impact Cards ===== */
.impact-card {
  transition: all 0.3s ease;
}

.impact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ===== Canvas Styles ===== */
#drawing-canvas {
  touch-action: none;
}

/* ===== Navigation ===== */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #dc143c;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* ===== Dark Mode ===== */
.dark body {
  background-color: #1a1a2e;
  color: #eee;
}

.dark .bg-white {
  background-color: #16213e;
}

.dark .bg-gray-50,
.dark .bg-gray-100 {
  background-color: #0f3460;
}

.dark .text-gray-700,
.dark .text-gray-800 {
  color: #e1e1e1;
}

.dark .fun-pattern {
  background-color: #1a1a2e;
}

/* ===== Timeline ===== */
.timeline-item {
  position: relative;
}

.timeline-dot {
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(220, 20, 60, 0.5);
}

/* ===== Quiz Styles ===== */
.quiz-option {
  transition: all 0.2s ease;
}

.quiz-option:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quiz-option.correct {
  background-color: #10b981;
  color: white;
}

.quiz-option.wrong {
  background-color: #ef4444;
  color: white;
}

/* ===== Modal ===== */
#modal {
  transition: opacity 0.3s ease;
}

#modal-content {
  animation: modalPop 0.3s ease;
}

@keyframes modalPop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== Button Effects ===== */
button {
  transition: all 0.2s ease;
}

button:active {
  transform: scale(0.95);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #dc143c;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b01030;
}

/* ===== Selection ===== */
::selection {
  background: #dc143c;
  color: white;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-section {
    min-height: 80vh;
  }
  
  .animate-float {
    animation-duration: 6s;
  }
  
  .floating-balls > div {
    transform: scale(0.7);
  }
}

/* ===== Filter Buttons ===== */
.filter-btn.active {
  background-color: #dc143c;
  color: white;
}

/* ===== Guide Steps ===== */
.guide-step {
  transition: all 0.3s ease;
}

.guide-step:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== Tool Buttons ===== */
.tool-btn.active {
  background-color: #dc143c !important;
  color: white !important;
}

/* ===== Color Buttons ===== */
.color-btn {
  transition: transform 0.2s ease;
  border: 2px solid transparent;
}

.color-btn:hover {
  transform: scale(1.15);
  border-color: #333;
}

/* ===== Loading Animation ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

/* ===== Confetti Canvas ===== */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ===== Glass Effect ===== */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(135deg, #dc143c 0%, #ff6b6b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Pulse Animation for Attention ===== */
@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.pulse-ring {
  position: absolute;
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
