:root {
  --primary: #818CF8;
  --primary-hover: #6366F1;
  --background: rgba(255, 255, 255, 0.95);
  --card-background: rgba(255, 255, 255, 0.95);
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --border-color: #E0E7FF;
  --error: #EF4444;
  --success: #10B981;
  --overlay: rgba(0, 0, 0, 0.4);
  --input-background: rgba(255, 255, 255, 0.9);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
}

/* Background image system */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay);
  z-index: 0;
}

/* Main container */
.container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Logo styling */
.logo {
  margin-bottom: 60px;
}

.logo img {
  width: 400px;
  max-width: 90vw;
  height: auto;
}

/* Hero section for reset password page */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.hero-content {
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.hero-logo {
  width: 400px;
  max-width: 90vw;
  height: auto;
  margin-bottom: 40px;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 40px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Content sections */
.loading-section,
.fallback-section,
.manual-section {
  background: var(--card-background);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(10px);
}

h1,
h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Input styling */
input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border-color);
  background-color: var(--input-background);
  border-radius: 12px;
  padding: 0 16px;
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

/* Button styling */
.primary-button,
.secondary-button,
.cta-button {
  display: inline-block;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
  text-align: center;
  line-height: 1.2;
}

.primary-button,
.cta-button {
  background-color: var(--primary);
  color: white;
}

.primary-button:hover,
.cta-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.3);
}

.secondary-button,
.cta-button.secondary {
  background-color: var(--card-background);
  color: var(--primary);
  border: 1px solid var(--border-color);
}

.secondary-button:hover,
.cta-button.secondary:hover {
  background-color: rgba(129, 140, 248, 0.05);
  border-color: var(--primary);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  margin: 20px auto;
  border: 3px solid rgba(129, 140, 248, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Navbar (for reset password page) */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo img {
  height: 32px;
  filter: brightness(0) invert(1);
}

/* Form styling */
.reset-form {
  background: var(--card-background);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Error and success messages */
.error-message {
  color: var(--error);
  font-size: 14px;
  margin-top: 8px;
  text-align: left;
}

.success-message {
  background: var(--success);
  color: white;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
}

/* Loading indicator */
.loading-indicator {
  background: var(--card-background);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.loading-indicator p {
  margin-bottom: 20px;
}

/* Footer badge style (similar to login page) */
.footer-badge {
  background: var(--card-background);
  border-radius: 12px;
  padding: 20px 30px;
  margin-top: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* Responsive design */
@media (max-width: 768px) {

  .logo img,
  .hero-logo {
    width: 300px;
  }

  .hero-title {
    font-size: 28px;
  }

  h1,
  h2 {
    font-size: 20px;
  }

  .loading-section,
  .fallback-section,
  .manual-section,
  .reset-form {
    padding: 20px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --background: rgba(28, 28, 30, 0.95);
    --card-background: rgba(44, 44, 46, 0.95);
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --border-color: #374151;
    --input-background: rgba(74, 74, 78, 0.9);
    --overlay: rgba(0, 0, 0, 0.6);
  }

  .nav-logo img {
    filter: brightness(0) invert(1);
  }
}

/* Animation for page load */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container>*,
.hero-content>* {
  animation: fadeIn 0.6s ease-out;
}

/* Loading state for background image */
.loading-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: -1;
}