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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.15) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.login-page {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.auth-container {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(220, 20, 60, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(220, 20, 60, 0.2);
}

/* Inline field validation */
.field-error {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #ff4d4f;
}

/* Professional inline validation system */
.validation-error {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: #ff4d4f;
  line-height: 1.35;
}

.validation-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
}

.validation-success {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: #38d97a;
  line-height: 1.35;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Password input with eye toggle */
.password-wrap {
  position: relative;
  width: 100%;
}

.password-wrap input[type="password"],
.password-wrap input[type="text"] {
  padding-right: 46px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.toggle-password:hover {
  background: rgba(255, 255, 255, 0.06);
}

.toggle-password svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.8);
}

.toggle-password.is-on svg {
  fill: #ffffff;
}

.auth-container button[disabled],
.auth-container .btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* OTP active styling */
.otp-group {
  margin: 10px 0 16px;
}

.otp-group input {
  width: 100%;
}

.otp-group.otp-active input {
  border-color: #ff3333;
  box-shadow: 0 0 0 1px rgba(255, 51, 51, 0.4);
}

.otp-message {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #4bb543; /* subtle green */
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #dc143c 50%, 
        transparent 100%);
    border-radius: 20px 20px 0 0;
    
}

.auth-container h2 {
    color: #ffffff;
    margin-bottom: 35px;
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

.error-box {
    background: rgba(220, 20, 60, 0.1);
    border: 1px solid rgba(220, 20, 60, 0.4);
    border-left: 4px solid #dc143c;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    animation: shake 0.5s ease-in-out;
}

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

.error-box p {
    color: #ff6b6b;
    font-size: 14px;
    margin: 5px 0;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    background: rgba(35, 35, 35, 0.9);
    border-color: #dc143c;
    box-shadow: 
        0 0 0 3px rgba(220, 20, 60, 0.1),
        0 4px 12px rgba(220, 20, 60, 0.2);
    transform: translateY(-2px);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 5px 0;
}

button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: left 0.5s ease;
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff1744 0%, #a00000 100%);
    box-shadow: 0 6px 25px rgba(220, 20, 60, 0.5);
    transform: translateY(-2px);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 20, 60, 0.4);
}

form p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
    margin: 5px 0;
}

form a {
    color: #dc143c;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

form a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #dc143c;
    transition: width 0.3s ease;
}

form a:hover::after {
    width: 100%;
}

form a:hover {
    color: #ff1744;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

/* OTP Button and Flex Container */
form > div {
    display: flex;
    gap: 10px;
    width: 100%;
}

form > div input[type="email"] {
    flex: 1;
}

/* Make only the Send OTP button inline / normal size */
button[name="send_otp"] {
    width: auto;          /* remove full width */
    display: inline-block; 
    padding: 12px 20px;   /* adjust size */
    font-size: 14px;
    margin-top: 5px;
}

/* Optional: center it under input */
button[name="send_otp"] {
    display: block;
    margin: 10px auto 0 auto;
    white-space: nowrap;   /* prevent text wrapping */
}

/* Make sure the parent input + button stays in one line */
.otp-container {
    display: flex;
    align-items: center;
    gap: 10px;            /* space between input and button */
}

/* Input takes remaining space */
.otp-container input[type="email"] {
    flex: 1;
}


/* Password Helper Text */
small#passwordHelp {
    color: rgba(255, 255, 255, 0.5) !important;
    display: block !important;
    margin-top: -15px;
    margin-bottom: 10px !important;
    font-size: 12px;
    line-height: 1.4;
    padding-left: 5px;
}

/* Success Message */
form + p,
p[style*="color:green"],
.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.4);
    border-left: 4px solid #28a745;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    color: #5cd67f !important;
    font-size: 14px;
    animation: slideDown 0.5s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        padding: 40px 30px;
    }
    
    .auth-container h2 {
        font-size: 28px;
    }
    
    body::before,
    body::after {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 35px 25px;
        border-radius: 15px;
    }
    
    .auth-container h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    button[type="submit"] {
        padding: 14px;
        font-size: 15px;
    }
}

   /* --- Header --- */
   header {
  position: fixed;       /* Fixes the header to the top */
  top: 0;
  left: 0;
  width: 100%;           /* Full width */
  z-index: 9999;         /* Always on top */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
  padding: 15px 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5); /* subtle shadow */
}

/* Push page content below header */
body {
  padding-top: 80px; /* Adjust to match header height */
}

