/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s ease;
}

.logo-container h1 {
  font-size: 5rem;
  letter-spacing: 5px;
  margin-bottom: 20px;
}

.typewriter-container {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 40px;
  display: flex;
  height: 24px;
}

.cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.progress-bar-container {
  width: 300px;
  height: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  transition: width 0.1s;
}

/* Auth Container */
.auth-container {
  display: flex;
  min-height: 100vh;
  padding: 40px;
  gap: 40px;
  opacity: 0;
  animation: fadeIn 1s forwards;
  animation-delay: 0.2s;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Left Panel */
.auth-left {
  flex: 6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 40px;
}

.brand .logo-text {
  font-size: 4rem;
  margin-bottom: 10px;
}

.slogan-container {
  font-family: var(--font-mono);
  color: var(--text2);
  font-size: 1.1rem;
  display: flex;
}

.feature-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 40px 0;
}

.feature-card {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 20px;
  border-radius: 8px;
  width: fit-content;
  min-width: 300px;
  animation: float 6s ease-in-out infinite;
}

.feature-card.delay-1 { animation-delay: 0s; }
.feature-card.delay-2 { animation-delay: 1.5s; }
.feature-card.delay-3 { animation-delay: 3s; }

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

.feature-card .icon {
  font-size: 2rem;
  background: rgba(0,255,200,0.1);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feature-card h3 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.feature-card p {
  color: var(--text2);
  font-size: 0.9rem;
}

.network-diagram {
  height: 200px;
  margin-top: auto;
}

.conn-line {
  stroke: var(--border2);
  stroke-width: 2;
  stroke-dasharray: 4;
  animation: dash 20s linear infinite;
}

@keyframes dash {
  to { stroke-dashoffset: 1000; }
}

.node {
  fill: var(--bg);
  stroke: var(--primary);
  stroke-width: 2;
}

.center-node {
  fill: rgba(112,0,255,0.2);
  stroke: var(--accent);
  r: 12;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(112,0,255, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(112,0,255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(112,0,255, 0); }
}

.packet {
  fill: var(--primary);
  filter: drop-shadow(0 0 2px var(--primary));
}

.stats-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text2);
  font-size: 0.85rem;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.stats-bar .divider {
  color: var(--primary);
  animation: blink 2s infinite;
}

/* Right Panel */
.auth-right {
  flex: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  padding: 40px;
  border-radius: 12px;
}

.tab-switcher {
  display: flex;
  position: relative;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text2);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  padding: 15px 0;
  cursor: none;
  transition: color 0.3s;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  transition: transform 0.3s ease;
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  color: var(--primary);
  font-size: 1.2rem;
}

.input-group input {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 15px 15px 15px 45px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-radius: 4px;
  transition: all 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0,255,200,0.2);
}

.input-group input.error {
  border-color: var(--danger);
  animation: shake 0.4s;
}

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

.toggle-password {
  position: absolute;
  right: 15px;
  color: var(--text2);
  cursor: none;
}

.toggle-password:hover {
  color: var(--primary);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: none;
  color: var(--text2);
}

.custom-checkbox input {
  display: none;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 1px solid var(--primary);
  border-radius: 3px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-checkbox input:checked ~ .checkmark::after {
  content: '✓';
  color: var(--bg);
  font-size: 12px;
  background: var(--primary);
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 16px;
}

.forgot-link {
  color: var(--primary);
  font-family: var(--font-mono);
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -10px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--surface);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.strength-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; height: 100%; width: 0%;
  background: var(--danger);
  transition: width 0.3s, background 0.3s;
}

.strength-bar.fair::after { width: 50%; background: var(--warning); }
.strength-bar.strong::after { width: 75%; background: var(--primary); }
.strength-bar.unbreakable::after { width: 100%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.strength-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text2);
  width: 80px;
  text-align: right;
}

.form-error {
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  min-height: 20px;
}

.btn-primary {
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .auth-container {
    flex-direction: column;
    padding: 20px;
  }
  .auth-left {
    padding-right: 0;
    align-items: center;
    text-align: center;
  }
  .feature-cards {
    display: none;
  }
}
