/* ==================== AUTH STATUS BAR ==================== */

.auth-status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700) 1;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

/* User Status - Guest Mode */
#user-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.6);
  animation: neonFlicker 8s infinite;
  transition: color 0.3s ease;
}

/* Neon Flicker Animation */
@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 24%, 55% {
    opacity: 0.3;
  }
  22% {
    opacity: 0.6;
  }
}

/* User Status - Logged In */
#user-status.logged-in {
  animation: subtleFlicker 6s infinite;
  background: linear-gradient(135deg, rgba(0, 255, 127, 0.05) 0%, rgba(57, 255, 20, 0.05) 100%);
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid rgba(57, 255, 20, 0.4);
  color: #39ff14;
  text-shadow: 
    0 0 7px #39ff14,
    0 0 10px #39ff14,
    0 0 21px #39ff14,
    0 0 42px #0fa,
    0 0 82px #0fa,
    0 0 92px #0fa,
    0 0 102px #0fa,
    0 0 151px #0fa;
  box-shadow: 
    0 0 15px rgba(57, 255, 20, 0.5),
    inset 0 0 15px rgba(57, 255, 20, 0.2);
}

#user-status.logged-in::before {
  /* content: "👋"; */
  font-size: 18px;
  animation: wave 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.8));
}

@keyframes subtleFlicker {
  0%, 49%, 51%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30% {
    transform: rotate(14deg);
  }
  20%, 40% {
    transform: rotate(-8deg);
  }
  50% {
    transform: rotate(14deg);
  }
  60% {
    transform: rotate(0deg);
  }
}

.auth-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.auth-link {
  color: yellow;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.3s;
  background: none;
  /* border: 2px solid yellow; */
  cursor: pointer;
  text-shadow: #fc0 1px 0 10px;
}

.auth-link:hover {
  background: yellow;
  color: black;
  text-shadow: none;
}

.logout-btn {
  border-color: #f44336;
  color: #f44336;
  text-shadow: #f44336 1px 0 10px;
}

.logout-btn:hover {
  background: #f44336;
  color: white;
  text-shadow: none;
}

/* ==================== NEON SIGN BOX (Guest Mode) ==================== */

.form-wrapper {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
}

.neon-sign-box {
  flex-shrink: 0;
  width: 320px;
  display: none;
}

/* Show when user is in guest mode */
body.guest-mode .neon-sign-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.neon-border {
  position: relative;
  padding: 25px 30px;
  background: rgba(0, 0, 0, 0.95);
  border: 4px solid #ff006e;
  border-radius: 15px;
  box-shadow: 
    0 0 15px #ff006e,
    0 0 30px #ff006e,
    0 0 45px #ff006e,
    inset 0 0 15px rgba(255, 0, 110, 0.3);
  animation: neonSignFlicker 2s infinite, colorCycleSign 10s infinite;
}

#neon-sign-text {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.6;
  color: #ff006e;
  text-shadow: 
    0 0 8px #ff006e,
    0 0 15px #ff006e,
    0 0 25px #ff006e;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  animation: textColorCycle 10s infinite;
}

/* Intense Neon Flicker Animation */
@keyframes neonSignFlicker {
  0%, 10%, 12%, 18%, 20%, 60%, 62%, 100% {
    opacity: 1;
  }
  11%, 19%, 61% {
    opacity: 0.3;
  }
  13% {
    opacity: 0.6;
  }
}

/* Color Cycle for Border */
@keyframes colorCycleSign {
  0% {
    border-color: #ff006e;
    box-shadow: 
      0 0 15px #ff006e,
      0 0 30px #ff006e,
      0 0 45px #ff006e,
      inset 0 0 15px rgba(255, 0, 110, 0.3);
  }
  14.28% {
    border-color: #00d9ff;
    box-shadow: 
      0 0 15px #00d9ff,
      0 0 30px #00d9ff,
      0 0 45px #00d9ff,
      inset 0 0 15px rgba(0, 217, 255, 0.3);
  }
  28.56% {
    border-color: #39ff14;
    box-shadow: 
      0 0 15px #39ff14,
      0 0 30px #39ff14,
      0 0 45px #39ff14,
      inset 0 0 15px rgba(57, 255, 20, 0.3);
  }
  42.84% {
    border-color: #ffff00;
    box-shadow: 
      0 0 15px #ffff00,
      0 0 30px #ffff00,
      0 0 45px #ffff00,
      inset 0 0 15px rgba(255, 255, 0, 0.3);
  }
  57.12% {
    border-color: #bd00ff;
    box-shadow: 
      0 0 15px #bd00ff,
      0 0 30px #bd00ff,
      0 0 45px #bd00ff,
      inset 0 0 15px rgba(189, 0, 255, 0.3);
  }
  71.40% {
    border-color: #ff3131;
    box-shadow: 
      0 0 15px #ff3131,
      0 0 30px #ff3131,
      0 0 45px #ff3131,
      inset 0 0 15px rgba(255, 49, 49, 0.3);
  }
  85.68% {
    border-color: #ff9500;
    box-shadow: 
      0 0 15px #ff9500,
      0 0 30px #ff9500,
      0 0 45px #ff9500,
      inset 0 0 15px rgba(255, 149, 0, 0.3);
  }
  100% {
    border-color: #ff006e;
    box-shadow: 
      0 0 15px #ff006e,
      0 0 30px #ff006e,
      0 0 45px #ff006e,
      inset 0 0 15px rgba(255, 0, 110, 0.3);
  }
}

