body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000c1a;
  font-family: "Outfit", system-ui, sans-serif;
  user-select: none;
}

canvas {
  display: block;
}

kbd {
  background: linear-gradient(180deg, #1976d2 0%, #0d47a1 100%);
  padding: 3px 10px;
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  border: 1px solid #2196f3;
  box-shadow: 0 3px 0 #0a3580;
  margin: 0 2px;
  font-size: 11px;
  font-weight: bold;
}

/* Icon Stack for counts */
.icon-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-count {
  position: absolute;
  bottom: -8px;
  right: -8px;
  background: #333;
  color: #fff;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #021a30 0%, #000c1a 100%);
  z-index: 10000;
  /* Highest priority */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.8s ease-out;
}

#loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  position: relative;
}

.loading-title {
  font-family: "Uncial Antiqua", serif;
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 40px 0;
  letter-spacing: 4px;
  text-transform: uppercase;
  filter: drop-shadow(0 0 20px rgba(79, 195, 247, 0.4));
  animation: title-float 3s ease-in-out infinite;
}

.loading-spinner {
  margin-bottom: 30px;
}

.ship-wheel {
  font-size: 80px;
  display: inline-block;
  animation: wheel-spin 3s linear infinite;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

.loading-text {
  color: #b3e5fc;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 1px;
  opacity: 0.8;
  animation: text-pulse 1.5s ease-in-out infinite;
}

.loading-bar-container {
  width: 400px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.loading-bar {
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, #4fc3f7, #0288d1);
  border-radius: 10px;
  position: absolute;
  left: 0;
  top: 0;
  animation: bar-load 2s infinite ease-in-out;
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

@keyframes wheel-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes title-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes text-pulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

@keyframes bar-load {
  0% {
    left: -30%;
  }

  50% {
    left: 40%;
    width: 50%;
  }

  100% {
    left: 100%;
  }
}

/* Login Screen */
#login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url("../images/login/background.jpeg") no-repeat center center fixed;
  background-size: cover;
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-in-out;
  overflow: hidden;
}

/* removed ripple effect for performance/clean look with new background */

@keyframes ocean-pulse {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#register-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url("../images/login/background.jpeg") no-repeat center center fixed;
  background-size: cover;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.5s ease-in-out;
}

.login-content {
  position: relative;
  text-align: center;
  background: rgba(13, 27, 42, 0.3);
  padding: 30px 40px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: 420px;
  width: 90%;
  animation: modal-enter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

/* Shine effect on top of card */
.login-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(79, 195, 247, 0.5),
      transparent);
}

.login-logo {
  max-width: 200px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(79, 195, 247, 0.3));
}

@keyframes modal-enter {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-title {
  font-family: "Uncial Antiqua", serif;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 10px 0;
  background: linear-gradient(to right, #4fc3f7, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px rgba(79, 195, 247, 0.3);
}

.login-subtitle {
  color: #8b9bb4;
  font-size: 1rem;
  margin-bottom: 35px;
  font-weight: 400;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  position: relative;
  transition: transform 0.2s ease;
}

.input-group:focus-within {
  transform: translateY(-2px);
}

.input-group .icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.input-group input {
  width: 100%;
  padding: 16px 20px 16px 55px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  color: #fff;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-group input:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(79, 195, 247, 0.5);
  box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.1);
}

.input-group:focus-within .icon {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.login-btn {
  margin-top: 10px;
  padding: 18px;
  background: linear-gradient(135deg, #0288d1 0%, #01579b 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-family: "Outfit", system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px -5px rgba(2, 136, 209, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.login-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: 0.5s;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(2, 136, 209, 0.6);
  background: linear-gradient(135deg, #039be5 0%, #0277bd 100%);
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:active {
  transform: translateY(1px);
  box-shadow: 0 5px 15px -3px rgba(2, 136, 209, 0.4);
}

.error-text {
  color: #ff5252;
  font-size: 0.9rem;
  min-height: 20px;
  margin-top: 5px;
  text-shadow: 0 0 10px rgba(255, 82, 82, 0.3);
  font-weight: 500;
}

.login-info {
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  line-height: 1.6;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Legal Footer */
.legal-footer {
  margin-top: 15px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.legal-footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.2s ease;
}

.legal-footer a:hover {
  color: #00d2ff;
  text-decoration: none;
}

.legal-footer .separator {
  font-size: 0.7rem;
}

.uncial-antiqua-regular {
  font-family: "Uncial Antiqua", system-ui;
  font-weight: 400;
  font-style: normal;
}