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

:root {
  --primary: #6f5aff;
  --primary-dark: #4d3ba3;
  --success: #6fd5a6;
  --danger: #ff6b6b;
  --warning: #ffd93d;
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text: #c9d1d9;
  --text-secondary: #8b949e;
  --border: #30363d;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, #1a1f2e 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, #9d7aff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--primary);
}

.btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  box-shadow: 0 0 16px rgba(111, 90, 255, 0.4);
}

.btn-secondary {
  background: var(--bg-tertiary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.form-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(111, 90, 255, 0.1);
  background: rgba(111, 90, 255, 0.05);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.alert {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid;
}

.alert-success {
  background: rgba(111, 213, 166, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-error {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.alert-info {
  background: rgba(111, 90, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
}

.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 56px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #9d7aff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 600px;
}

.hero .btn {
  font-size: 16px;
  padding: 14px 32px;
}

.auth-container {
  max-width: 420px;
  margin: 60px auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-header h2 {
  font-size: 32px;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

.password-strength {
  margin-top: 8px;
  font-size: 12px;
  display: flex;
  gap: 4px;
  align-items: center;
}

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

.strength-fill {
  height: 100%;
  width: 0;
  transition: width 0.3s, background-color 0.3s;
  background: var(--danger);
}

.strength-fill.weak {
  width: 33%;
  background: var(--danger);
}

.strength-fill.fair {
  width: 66%;
  background: var(--warning);
}

.strength-fill.strong {
  width: 100%;
  background: var(--success);
}

.profile-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  max-width: 600px;
  margin: 60px auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #9d7aff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: white;
}

.profile-info h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.profile-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

.profile-section {
  margin-bottom: 32px;
}

.profile-section h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.profile-field:last-child {
  border-bottom: none;
}

.profile-field label {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 400;
}

.profile-field span {
  color: var(--text);
}

.profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.verification-code {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.verification-code input {
  width: 48px;
  height: 48px;
  font-size: 24px;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0;
  transition: all 0.3s;
}

.verification-code input:focus {
  border-color: var(--primary);
  background: rgba(111, 90, 255, 0.1);
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(111, 90, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.resend-link {
  text-align: center;
  margin-top: 16px;
}

.resend-link button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  font-size: 14px;
}

.resend-link button:hover {
  opacity: 0.8;
}

.resend-link button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.resend-timer {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 36px;
  }

  .form-container {
    padding: 24px;
  }

  nav {
    flex-direction: column;
    gap: 12px;
  }

  header .container {
    flex-direction: column;
    gap: 16px;
  }

  .profile-actions {
    flex-direction: column;
  }
}
