/* Modern Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Modern Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #f5f9ff 0%, #f0f7ff 100%);
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

/* Container with Glass Morphism Effect */
.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header with Gradient Text */
.registration-header {
  text-align: center;
  margin-bottom: 40px;
}

.registration-header h1 {
  font-size: 2.5rem;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
  font-weight: 700;
}

.registration-header p {
  color: #64748b;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Form Layout with Modern Spacing */
.registration-form {
  width: 100%;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 250px;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #334155;
  font-size: 0.95rem;
}

/* Modern Input Fields */
.form-group input,
.form-group select,
.form-group textarea {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #f8fafc;
  color: #1e293b;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #818cf8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
  background-color: white;
}

/* Floating Label Effect (Optional) */
 /*.form-group {
  position: relative;
}
.form-group label {
  position: absolute;
  top: 14px;
  left: 16px;
  transition: all 0.2s ease;
  pointer-events: none;
  background: white;
  padding: 0 4px;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 0.8rem;
  color: #818cf8;
}
*/

/* Social Media Section */
.social-media-group {
  margin-bottom: 24px;
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
}

.social-media-group h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: #4f46e5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-media-group h3::before {
  content: "🔗";
}

.social-input {
  margin-bottom: 12px;
  position: relative;
}

.social-input input {
  padding-left: 20px;
}

.social-input::before {
  content: "@";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-weight: bold;
}

/* Checkbox with Custom Design */
.form-group.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Submit Button with Modern Effects */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
  margin-top: 16px;
}

.submit-btn:hover {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
  transform: translateY(-2px);
}

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

/* Modern Alert Messages */
.alert {
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert::before {
  font-size: 1.2rem;
}

.alert-success {
  background-color: #ecfdf5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alert-success::before {
  content: "✓";
}

.alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.alert-error::before {
  content: "⚠";
}

/* Login Link with Animation */
.login-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.95rem;
  color: #64748b;
}

.login-link a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
}

.login-link a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #4f46e5;
  transition: width 0.3s ease;
}

.login-link a:hover::after {
  width: 100%;
}

.error-message {
  color: #d9534f;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;
}

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

/* Responsive Design with Better Breakpoints */
@media (max-width: 768px) {
  .container {
    padding: 30px;
    margin: 20px auto;
  }

  .registration-header h1 {
    font-size: 2rem;
  }

  .form-group {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 24px;
  }

  .registration-header h1 {
    font-size: 1.8rem;
  }

  .submit-btn {
    padding: 14px;
  }
}

/* Micro-interactions for Better UX */
input, select, textarea, button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus-visible polyfill for better accessibility */
:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 42px; /* space for the icon */
  line-height: 1.4;    /* keep height consistent */
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #64748b;
  font-size: 18px;  /* slightly bigger for visibility */
  line-height: 1;
  height: 18px;     /* makes centering more accurate */
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 2;
}

.toggle-password:hover {
  color: #4f46e5;
}
