/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  color: #1e293b;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated background particles */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      circle at 20% 80%,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(16, 185, 129, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(245, 158, 11, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(1deg);
  }
  66% {
    transform: translateY(10px) rotate(-1deg);
  }
}

/* ===== CONTAINER STYLES ===== */
.container {
  max-width: 450px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* ===== LOGO STYLES ===== */
.logo {
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  animation: logoGlow 3s ease-in-out infinite alternate;
}

.logo:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

@keyframes logoGlow {
  from {
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
  }
  to {
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
  }
}

/* ===== TYPOGRAPHY ===== */
h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
  animation: titleShine 2s ease-in-out infinite alternate;
}

@keyframes titleShine {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.2);
  }
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #475569;
  text-align: center;
}

p {
  margin-bottom: 1rem;
  color: #64748b;
  text-align: center;
}

/* ===== FORM ELEMENTS ===== */
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  color: #1e293b;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1),
    0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

input::placeholder {
  color: #94a3b8;
}

/* File input styling */
input[type="file"] {
  padding: 0.75rem;
  cursor: pointer;
  border-style: dashed;
  text-align: center;
  position: relative;
  border-color: rgba(59, 130, 246, 0.3);
}

input[type="file"]:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

/* ===== BUTTON STYLES ===== */
button {
  width: 100%;
  padding: 1rem 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

button:hover::before {
  left: 100%;
}

button:active {
  transform: translateY(-1px);
}

/* Success button variant */
button.success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

button.success:hover {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Danger button variant */
button.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

button.danger:hover {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* ===== LINKS ===== */
a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 0.3s ease;
}

a:hover {
  color: #10b981;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

a:hover::after {
  width: 100%;
}

/* ===== LISTS ===== */
ul {
  list-style: none;
  width: 100%;
  margin-bottom: 1.5rem;
}

li {
  background: white;
  margin-bottom: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #3b82f6, #10b981);
  transition: width 0.3s ease;
}

li:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

li:hover::before {
  width: 100%;
  opacity: 0.1;
}

/* ===== MESSAGES ===== */
#loginMsg,
#regMsg,
#profileMsg {
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  min-height: 20px;
  border: 1px solid;
}

.success-msg {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #059669;
}

.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

/* ===== RECAPTCHA CONTAINER ===== */
#recaptcha-container {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
    max-width: 100%;
  }

  h2 {
    font-size: 2rem;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="text"],
  input[type="file"] {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }

  button {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .logo {
    width: 50px;
    height: 50px;
    margin-bottom: 1.5rem;
  }

  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="text"],
  input[type="file"] {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
  }

  button {
    padding: 0.75rem 1.25rem;
  }
}

/* ===== LOADING ANIMATIONS ===== */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Focus indicators for keyboard navigation */
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
