/* --- Auth visibility --- */
.auth-hidden {
  display: none !important;
}

/* --- Sign-in modal overlay --- */
#signin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 30, 60, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#signin-modal.active {
  display: flex;
}

/* --- Modal card --- */
.signin-card {
  background: linear-gradient(135deg, #0a2a4a, #0d3b66);
  border: 1px solid rgba(100, 200, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  width: 340px;
  max-width: 90vw;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.signin-card h2 {
  color: #7fdbff;
  text-align: center;
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
}

.signin-card .signin-subtitle {
  color: rgba(127, 219, 255, 0.6);
  text-align: center;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* --- Form inputs --- */
.signin-card input {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(100, 200, 255, 0.2);
  border-radius: 8px;
  color: #e0f0ff;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.signin-card input::placeholder {
  color: rgba(127, 219, 255, 0.4);
}

.signin-card input:focus {
  outline: none;
  border-color: #7fdbff;
  box-shadow: 0 0 8px rgba(127, 219, 255, 0.3);
}

/* --- Submit button --- */
.signin-card button[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #1a8a5c, #2bb87e);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: opacity 0.2s;
}

.signin-card button[type="submit"]:hover {
  opacity: 0.9;
}

.signin-card button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* --- Close button --- */
.signin-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(127, 219, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.signin-close:hover {
  color: #7fdbff;
}

/* --- Bubble animation (background decoration) --- */
@keyframes bubble-rise {
  0% { transform: translateY(100%) scale(0.5); opacity: 0.6; }
  100% { transform: translateY(-120%) scale(1); opacity: 0; }
}

.signin-card::before,
.signin-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(127, 219, 255, 0.08);
  animation: bubble-rise 4s ease-in infinite;
  pointer-events: none;
}

.signin-card::before {
  width: 20px;
  height: 20px;
  left: 15%;
  bottom: 0;
  animation-delay: 0s;
}

.signin-card::after {
  width: 14px;
  height: 14px;
  left: 70%;
  bottom: 0;
  animation-delay: 2s;
  animation-duration: 5s;
}

/* --- Success animation --- */
@keyframes auth-success-flash {
  0% { box-shadow: 0 0 0 rgba(43, 184, 126, 0); }
  50% { box-shadow: 0 0 40px rgba(43, 184, 126, 0.6); }
  100% { box-shadow: 0 0 0 rgba(43, 184, 126, 0); }
}

#signin-modal.auth-success .signin-card {
  animation: auth-success-flash 1.2s ease-out;
  border-color: #2bb87e;
}

/* --- Failure animation (shake) --- */
@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

#signin-modal.auth-error .signin-card {
  animation: auth-shake 0.5s ease-out;
  border-color: #ff6b6b;
}

/* --- Guppy fish icon --- */
.signin-fish {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* --- Account hamburger menu --- */
.account-dropdown {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.account-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
}

.account-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.account-toggle:hover span {
  opacity: 1;
}

.account-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.4rem;
  padding: 0.4rem 0;
  background: rgba(10, 20, 35, 0.95);
  border: 1px solid rgba(100, 160, 220, 0.15);
  border-radius: 8px;
  min-width: 140px;
  z-index: 100;
}

.account-menu.open {
  display: flex;
  flex-direction: column;
}

.account-menu a {
  display: block;
  padding: 0.4rem 0.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s, background 0.2s;
  white-space: nowrap;
}

.account-menu a:hover {
  opacity: 0.8;
  background: rgba(100, 160, 220, 0.1);
}
