/* VEIRRA - Hidden World: Beautiful Cyber-Nature */
:root {
  --bg-dark: #0a0e0a;
  --bg-terminal: #0f1410;
  --bg-gradient-start: #0a0e0a;
  --bg-gradient-end: #0d1a0d;
  --green-primary: #00ff41;
  --green-glow: #39ff14;
  --green-secondary: #00cc33;
  --green-dark: #008f11;
  --green-forest: #1a4d1a;
  --cyan-accent: #00ffcc;
  --red-error: #ff0040;
  --text-primary: #00ff41;
  --text-secondary: #ffffff;
  --text-muted: #88aa88;
  --border: #2a4d2a;
  --shadow: 0 0 30px rgba(0, 255, 65, 0.4);
  --glow-soft: 0 0 20px rgba(57, 255, 20, 0.3);
}

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

body {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding: 20px 0;
}

/* Beautiful Cyber-Forest Background */
.matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 50%, var(--bg-gradient-start) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(0, 255, 65, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(57, 255, 20, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 255, 204, 0.04) 0%, transparent 60%);
  z-index: -1;
  overflow: hidden;
}

/* Animated floating leaves */
.matrix-bg::before,
.matrix-bg::after {
  content: '';
  position: absolute;
  border-radius: 50% 0 50% 50%;
  background: radial-gradient(ellipse at center, rgba(0, 255, 65, 0.15), transparent);
  filter: blur(2px);
  animation: float 15s ease-in-out infinite;
}

.matrix-bg::before {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.3);
  animation-delay: 0s;
}

.matrix-bg::after {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 15%;
  box-shadow: 0 0 35px rgba(57, 255, 20, 0.25);
  animation-delay: 7s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
    opacity: 0.6;
  }
}

/* Floating particles */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--green-glow);
  border-radius: 50%;
  box-shadow: 
    0 0 10px var(--green-glow),
    0 0 20px var(--green-primary),
    0 0 30px rgba(0, 255, 65, 0.5);
  animation: particleFloat 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0.8;
  }
  90% {
    opacity: 0.5;
  }
}


.container {
  background: linear-gradient(135deg, rgba(15, 20, 16, 0.95) 0%, rgba(13, 26, 13, 0.98) 100%);
  border: 2px solid var(--green-primary);
  border-radius: 12px;
  box-shadow: 
    var(--shadow),
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 0 80px rgba(0, 255, 65, 0.03);
  width: 100%;
  max-width: 450px;
  margin: 20px;
  overflow: hidden;
  animation: slideIn 0.8s ease-out;
  position: relative;
  backdrop-filter: blur(10px);
}

/* Glowing border effect */
.container::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(
    45deg,
    var(--green-primary),
    var(--green-glow),
    var(--cyan-accent),
    var(--green-primary)
  );
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  filter: blur(10px);
  animation: borderPulse 4s ease-in-out infinite;
}

@keyframes borderPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.5; }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Terminal Header */
.terminal-header {
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-glow) 100%);
  color: #000;
  padding: 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 
    0 2px 10px rgba(0, 255, 65, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.terminal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shine 3s ease-in-out infinite;
}

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

.back-btn {
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.15) 0%, rgba(0, 255, 65, 0.08) 100%);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green-primary);
  font-size: 0.85rem;
  font-weight: 600;
  width: auto;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

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

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

.back-btn:hover {
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.25) 0%, rgba(0, 255, 65, 0.15) 100%);
  border-color: var(--green-primary);
  transform: translateX(-4px) scale(1.05);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(0, 255, 65, 0.4);
  color: var(--green-glow);
}

.back-btn svg {
  stroke: currentColor;
  transition: transform 0.3s ease;
}

.back-btn:hover svg {
  transform: translateX(-3px);
}

.terminal-controls {
  display: flex;
  gap: 6px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.control.close { background: #ff5f57; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #28ca42; }

.terminal-title {
  font-weight: 500;
  letter-spacing: 1px;
}

/* Terminal Content */
.terminal-content {
  padding: 30px;
}

.ascii-art {
  text-align: center;
  margin-bottom: 30px;
  color: var(--green-primary);
  font-size: 0.7rem;
  line-height: 1.2;
  animation: glow 2s ease-in-out infinite alternate;
  position: relative;
  padding: 20px;
  background: radial-gradient(ellipse at center, rgba(0, 255, 65, 0.08) 0%, transparent 70%);
  border-radius: 8px;
}

/* Decorative leaves around logo */
.ascii-art::before,
.ascii-art::after {
  content: '🌿';
  position: absolute;
  font-size: 1.5rem;
  filter: drop-shadow(0 0 10px var(--green-glow));
  animation: leafGlow 3s ease-in-out infinite alternate;
}

.ascii-art::before {
  top: 10px;
  left: 20px;
  animation-delay: 0s;
}

.ascii-art::after {
  top: 10px;
  right: 20px;
  transform: scaleX(-1);
  animation-delay: 1.5s;
}

@keyframes leafGlow {
  0% {
    opacity: 0.4;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0.8;
    transform: translateY(-5px) scale(1.1);
  }
}

@keyframes glow {
  from { text-shadow: 0 0 5px var(--green-primary); }
  to { text-shadow: 0 0 15px var(--green-primary), 0 0 25px var(--green-secondary); }
}

/* Form Styles */
.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  color: var(--green-primary);
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
  transition: all 0.3s ease;
}

label:hover {
  text-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
}

input {
  width: 100%;
  padding: 12px 15px;
  background: linear-gradient(135deg, rgba(10, 14, 10, 0.8) 0%, rgba(15, 20, 16, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  /* Android touch enhancements */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 
    0 0 20px rgba(0, 255, 65, 0.4),
    0 0 40px rgba(57, 255, 20, 0.2),
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 0 20px rgba(0, 255, 65, 0.05);
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.08) 0%, rgba(15, 20, 16, 0.95) 100%);
  transform: translateY(-1px);
}

input::placeholder {
  color: var(--text-muted);
}

/* Button Styles */
button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 50%, var(--green-glow) 100%);
  border: none;
  border-radius: 6px;
  color: #000;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 15px rgba(0, 255, 65, 0.3),
    0 0 30px rgba(0, 255, 65, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  /* Android touch enhancements */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover:not(:disabled)::before {
  width: 300px;
  height: 300px;
}

button:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-glow) 50%, var(--cyan-accent) 100%);
  box-shadow: 
    0 6px 25px rgba(0, 255, 65, 0.5),
    0 0 50px rgba(57, 255, 20, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

button.loading {
  background: linear-gradient(45deg, var(--green-dark), var(--green-primary));
}

.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--bg-dark);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

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

/* Message Styles */
#message {
  margin-top: 20px;
  padding: 12px;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
  min-height: 20px;
  transition: all 0.3s ease;
}

#message.error {
  background: rgba(255, 0, 64, 0.1);
  border: 1px solid var(--red-error);
  color: var(--red-error);
  animation: shake 0.5s ease-in-out;
}

#message.success {
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid var(--green-primary);
  color: var(--green-primary);
  animation: fadeIn 0.5s ease-in;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    margin: 10px;
    max-width: none;
  }
  
  .terminal-content {
    padding: 20px;
  }
  
  .ascii-art {
    font-size: 0.6rem;
  }
  
  input, button {
    font-size: 0.9rem;
  }
}

@media (max-height: 600px) {
  .ascii-art {
    margin-bottom: 15px;
  }
  
  .input-group {
    margin-bottom: 15px;
  }
}
