#login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(6, 24, 44, 0.95) 0%, rgba(4, 12, 24, 0.98) 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zM22.344 0L13.858 8.485 15.272 9.9l7.9-7.9h-.828zm5.656 0l-8.485 8.485 1.414 1.414L28.828 0h-.828z' fill='%230ea5e9' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  z-index: 1000;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.6s ease-out;
}

#login-form {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 100%);
  backdrop-filter: blur(20px);
  padding: 60px 50px;
  border-radius: 24px;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(14, 165, 233, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  transform: translateY(0);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  max-width: 550px;
  max-height: 90vh;
}

#login-form::-webkit-scrollbar {
  width: 8px;
}

#login-form::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 4px;
}

#login-form::-webkit-scrollbar-thumb {
  background: rgba(14, 165, 233, 0.4);
  border-radius: 4px;
}

#login-form::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 165, 233, 0.6);
}

#login-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
  animation: shimmer 3s infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  display: block;
  filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.5));
  animation: logoFloat 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

#login-form h1 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 32px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  text-shadow:
    0 0 20px rgba(14, 165, 233, 0.6),
    0 0 40px rgba(6, 182, 212, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.8);
  letter-spacing: 2px;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes titleGlow {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 35px rgba(6, 182, 212, 0.8));
  }
}

/* Game Tagline */
.game-tagline {
  color: rgba(148, 163, 184, 0.9);
  font-size: 20px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 2px;
  margin: -5px 0 20px 0;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
  position: relative;
  z-index: 1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Player Count Badge */
.player-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 20px;
  padding: 8px 16px;
  margin-bottom: 20px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #4ade80;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
  position: relative;
  z-index: 1;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
}

/* Input Hint */
.input-hint {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.6);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  margin: -15px 0 20px 0;
  animation: fadeInUp 0.8s ease-out 0.5s backwards;
  position: relative;
  z-index: 1;
}

.input-hint kbd {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Rajdhani', monospace;
  font-size: 12px;
  color: #0ea5e9;
}

/* How to Play Section */
.how-to-play-section {
  margin-top: 20px;
  animation: fadeInUp 0.8s ease-out 0.6s backwards;
  position: relative;
  z-index: 1;
}

.how-to-play-toggle {
  width: 100%;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.how-to-play-toggle:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.4);
}

.toggle-arrow {
  transition: transform 0.3s ease;
  font-size: 12px;
}

.how-to-play-toggle.active .toggle-arrow {
  transform: rotate(180deg);
}

.how-to-play-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), overflow 0s 0.4s;
}

.how-to-play-content.active {
  max-height: min(400px, 35vh);
  overflow-y: auto;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.how-to-play-content::-webkit-scrollbar {
  width: 8px;
}

.how-to-play-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 4px;
}

.how-to-play-content::-webkit-scrollbar-thumb {
  background: rgba(14, 165, 233, 0.4);
  border-radius: 4px;
}

.how-to-play-content::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 165, 233, 0.6);
}

/* Guide Tabs */
.guide-tabs {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 8px 8px 0 0;
  margin-top: 8px;
  border-bottom: 2px solid rgba(148, 163, 184, 0.1);
  position: relative;
  z-index: 2;
}

.guide-tab {
  flex: 1;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.guide-tab:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.4);
  color: rgba(255, 255, 255, 0.9);
}

.guide-tab.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(6, 182, 212, 0.2));
  border-color: #0ea5e9;
  color: #fff;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
}

/* Guide Content */
.guide-content {
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 0 0 8px 8px;
  max-height: min(400px, 45vh);
  overflow-y: auto;
  position: relative;
  z-index: 2;
}

.guide-content::-webkit-scrollbar {
  width: 6px;
}

.guide-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 3px;
}

.guide-content::-webkit-scrollbar-thumb {
  background: rgba(14, 165, 233, 0.5);
  border-radius: 3px;
}

.guide-content::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 165, 233, 0.7);
}

.guide-panel {
  display: none;
}

.guide-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Guide Items */
.guide-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 6px;
  border-left: 3px solid rgba(14, 165, 233, 0.3);
  transition: all 0.2s ease;
}

.guide-item:hover {
  background: rgba(30, 41, 59, 0.6);
  border-left-color: #0ea5e9;
  transform: translateX(4px);
}

.guide-item:last-child {
  margin-bottom: 0;
}

.guide-item.diminishing-returns {
  border-left-color: rgba(251, 191, 36, 0.5);
}

.guide-item.diminishing-returns:hover {
  border-left-color: #fbbf24;
}

.guide-icon {
  font-size: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.guide-item strong {
  display: block;
  color: #0ea5e9;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
  text-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}

.guide-item p {
  margin: 0;
  color: rgba(203, 213, 225, 0.9);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.guide-item kbd {
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(14, 165, 233, 0.4);
  border-radius: 3px;
  padding: 2px 5px;
  font-family: 'Rajdhani', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #0ea5e9;
  text-shadow: 0 0 6px rgba(14, 165, 233, 0.5);
}

/* Login Footer */
.login-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  animation: fadeInUp 0.8s ease-out 0.7s backwards;
  position: relative;
  z-index: 1;
}

.version-text {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.5);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  margin: 0;
}

/* Ocean Decorations */
.ocean-decorations {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.sailing-ship {
  position: absolute;
  font-size: 48px;
  opacity: 0.3;
  filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.5));
}

.ship-1 {
  top: 15%;
  animation: sailAcross 40s linear infinite;
}

.ship-2 {
  top: 60%;
  animation: sailAcross 50s linear infinite 10s;
  font-size: 56px;
}

.ship-3 {
  top: 35%;
  animation: sailAcross 45s linear infinite 20s;
}

@keyframes sailAcross {
  0% {
    left: -100px;
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
  100% {
    left: calc(100% + 100px);
    transform: translateY(0) rotate(-5deg);
  }
}

.treasure-float {
  position: absolute;
  top: 70%;
  right: 10%;
  font-size: 36px;
  opacity: 0.4;
  animation: treasureBob 4s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.6));
}

@keyframes treasureBob {
  0%, 100% {
    transform: translateY(0) rotate(-10deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}

.fish-swim {
  position: absolute;
  font-size: 24px;
  opacity: 0.35;
}

.fish-1 {
  top: 25%;
  left: 20%;
  animation: fishSwim1 15s ease-in-out infinite;
}

.fish-2 {
  top: 50%;
  right: 15%;
  animation: fishSwim2 12s ease-in-out infinite 3s;
}

@keyframes fishSwim1 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(50px, -30px) rotate(15deg);
  }
  50% {
    transform: translate(100px, 0) rotate(0deg);
  }
  75% {
    transform: translate(50px, 30px) rotate(-15deg);
  }
}

@keyframes fishSwim2 {
  0%, 100% {
    transform: translate(0, 0) scaleX(-1) rotate(0deg);
  }
  25% {
    transform: translate(-60px, 40px) scaleX(-1) rotate(-15deg);
  }
  50% {
    transform: translate(-120px, 0) scaleX(-1) rotate(0deg);
  }
  75% {
    transform: translate(-60px, -40px) scaleX(-1) rotate(15deg);
  }
}

.compass-rose {
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 64px;
  opacity: 0.2;
  animation: compassSpin 60s linear infinite;
  filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.4));
}

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

/* Waves Container */
.waves-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.waves {
  position: absolute;
