/* Floating Theme Toggle for Auth Pages */
.theme-toggle.floating {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  background: rgba(3, 3, 5, 0.8);
  border: 1px solid var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
  color: var(--primary);
}

[data-theme="light"] .theme-toggle.floating {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  color: #00bcd4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.theme-toggle.floating:hover {
  transform: scale(1.1) rotate(15deg);
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 30px var(--primary-glow);
}

[data-theme="light"] .theme-toggle.floating:hover {
  background: #00bcd4;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top, #1a1a2e, #030305);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .auth-container {
  background: #f0f2f5;
}

.auth-container::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: 
    linear-gradient(transparent 0%, rgba(0, 243, 255, 0.03) 50%, transparent 100%),
    linear-gradient(90deg, transparent 0%, rgba(188, 19, 254, 0.03) 50%, transparent 100%);
  background-size: 50px 50px;
  transform: perspective(500px) rotateX(60deg);
  animation: gridMove 20s linear infinite;
  pointer-events: none;
}

[data-theme="light"] .auth-container::before {
  background: 
    linear-gradient(transparent 0%, rgba(0, 188, 212, 0.05) 50%, transparent 100%),
    linear-gradient(90deg, transparent 0%, rgba(156, 39, 176, 0.05) 50%, transparent 100%);
}

@keyframes gridMove {
  0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
  100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(3, 3, 5, 0.75);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 2.5rem;
  box-shadow: 0 0 50px rgba(0, 243, 255, 0.1);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

[data-theme="light"] .auth-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
}

[data-theme="light"] .auth-card::before {
  background: linear-gradient(90deg, transparent, #00bcd4, transparent);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--primary-glow);
  letter-spacing: 0.05em;
}

[data-theme="light"] .auth-header h1 {
  color: #00838f;
  text-shadow: none;
}

.auth-header p {
  color: var(--fg-soft);
  font-size: 1rem;
  font-family: 'Fira Code', monospace;
}

/* Role Selection Styles */
.role-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.role-option {
  cursor: pointer;
  position: relative;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .role-card {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
}

.role-option:hover .role-card {
  background: rgba(0, 243, 255, 0.05);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

[data-theme="light"] .role-option:hover .role-card {
  background: #ffffff;
  border-color: #00bcd4;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.15);
}

.role-option input[type="radio"]:checked + .role-card {
  background: rgba(0, 243, 255, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

[data-theme="light"] .role-option input[type="radio"]:checked + .role-card {
  background: rgba(0, 188, 212, 0.05);
  border-color: #00bcd4;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.1);
}

.role-option input[type="radio"]:checked + .role-card h3 {
  color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
}

[data-theme="light"] .role-option input[type="radio"]:checked + .role-card h3 {
  color: #00838f;
  text-shadow: none;
}

.role-option input[type="radio"]:checked + .role-card::after {
  content: "SELECTED";
  position: absolute;
  top: -10px;
  right: 10px;
  background: var(--primary);
  color: #000;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 0 10px var(--primary-glow);
}

[data-theme="light"] .role-option input[type="radio"]:checked + .role-card::after {
  background: #00bcd4;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.role-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

[data-theme="light"] .role-icon {
  filter: none;
  color: #555;
}

.role-card h3 {
  font-size: 1.1rem;
  color: var(--fg);
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="light"] .role-card h3 {
  color: #333;
}

.role-card p {
  font-size: 0.85rem;
  color: var(--fg-soft);
  margin: 0;
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .role-card p {
  color: #666;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--secondary);
  font-size: 0.9rem;
  font-family: 'Fira Code', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.phone-input {
  display: flex;
  gap: 0.5rem;
}

.country-select {
  width: 120px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .country-select {
  background: #ffffff;
  border: 1px solid #ccc;
  color: #333;
}

.country-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

[data-theme="light"] .country-select:focus {
  border-color: #00bcd4;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
}

.form-group input[type="tel"],
.form-group input[type="text"] {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--fg);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: 'Fira Code', monospace;
}

[data-theme="light"] .form-group input[type="tel"],
[data-theme="light"] .form-group input[type="text"] {
  background: #ffffff;
  border: 1px solid #ccc;
  color: #333;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
  background: rgba(0, 243, 255, 0.05);
}

[data-theme="light"] .form-group input:focus {
  border-color: #00bcd4;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2);
  background: #ffffff;
}

.auth-button {
  padding: 0.85rem 1.5rem;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: rgba(0, 243, 255, 0.1);
  color: var(--primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 1rem;
}

[data-theme="light"] .auth-button {
  background: rgba(0, 188, 212, 0.1);
}

.auth-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 30px var(--primary-glow);
}

[data-theme="light"] .auth-button:hover:not(:disabled) {
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.auth-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(75, 85, 99, 0.2);
  border-color: #4b5563;
  color: #6b7280;
}

.auth-button.secondary {
  background: transparent;
  border: 1px solid var(--secondary);
  color: var(--secondary);
}

[data-theme="light"] .auth-button.secondary {
  border: 1px solid #7b1fa2;
  color: #7b1fa2;
}

.auth-button.secondary:hover:not(:disabled) {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 0 20px rgba(188, 19, 254, 0.4);
}

[data-theme="light"] .auth-button.secondary:hover:not(:disabled) {
  background: #7b1fa2;
  color: #fff;
  box-shadow: 0 4px 12px rgba(123, 31, 162, 0.3);
}

.auth-footer {
  margin-top: 2rem;
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.auth-footer p {
  color: var(--fg-soft);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-family: 'Fira Code', monospace;
}

.back-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: 'Fira Code', monospace;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover {
  color: var(--primary);
  text-shadow: 0 0 5px var(--primary);
  transform: translateX(-3px);
}

.auth-status {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
  font-family: 'Fira Code', monospace;
  border: 1px solid transparent;
}

.auth-status[data-tone="success"] {
  background: rgba(10, 255, 10, 0.1);
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 15px rgba(10, 255, 10, 0.2);
}

.auth-status[data-tone="error"] {
  background: rgba(255, 0, 60, 0.1);
  border-color: var(--error);
  color: var(--error);
  box-shadow: 0 0 15px rgba(255, 0, 60, 0.2);
}

.auth-status[data-tone="info"] {
  background: rgba(0, 243, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

@media (max-width: 768px) {
  .theme-toggle.floating {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .auth-container {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .role-selection {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .role-card {
    padding: 1rem;
    flex-direction: row;
    text-align: left;
    gap: 1rem;
    justify-content: flex-start;
  }

  .role-icon {
    margin-bottom: 0;
    font-size: 1.5rem;
  }

  .role-card h3 {
    margin-bottom: 0.25rem;
  }

  .phone-input {
    flex-direction: column;
    gap: 0.75rem;
  }

  .country-select {
    width: 100%;
  }
}
