@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --gold: #ffd54f;
  --gold-deep: #ff8f00;
  --cyan: #4dd0e1;
  --panel: rgba(6, 18, 42, 0.82);
  --panel-border: rgba(255, 213, 79, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Noto Sans SC", "Segoe UI", sans-serif;
  overflow: hidden;
  background: #020a14;
  color: #eef6ff;
}

/* ---- Full-screen cinematic background ---- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.scene-bg {
  position: absolute;
  inset: 0;
  background: url('/assets/login-bg-hd.png') center center / cover no-repeat;
  animation: bgZoom 28s ease-in-out infinite alternate;
}

@keyframes bgZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, transparent 30%, rgba(2, 8, 20, 0.75) 100%),
    linear-gradient(180deg, rgba(2, 10, 24, 0.35) 0%, rgba(2, 10, 24, 0.15) 40%, rgba(2, 10, 24, 0.55) 100%);
  pointer-events: none;
}

.scene-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 35% at 50% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  animation: shinePulse 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shinePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ---- Fish school (GIF sprites face down; rotate to swim horizontally) ---- */
.fish-school {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.fish-wrap {
  position: absolute;
  left: 0;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  will-change: transform;
}

.fish-wrap.dir-right { animation-name: swimRight; }
.fish-wrap.dir-left  { animation-name: swimLeft; }

@keyframes swimRight {
  from { transform: translateX(-22vw); }
  to   { transform: translateX(115vw); }
}

@keyframes swimLeft {
  from { transform: translateX(115vw); }
  to   { transform: translateX(-22vw); }
}

.fish-img {
  display: block;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* head points down in source → -90° = right, +90° = left */
.fish-wrap.dir-right .fish-img {
  transform: rotate(-90deg);
  animation: fishWobbleR ease-in-out infinite;
}
.fish-wrap.dir-left .fish-img {
  transform: rotate(90deg);
  animation: fishWobbleL ease-in-out infinite;
}

@keyframes fishWobbleR {
  0%, 100% { transform: rotate(-90deg) translateY(0); }
  50%      { transform: rotate(-87deg) translateY(-7px); }
}
@keyframes fishWobbleL {
  0%, 100% { transform: rotate(90deg) translateY(0); }
  50%      { transform: rotate(87deg) translateY(-7px); }
}

.layer-back  { opacity: 0.4;  filter: blur(0.6px); }
.layer-mid   { opacity: 0.65; }
.layer-front { opacity: 0.88; }
.layer-boss  { opacity: 1; z-index: 5; }
.layer-boss .fish-img {
  filter: drop-shadow(0 0 18px rgba(255, 193, 7, 0.55)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.particles span {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 6px rgba(77, 208, 225, 0.5);
  animation: rise linear infinite;
  pointer-events: none;
}

@keyframes rise {
  to { transform: translateY(-105vh); opacity: 0; }
}

/* ---- Login layout ---- */
.login-wrap {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  gap: 0;
}

.brand-panel {
  text-align: center;
  margin-bottom: 28px;
}

.logo-ring {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(145deg, #ffe082, #ff8f00, #ff6f00, #ffe082);
  box-shadow:
    0 0 40px rgba(255, 193, 7, 0.45),
    0 8px 32px rgba(0, 0, 0, 0.5);
  animation: logoFloat 4s ease-in-out infinite;
}

.logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.game-title {
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-shadow:
    0 0 30px rgba(255, 193, 7, 0.5),
    0 3px 8px rgba(0, 0, 0, 0.6);
  background: linear-gradient(180deg, #fffde7 0%, #ffd54f 35%, #ff8f00 70%, #ff6f00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-sub {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: rgba(180, 220, 255, 0.7);
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

/* ---- Login card ---- */
.login-panel {
  width: 100%;
  max-width: 400px;
  padding: 28px 32px 32px;
  background: var(--panel);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(255, 152, 0, 0.08);
  position: relative;
}

.login-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

.panel-header {
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 213, 79, 0.15);
}

.login-panel label {
  display: block;
  font-size: 0.75rem;
  color: rgba(160, 200, 230, 0.85);
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}

.login-panel input {
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 18px;
  border-radius: 10px;
  border: 1px solid rgba(77, 208, 225, 0.2);
  background: rgba(2, 12, 30, 0.7);
  color: #fff;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-panel input::placeholder { color: rgba(120, 160, 190, 0.5); }
.login-panel input:focus {
  border-color: rgba(255, 213, 79, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.12);
}

.btn-gold {
  width: 100%;
  margin-top: 6px;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  color: #3e2723;
  background: linear-gradient(180deg, #fff8e1 0%, #ffd54f 30%, #ff8f00 100%);
  box-shadow:
    0 6px 0 #e65100,
    0 8px 24px rgba(255, 152, 0, 0.4);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 0 #e65100,
    0 12px 32px rgba(255, 152, 0, 0.5);
}
.btn-gold:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #e65100,
    0 4px 12px rgba(255, 152, 0, 0.3);
}

.error {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: #ff8a80;
  text-align: center;
}
.hidden { display: none !important; }

.footer-note {
  margin-top: 28px;
  font-size: 0.6875rem;
  color: rgba(150, 180, 210, 0.4);
  letter-spacing: 0.1em;
}

@media (max-width: 480px) {
  .game-title { font-size: 2rem; letter-spacing: 0.1em; }
  .logo-ring { width: 100px; height: 100px; }
  .login-panel { padding: 24px 22px 28px; }
}