/* Text Color Cycle - Synced with Border */
@keyframes textColorCycle {
  0% {
    color: #ff006e;
    text-shadow: 
      0 0 8px #ff006e,
      0 0 15px #ff006e,
      0 0 25px #ff006e;
  }
  14.28% {
    color: #00d9ff;
    text-shadow: 
      0 0 8px #00d9ff,
      0 0 15px #00d9ff,
      0 0 25px #00d9ff;
  }
  28.56% {
    color: #39ff14;
    text-shadow: 
      0 0 8px #39ff14,
      0 0 15px #39ff14,
      0 0 25px #39ff14;
  }
  42.84% {
    color: #ffff00;
    text-shadow: 
      0 0 8px #ffff00,
      0 0 15px #ffff00,
      0 0 25px #ffff00;
  }
  57.12% {
    color: #bd00ff;
    text-shadow: 
      0 0 8px #bd00ff,
      0 0 15px #bd00ff,
      0 0 25px #bd00ff;
  }
  71.40% {
    color: #ff3131;
    text-shadow: 
      0 0 8px #ff3131,
      0 0 15px #ff3131,
      0 0 25px #ff3131;
  }
  85.68% {
    color: #ff9500;
    text-shadow: 
      0 0 8px #ff9500,
      0 0 15px #ff9500,
      0 0 25px #ff9500;
  }
  100% {
    color: #ff006e;
    text-shadow: 
      0 0 8px #ff006e,
      0 0 15px #ff006e,
      0 0 25px #ff006e;
  }
}

/* Hover Effect - Brighten */
.neon-border:hover {
  cursor: pointer;
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* ==================== AUTH FORMS ==================== */

.auth-form {
  max-width: 500px;
  width: 90%;
  margin: 0 auto;
}

.auth-form h1 {
  text-align: center;
  margin-bottom: 20px;
  color: white;
}

.auth-form .idea-input {
  margin-bottom: 20px;
  width: 100%;
  height: auto;
}

.auth-form .idea-input label {
  display: block;
  color: yellow;
  margin-bottom: 8px;
  font-weight: 600;
  text-shadow: #fc0 1px 0 10px;
}

.auth-form input {
  width: 100%;
  padding: 12px;
  background: #222;
  border: 2px solid #444;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  transition: border-color 0.3s;
}

.auth-form input:focus {
  outline: none;
  border-color: yellow;
}

.auth-form input::placeholder {
  color: #666;
}

.auth-form small {
  display: block;
  color: #999;
  font-size: 12px;
  margin-top: 5px;
}

/* Error Message */
.error-message {
  color: #ff5555;
  background: rgba(255, 85, 85, 0.1);
  border: 2px solid #ff5555;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, yellow 0%, #ffd700 100%);
  color: black;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Auth Switch Links */
.auth-switch {
  text-align: center;
  color: #ddd;
  font-size: 14px;
  margin-top: 15px;
}

.auth-switch a {
  color: yellow;
  text-decoration: none;
  font-weight: 600;
  text-shadow: #fc0 1px 0 10px;
  transition: color 0.3s;
}

.auth-switch a:hover {
  color: #ffd700;
}

/* Verify Info */
.verify-info {
  text-align: center;
  color: #ddd;
  margin-bottom: 25px;
  line-height: 1.8;
}

.verify-info strong {
  color: yellow;
  font-size: 16px;
  text-shadow: #fc0 1px 0 10px;
}

/* ==================== LOADING SPINNER ==================== */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(255, 215, 0, 0.2);
  border-top: 4px solid #ffd700;
  border-radius: 50%;
  animation: spin 1s linear infinite, neonPulse 2s ease-in-out infinite;
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.6),
    inset 0 0 20px rgba(255, 215, 0, 0.3);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(255, 215, 0, 0.6),
      inset 0 0 20px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 40px rgba(255, 215, 0, 0.9),
      inset 0 0 30px rgba(255, 215, 0, 0.5);
  }
}

.loading-text {
  margin-top: 20px;
  color: #ffd700;
  font-size: 18px;
  font-weight: 600;
  text-shadow:
    0 0 8px #ffd700,
    0 0 15px #ffd700;
  animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 1024px) {
  .form-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  .neon-sign-box {
    width: 100%;
    max-width: 400px;
    order: -1;
  }
}

@media (max-width: 600px) {
  .auth-status-bar {
    flex-direction: column;
    gap: 10px;
    padding: 8px 15px;
  }

  #user-status {
    font-size: 12px;
    text-align: center;
  }

  .auth-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .auth-form {
    width: 95%;
  }

  .auth-link {
    font-size: 12px;
    padding: 5px 10px;
  }
  
  .neon-sign-box {
    width: 95%;
  }
  
  .neon-border {
    padding: 20px 25px;
  }
  
  #neon-sign-text {
    font-size: 14px;
    letter-spacing: 1.5px;
  }
}