/* Retro Amiga/CRT Login Screen Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --neon-pink: #ff00ff;
  --neon-cyan: #00ffff;
  --neon-orange: #ff6b00;
  --neon-yellow: #ffde00;
  --deep-purple: #0a0015;
  --mid-purple: #1a0a2e;
  --amiga-blue: #0055aa;
  --amiga-orange: #ff8800;
  --amiga-gray: #888888;
}

body {
  min-height: 100vh;
  background: var(--deep-purple);
  font-family: 'Press Start 2P', monospace;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

/* Scanline overlay - disabled to prevent moiré with grid */
.scanlines {
  display: none;
}

/* CRT screen curve effect */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
}

/* Perspective grid */
.grid-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  overflow: hidden;
  z-index: 1;
  perspective: 150px;
}

.grid {
  position: absolute;
  width: 400%;
  left: -150%;
  height: 200%;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Crect fill='none' stroke='%23ff00ff' stroke-width='3' x='0' y='0' width='80' height='80'/%3E%3C/svg%3E");
  background-size: 80px 80px;
  transform: rotateX(65deg);
  transform-origin: 50% 100%;
  opacity: 0.5;
  animation: gridScroll 8s linear infinite;
}

@keyframes gridScroll {
  from { background-position: 0 0; }
  to { background-position: 0 80px; }
}

/* Main container */
.main-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 20px;
}

/* Logo area */
.logo-container {
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

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

.logo-text {
  font-size: 48px;
  background: linear-gradient(180deg, #fff 0%, var(--neon-cyan) 50%, var(--neon-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px var(--neon-cyan);
  filter: drop-shadow(0 0 20px var(--neon-cyan)) drop-shadow(0 0 40px var(--neon-pink));
  letter-spacing: 8px;
}

.logo-subtitle {
  font-size: 14px;
  color: var(--neon-yellow);
  margin-top: 10px;
  letter-spacing: 6px;
  text-shadow: 0 0 10px var(--neon-yellow);
  animation: flicker 4s linear infinite;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.6; }
}

/* Amiga-style floppy disk icon */
.floppy-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
}

.floppy {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
  border: 3px solid #555;
  border-radius: 4px;
  position: relative;
  animation: diskPulse 0.5s ease-in-out infinite;
}

.floppy::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 24px;
  background: #888;
  border-radius: 2px;
}

.floppy::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 16px;
  background: linear-gradient(90deg, #222 0%, #333 50%, #222 100%);
  border: 1px solid #444;
}

.floppy-led {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background: var(--neon-orange);
  border-radius: 50%;
  animation: ledBlink 0.2s steps(1) infinite;
  box-shadow: 0 0 8px var(--neon-orange);
}

@keyframes diskPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes ledBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.3; }
}

/* Loading bar */
.loading-section {
  width: 100%;
  max-width: 400px;
}

.loading-text {
  font-size: 10px;
  color: var(--neon-cyan);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  text-shadow: 0 0 10px var(--neon-cyan);
}

.loading-bar-container {
  width: 100%;
  height: 24px;
  background: #111;
  border: 3px solid var(--amiga-gray);
  position: relative;
  overflow: hidden;
}

.loading-bar-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg,
    var(--amiga-blue) 0%,
    var(--neon-cyan) 50%,
    var(--amiga-blue) 100%
  );
  width: 0%;
  transition: width 0.1s ease-out;
  position: relative;
}

.loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 8px,
    rgba(0,0,0,0.3) 8px,
    rgba(0,0,0,0.3) 16px
  );
}

/* Login box */
.login-container {
  background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%);
  border: 4px solid;
  border-image: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink)) 1;
  padding: 30px 40px;
  padding-top: 40px;
  width: 100%;
  max-width: 520px;
  position: relative;
  box-shadow:
    0 0 30px rgba(0, 255, 255, 0.3),
    0 0 60px rgba(255, 0, 255, 0.2),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.login-container::before {
  content: '[ SYSTEM ACCESS ]';
  position: absolute;
  top: -24px;
  left: 20px;
  background: var(--deep-purple);
  padding: 4px 12px;
  font-size: 10px;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px var(--neon-yellow);
}