/* ✅ Enable Scroll for Register Page — Added Only */
html, body {
  height: auto !important;
  min-height: 100vh;
  overflow-y: auto; /* allow vertical scroll */
  overflow-x: hidden;
}

/* Keep animated background fixed in place while scrolling */
body::before,
body::after {
  position: fixed;
  z-index: -1;
}

/* Optional: smooth scroll experience */
html {
  scroll-behavior: smooth;
}



/* Logo */
header .logo {
  display: flex;
  align-items: center;
}
header .logo img {
  height: 45px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}
header .logo img:hover {
  transform: scale(1.05);
}

/* Navigation */
header nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 0;
  padding: 0;
}
header nav ul li a {
  color: #fff;
  text-decoration: none;
  transition: 0.3s;
  padding: 5px 0;
}
header nav ul li a:hover {
  color: #ff3333;
}

/* Account Icon */
.account-icon {
  width: 40px;
  height: 40px;
  background: #000;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-left: 15px;
}
.account-icon:hover {
  background: #333;
  border-color: #ff3333;
}
.profile-img,
.profile-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.account-icon:hover .profile-img {
  transform: scale(1.1);
  border: 2px solid #ff3333;
}
.account-icon:hover .profile-placeholder {
  transform: scale(1.1);
  background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 50px;
  background: #222;
  border-radius: 5px;
  list-style: none; 
  padding: 10px 0;
  min-width: 150px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.5);
  z-index: 999;
}
.dropdown-menu li a {
  display: block;
  padding: 10px 15px;
  color: #fff;
  text-decoration: none;
}

.dropdown-menu.show { display: block; }

/* ✅ Layout Fixes for Register Form - Added Only */

/* Make email + OTP button in one line */
form > div {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

/* Email input takes most space */
form > div input[type="email"] {
  flex: 1;
}

/* Send OTP button aligned right, consistent style */
form > div button[name="send_otp"] {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 12px 18px;
  font-size: 14px;
  background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}
form > div button[name="send_otp"]:hover {
  background: linear-gradient(135deg, #ff1744 0%, #a00000 100%);
  box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

/* Center the Register button */
button[name="register"] {
  display: block !important;
  margin: 20px auto 10px auto !important;
  width: 40% !important; /* adjust as needed (50% or 70%) */
  text-align: center !important;
}


/* Make all inputs aligned and same width look */
form input[type="text"],
form input[type="password"],
form input[type="email"] {
  width: 100%;
  display: block;
}

/* Responsiveness for smaller devices */
@media (max-width: 480px) {
  form > div {
    flex-direction: column;
    align-items: stretch;
  }
  form > div button[name="send_otp"] {
    width: 100%;
  }
  button[name="register"] {
    width: 100%;
  }
}

.auth-container {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  padding: 50px 40px;
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(220, 20, 60, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 440px;  /* same as login */
  margin: 120px auto; /* center under header */
  position: relative;
  z-index: 1;
  border: 1px solid rgba(220, 20, 60, 0.2);
}

/* Responsive breakpoints identical to login */
@media (max-width: 768px) {
  .auth-container {
    margin: 40px 20px;
    padding: 40px 30px;
    max-width: 90%;
  }

  .auth-container h2 {
    font-size: 26px;
  }

  body::before,
  body::after {
    width: 300px;
    height: 300px;
  }

  form > div {
    flex-direction: column;
    gap: 8px;
  }

  form > div button[name="send_otp"] {
    width: 100%;
  }

  button[name="register"] {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 35px 25px;
    border-radius: 15px;
    margin: 60px auto;
  }

  .auth-container h2 {
    font-size: 22px;
    margin-bottom: 25px;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"] {
    padding: 14px 16px;
    font-size: 14px;
  }

  button[type="submit"],
  button[name="send_otp"] {
    padding: 14px;
    font-size: 14px;
  }

  form p {
    font-size: 13px;
  }
}


.menu-toggle {
  display: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

/* Small screens - show hamburger */
@media (max-width: 768px) {
  header {
    padding: 15px 25px;
  }

  /* Show hamburger icon */
  .menu-toggle {
    display: block;
  }

  /* Hide nav menu by default */
  header nav ul {
    display: none;
    flex-direction: column;
    background: #222;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  }

  /* When active, show dropdown nav */
  header nav ul.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  header nav ul li {
    margin: 10px 0;
  }

  header nav ul li a {
    font-size: 18px;
  }

  /* Account icon reposition */
  .account-icon {
    margin: 10px auto;
  }
}

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

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-text {
  font-size: 0.80em;
  font-weight: 550;
  color: #fff; /* or your theme color */
  letter-spacing: 1px;
}

