/* CSS Design System for AIM OSCAR Registration Portal */

:root {
  --bg-dark: #0B0F19;
  --card-bg: rgba(30, 41, 59, 0.75);
  --card-border: rgba(255, 255, 255, 0.1);
  --aim-yellow: #FFC700;
  --aim-yellow-hover: #E5B200;
  --aim-yellow-glow: rgba(255, 199, 0, 0.25);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --input-bg: #0F172A;
  --input-border: #334155;
  --input-focus: #FFC700;
  --error-red: #EF4444;
  --error-bg: rgba(239, 68, 68, 0.15);
  --success-green: #10B981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 24px;
  position: relative;
}

/* Ambient Glowing Background Elements */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.orb-yellow {
  width: 450px;
  height: 450px;
  background: #FFC700;
  top: -100px;
  right: -50px;
}

.orb-blue {
  width: 500px;
  height: 500px;
  background: #3B82F6;
  bottom: -150px;
  left: -100px;
}

/* Container */
.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* AIM Header Banner */
.aim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.running-man-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 199, 0, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid rgba(255, 199, 0, 0.3);
}

.running-man-icon svg {
  width: 100%;
  height: 100%;
}

.logo-text h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.logo-text h1 span {
  color: var(--aim-yellow);
}

.server-domain {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success-green);
}

/* Card */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-header {
  margin-bottom: 24px;
}

.card-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h2 i {
  color: var(--aim-yellow);
}

.card-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Alert Box */
.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.alert-box.error {
  background: var(--error-bg);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-box.success {
  background: var(--success-bg);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Form Controls */
form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hint-text {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: var(--transition);
}

.input-wrapper input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.input-wrapper input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--aim-yellow-glow);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
  color: var(--aim-yellow);
}

.char-count {
  position: absolute;
  right: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.normalized-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.5);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-top: 2px;
}

.normalized-preview strong {
  color: var(--aim-yellow);
  letter-spacing: 0.5px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

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

.validation-msg {
  font-size: 0.78rem;
  color: #FCA5A5;
  margin-top: 2px;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--aim-yellow);
  color: #0F172A;
  box-shadow: 0 4px 20px var(--aim-yellow-glow);
}

.btn-primary:hover {
  background: var(--aim-yellow-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 199, 0, 0.4);
}

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

.btn-secondary {
  background: #334155;
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #475569;
}

/* Connection Footer Guide */
.connection-footer {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.connection-footer h3 {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.step-num {
  width: 22px;
  height: 22px;
  background: rgba(255, 199, 0, 0.15);
  color: var(--aim-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.step-text code {
  background: #0F172A;
  color: var(--aim-yellow);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.modal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.modal-card h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.user-summary {
  background: #0F172A;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
}

.summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);

  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--aim-yellow);
}

.config-instructions {
  text-align: left;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.config-instructions h4 {
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.config-instructions ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.config-instructions code {
  background: #0F172A;
  color: var(--aim-yellow);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
}

/* Utilities */
.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