.login-title {
  font-size: 12px;
  color: var(--neon-cyan);
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 15px var(--neon-cyan);
  white-space: nowrap;
}

.login-message {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.8;
}

.login-message .highlight {
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
}

/* Google Sign-In Button - Retro styled */
.google-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 50%, #2a2a4a 100%);
  border: 3px solid var(--amiga-gray);
  border-top-color: #aaa;
  border-left-color: #aaa;
  border-bottom-color: #444;
  border-right-color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  transition: all 0.1s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.google-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: btnShine 3s linear infinite;
}

@keyframes btnShine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.google-btn:hover {
  background: linear-gradient(180deg, #3a3a5a 0%, #2a2a3e 50%, #3a3a5a 100%);
  border-top-color: #ccc;
  border-left-color: #ccc;
  box-shadow: 0 0 20px var(--neon-cyan);
}

.google-btn:active {
  border-top-color: #444;
  border-left-color: #444;
  border-bottom-color: #aaa;
  border-right-color: #aaa;
  transform: translateY(2px);
}

/* Pixel art Google logo */
.google-icon {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

/* Terminal-style status messages */
.status-terminal {
  margin-top: 20px;
  padding: 15px;
  background: #000;
  border: 2px solid #333;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--neon-cyan);
  height: 120px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.status-terminal::-webkit-scrollbar {
  width: 6px;
}

.status-terminal::-webkit-scrollbar-track {
  background: #111;
}

.status-terminal::-webkit-scrollbar-thumb {
  background: var(--neon-pink);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  opacity: 1;
}

.status-line .prompt {
  color: var(--neon-pink);
  flex-shrink: 0;
}

.status-line.ok {
  color: #00ff88;
}

.status-line.ok .prompt {
  color: #00ff88;
}

.status-line.warn {
  color: var(--neon-yellow);
}

.status-line.warn .prompt {
  color: var(--neon-yellow);
}

.status-line.error {
  color: #ff6b6b;
}

.status-line.error .prompt {
  color: #ff6b6b;
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--neon-cyan);
  animation: cursorBlink 0.8s steps(1) infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes cursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Floating pixel sprites container */
.pixel-sprites {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

/* Individual floating pixel sprites */
.pixel-sprite {
  position: absolute;
  pointer-events: none;
}

/* Stars background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #ffffff;
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
  box-shadow: 0 0 3px 1px #ffffff, 0 0 6px 2px rgba(255, 255, 255, 0.5);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Space Invaders Mothership Easter Egg */
.mothership {
  position: fixed;
  top: 10%;
  left: -120px;
  width: 80px;
  height: 32px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  /* Pixel art mothership using box-shadow */
  background: transparent;
}

.mothership::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ff0000;
  box-shadow:
    /* Row 1 - top dome */
    8px 0 0 #ff0000,
    12px 0 0 #ff0000,
    16px 0 0 #ff0000,
    20px 0 0 #ff0000,
    24px 0 0 #ff0000,
    28px 0 0 #ff0000,
    32px 0 0 #ff0000,
    /* Row 2 */
    4px 4px 0 #ff0000,
    8px 4px 0 #ff6666,
    12px 4px 0 #ff6666,
    16px 4px 0 #ff6666,
    20px 4px 0 #ff6666,
    24px 4px 0 #ff6666,
    28px 4px 0 #ff6666,
    32px 4px 0 #ff6666,
    36px 4px 0 #ff0000,
    /* Row 3 */
    0px 8px 0 #ff0000,
    4px 8px 0 #ff6666,
    8px 8px 0 #ff0000,
    12px 8px 0 #ff6666,
    16px 8px 0 #ff0000,
    20px 8px 0 #ff6666,
    24px 8px 0 #ff0000,
    28px 8px 0 #ff6666,
    32px 8px 0 #ff0000,
    36px 8px 0 #ff6666,
    40px 8px 0 #ff0000,
    /* Row 4 - widest part */
    -4px 12px 0 #ff0000,
    0px 12px 0 #ff6666,
    4px 12px 0 #ff6666,
    8px 12px 0 #ff6666,
    12px 12px 0 #ff6666,
    16px 12px 0 #ff6666,
    20px 12px 0 #ff6666,
    24px 12px 0 #ff6666,
    28px 12px 0 #ff6666,
    32px 12px 0 #ff6666,
    36px 12px 0 #ff6666,
    40px 12px 0 #ff6666,
    44px 12px 0 #ff0000,
    /* Row 5 */
    -8px 16px 0 #ff0000,
    -4px 16px 0 #ff6666,
    0px 16px 0 #ff0000,
    4px 16px 0 #ff6666,
    8px 16px 0 #ff0000,
    12px 16px 0 #ff6666,
    16px 16px 0 #ff0000,
    20px 16px 0 #ff6666,
    24px 16px 0 #ff0000,
    28px 16px 0 #ff6666,
    32px 16px 0 #ff0000,
    36px 16px 0 #ff6666,
    40px 16px 0 #ff0000,
    44px 16px 0 #ff6666,
    48px 16px 0 #ff0000,
    /* Row 6 - bottom with gaps */
    -8px 20px 0 #ff0000,
    -4px 20px 0 #ff0000,
    8px 20px 0 #ff0000,
    12px 20px 0 #ff0000,
    28px 20px 0 #ff0000,
    32px 20px 0 #ff0000,
    44px 20px 0 #ff0000,
    48px 20px 0 #ff0000;
  filter: drop-shadow(0 0 8px #ff0000);
}

.mothership.flying {
  opacity: 1;
  animation: mothershipFly 4s linear forwards;
}

@keyframes mothershipFly {
  0% {
    left: -120px;
    top: 10%;
  }
  100% {
    left: calc(100% + 120px);
    top: 10%;
  }
}

/* Footer credits - Amiga style */
.footer-credits {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  color: #666;
  z-index: 10;
}

.footer-credits span {
  color: var(--neon-pink);
}

/* ============================================
   MOBILE RESPONSIVE STYLES FOR LOGIN PAGE
   ============================================ */

@media (max-width: 600px) {
  .main-container {
    gap: 20px;
    padding: 15px;
    width: 100%;
  }

  .logo-container {
    width: 100%;
    max-width: 320px;
  }

  .logo-text {
    font-size: 28px;
    letter-spacing: 4px;
  }

  .logo-subtitle {
    font-size: 10px;
    letter-spacing: 3px;
  }

  .floppy-container {
    gap: 15px;
    margin: 15px 0;
  }

  .floppy {
    width: 50px;
    height: 50px;
  }

  .floppy::before {
    width: 30px;
    height: 20px;
  }

  .floppy::after {
    width: 34px;
    height: 14px;
  }

  .loading-section {
    max-width: 100%;
    padding: 0 10px;
  }

  .loading-text {
    font-size: 8px;
  }

  .login-container {
    max-width: calc(100% - 20px);
    padding: 20px;
    padding-top: 30px;
    margin: 0 10px;
  }

  .login-container::before {
    font-size: 8px;
    top: -20px;
    left: 15px;
  }

  .login-title {
    font-size: 10px;
    white-space: normal;
    line-height: 1.5;
  }

  .login-message {
    font-size: 11px;
    line-height: 1.6;
  }

  .google-btn {
    padding: 14px 16px;
    font-size: 9px;
    gap: 10px;
  }

  .google-icon {
    width: 20px;
    height: 20px;
  }

  .status-terminal {
    height: 100px;
    font-size: 10px;
    padding: 12px;
  }

  .grid-container {
    height: 25%;
  }

  .grid {
    background-size: 60px 60px;
  }

  /* Hide some decorative elements on small screens */
  .pixel-sprites {
    display: none;
  }

  .footer-credits {
    bottom: 10px;
    font-size: 7px;
  }
}

@media (max-width: 400px) {
  .logo-text {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .logo-subtitle {
    font-size: 8px;
    letter-spacing: 2px;
  }

  .login-container {
    padding: 15px;
    padding-top: 25px;
  }

  .login-title {
    font-size: 9px;
  }

  .login-message {
    font-size: 10px;
  }

  .google-btn {
    padding: 12px 14px;
    font-size: 8px;
  }

  .status-terminal {
    height: 80px;
    font-size: 9px;
  }
}
