/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

/* Loader Container */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loader-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Main Content */
.loader-content {
  text-align: center;
  max-width: 90%;
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 10;
}

/* Brand Section */
.brand-section {
  margin-bottom: 3rem;
}

.viking-shield {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  position: relative;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(145deg, #8B4513, #A0522D);
  border: 4px solid #FFD700;
  box-shadow: 
    0 0 20px rgba(255, 215, 0, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.2);
  animation: shield-glow 3s ease-in-out infinite alternate;
}

.shield-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  border-radius: inherit;
  background: radial-gradient(circle, #CD853F, #8B4513);
  display: flex;
  align-items: center;
  justify-content: center;
}

.axe-icon {
  font-size: 2.5rem;
  animation: axe-rotate 4s linear infinite;
}

.game-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: bold;
  background: linear-gradient(45deg, #FFD700, #FFA500, #FF6B6B);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease-in-out infinite;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-text {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #B0C4DE;
  font-style: italic;
  animation: pulse-text 2s ease-in-out infinite;
}

/* Animation Section */
.animation-section {
  margin: 3rem 0;
  position: relative;
  height: 200px;
}

/* Viking Longboat Animation */
.viking-longboat {
  position: relative;
  width: 200px;
  height: 80px;
  margin: 0 auto;
  animation: boat-float 4s ease-in-out infinite;
}

.boat-body {
  width: 100%;
  height: 30px;
  background: linear-gradient(to bottom, #8B4513, #654321);
  border-radius: 50px 10px 10px 50px;
  position: absolute;
  bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sail {
  width: 40px;
  height: 60px;
  background: linear-gradient(45deg, #F5F5DC, #E6E6FA);
  border-radius: 0 20px 0 0;
  position: absolute;
  left: 50%;
  bottom: 50px;
  transform: translateX(-50%);
  animation: sail-wave 3s ease-in-out infinite;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

/* Waves Animation */
.waves {
  position: absolute;
  bottom: 0;
  width: 300px;
  left: 50%;
  transform: translateX(-50%);
  height: 20px;
}

.wave {
  position: absolute;
  width: 100px;
  height: 20px;
  background: rgba(64, 164, 223, 0.6);
  border-radius: 50px;
  animation: wave-motion 3s ease-in-out infinite;
}

.wave-1 { left: 0; animation-delay: 0s; }
.wave-2 { left: 80px; animation-delay: 0.5s; }
.wave-3 { left: 160px; animation-delay: 1s; }

/* Progress Bar */
.progress-bar {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin: 2rem auto;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD700, #FFA500, #FF6B6B, #FFD700);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: progress-fill 8s ease-in-out infinite, gradient-move 2s linear infinite;
  width: 0%;
}

/* Help Section */
.help-section {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 500px;
  width: 90%;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 15px;
  padding: 1.5rem;
  border: 2px solid rgba(255, 215, 0, 0.3);
  backdrop-filter: blur(10px);
  animation: slide-up 0.5s ease-out;
}

.help-section.hidden {
  display: none;
}

.help-content h3 {
  color: #FFD700;
  margin-bottom: 1rem;
  font-size: clamp(1.1rem, 4vw, 1.3rem);
}

.help-content p {
  margin-bottom: 1rem;
  color: #B0C4DE;
}

.help-content ul {
  list-style: none;
  margin-bottom: 1.5rem;
  text-align: left;
}

.help-content li {
  padding: 0.3rem 0;
  color: #E0E0E0;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.refresh-button {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  color: #000;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.refresh-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* Background Effects */
.background-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.snow-particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: snow-fall linear infinite;
}

.snow-particle:nth-child(1) {
  width: 4px; height: 4px;
  left: 10%; animation-duration: 8s; animation-delay: 0s;
}
.snow-particle:nth-child(2) {
  width: 6px; height: 6px;
  left: 30%; animation-duration: 10s; animation-delay: 2s;
}
.snow-particle:nth-child(3) {
  width: 3px; height: 3px;
  left: 50%; animation-duration: 12s; animation-delay: 4s;
}
.snow-particle:nth-child(4) {
  width: 5px; height: 5px;
  left: 70%; animation-duration: 9s; animation-delay: 1s;
}
.snow-particle:nth-child(5) {
  width: 4px; height: 4px;
  left: 90%; animation-duration: 11s; animation-delay: 3s;
}

/* Animations */
@keyframes shield-glow {
  0% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.2); }
  100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), inset 0 0 25px rgba(0, 0, 0, 0.1); }
}

@keyframes axe-rotate {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  75% { transform: rotate(-10deg); }
  100% { transform: rotate(0deg); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes boat-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(1deg); }
  75% { transform: translateY(3px) rotate(-1deg); }
}

@keyframes sail-wave {
  0%, 100% { transform: translateX(-50%) skewX(0deg); }
  50% { transform: translateX(-50%) skewX(5deg); }
}

@keyframes wave-motion {
  0%, 100% { transform: scaleX(1) translateY(0px); opacity: 0.6; }
  50% { transform: scaleX(1.2) translateY(-3px); opacity: 0.8; }
}

@keyframes progress-fill {
  0% { width: 0%; }
  100% { width: 85%; }
}

@keyframes gradient-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes slide-up {
  0% { transform: translateX(-50%) translateY(20px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes snow-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .loader-content { max-width: 95%; }
  .viking-shield { width: 80px; height: 80px; }
  .animation-section { height: 150px; }
  .viking-longboat { width: 150px; height: 60px; }
  .help-section { bottom: 1rem; padding: 1rem; }
}

@media (max-width: 480px) {
  .brand-section { margin-bottom: 2rem; }
  .animation-section { margin: 2rem 0; height: 120px; }
  .viking-shield { width: 60px; height: 60px; }
  .axe-icon { font-size: 1.5rem; }
  .viking-longboat { width: 120px; height: 45px; }
  .boat-body { height: 20px; }
  .sail { width: 30px; height: 40px; }
}

