
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  --background: #ffffff;
  --foreground: #020617;
  --primary: #1e293b;
  --primary-foreground: #f8fafc;
  --secondary: #f1f5f9;
  --secondary-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #1e293b;
  --destructive: #ef4444;
  --destructive-foreground: #f8fafc;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #020617;
  --radius: 0.5rem;
  --research-blue: #1E40AF;
  --research-purple: #6D28D9;
  --research-light: #EEF2FF;
  --research-dark: #1E293B;
  --research-accent: #4F46E5;
  --form-error: #dc2626;
  --form-success: #16a34a;
  --input-focus: rgba(79, 70, 229, 0.1);
  --input-placeholder: #94a3b8;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--background);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.book-logo {
  color: var(--research-accent);
  font-size: 1.8rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

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

.nav-links a:hover {
  color: var(--research-accent);
}

.auth-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: var(--research-blue);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--research-dark);
  color: var(--research-dark);
}

.btn-outline:hover {
  background-color: var(--research-light);
}

.mobile-menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--research-dark);
  cursor: pointer;
}

.hidden-mobile {
  display: none;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background);
  z-index: 999;
  padding: 1rem;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--research-dark);
  cursor: pointer;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.mobile-nav-links a {
  text-decoration: none;
  color: var(--research-dark);
  font-weight: 500;
  font-size: 1.2rem;
  padding: 0.5rem 0;
  display: block;
  border-bottom: 1px solid var(--border);
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-auth-buttons .btn {
  width: 100%;
  padding: 0.75rem;
  text-align: center;
  font-size: 1rem;
}

.mobile-nav.active {
  display: flex;
}

.hero {
  padding: 4rem 2rem;
  background-color: var(--background);
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

@media (min-width: 1024px) {
  .hero-container {
    flex-direction: row;
    align-items: center;
  }
}

.hero-content {
  flex: 1;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}

.hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin-bottom: 2rem;
  color: var(--muted-foreground);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 30% 100%);
}

.hero-image img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
  .hero-image img {
    max-height: 500px;
  }
}

.gradient-text {
  background: linear-gradient(90deg, var(--research-blue), var(--research-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.features {
  padding: 4rem 2rem;
  background-color: var(--secondary);
}

.features h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--background);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  height: 3rem;
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--research-light);
  border-radius: 50%;
  margin-bottom: 1rem;
  color: var(--research-accent);
}

.stats {
  padding: 4rem 2rem;
  background-color: var(--background);
}

.stats h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.stats p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  color: var(--muted-foreground);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-card {
  background-color: var(--background);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  color: var(--research-accent);
  margin-bottom: 0.5rem;
}

.cta {
  padding: 4rem 2rem;
  background: linear-gradient(90deg, var(--research-blue), var(--research-purple));
  color: white;
  text-align: center;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.cta p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-white {
  background-color: white;
  color: var(--research-purple);
}

.btn-white:hover {
  background-color: #f1f1f1;
}

.btn-outline-white {
  background-color: transparent;
  border: 1px solid white;
  color: white;
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.footer {
  padding: 4rem 2rem 2rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-weight: bold;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-column h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .nav-links, .navbar .auth-buttons {
    display: none;
  }
  
  .mobile-menu {
    display: block;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

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

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-right {
  animation: fadeInRight 0.5s ease-out forwards;
}

.signup-container, .login-container {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 70px);
  background-color: var(--background);
}

@media (min-width: 1024px) {
  .signup-container, .login-container {
    grid-template-columns: 1fr 1fr;
  }
}

.signup-form-container, .login-form-container {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.signup-form-container h1, .login-form-container h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--research-dark);
}

.signup-intro, .login-intro {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.signup-form, .login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease-out forwards;
}

.step-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--research-dark);
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--research-dark);
}

/* Remove all borders from inputs, selects, and textareas */
input, 
select, 
textarea,
.styled-input {
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  outline: none;
}

input:focus, 
select:focus, 
textarea:focus,
.styled-input:focus {
  border: none !important;
  outline: none;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

input:hover, 
select:hover, 
textarea:hover,
.styled-input:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Remove browser default focus outlines */
*:focus {
  outline: none !important;
}

.styled-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: none !important;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background-color: var(--background);
  color: var(--research-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
}

.styled-input:focus {
  outline: none;
  border: none !important;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

.styled-input:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.styled-input::placeholder {
  color: var(--input-placeholder);
  opacity: 0.7;
}

.styled-checkbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border: none !important;
  border-radius: 4px;
  margin-right: 8px;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  background-color: var(--background);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.styled-checkbox:checked {
  background-color: var(--research-accent);
}

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

select.styled-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  border: none !important;
}

textarea.styled-input {
  min-height: 100px;
  resize: vertical;
  border: 0;
}

.role-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.role-option {
  position: relative;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  border: 0;
}

.role-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.role-option input[type="radio"]:checked + label {
  border: none;
  background-color: var(--research-light);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
}

.role-option label i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--research-dark);
}

.role-option input[type="radio"]:checked + label i {
  color: var(--research-accent);
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  border: none !important;
}

.error-message {
  display: block;
  color: var(--form-error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  min-height: 1.2rem;
}

.password-input-wrapper {
  position: relative;
}

.toggle-password-visibility {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  z-index: 2;
}

.toggle-password-visibility:hover {
  opacity: 1;
}

.password-requirements {
  background-color: var(--research-light);
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.password-requirements p {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.password-requirements ul {
  list-style: none;
  padding-left: 1rem;
}

.password-requirements li {
  margin-bottom: 0.25rem;
  position: relative;
  padding-left: 1.5rem;
}

.password-requirements li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--form-error);
}

.password-requirements li.valid::before {
  content: '✓';
  color: var(--form-success);
}

.research-fields {
  display: none;
}

.signup-footer, .login-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.95rem;
}

.signup-footer a, .login-footer a {
  color: var(--research-accent);
  text-decoration: none;
  font-weight: 500;
}

.signup-footer a:hover, .login-footer a:hover {
  text-decoration: underline;
}

.signup-image, .login-image {
  display: none;
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .signup-image, .login-image {
    display: block;
  }
}

.signup-image img, .login-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.signup-overlay, .login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  color: white;
}

.signup-overlay h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.benefit-list {
  list-style: none;
}

.benefit-list li {
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.benefit-list li i {
  color: var(--research-accent);
  margin-right: 1rem;
  font-size: 1.1rem;
}

.testimonial {
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.5;
}

.testimonial cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 1.1rem;
  opacity: 0.8;
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-password {
  color: var(--research-accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.forgot-password:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
}

.terms-link, .privacy-link {
  color: var(--research-accent);
  text-decoration: none;
}

.terms-link:hover, .privacy-link:hover {
  text-decoration: underline;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▼';
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.8em;
  color: var(--muted-foreground);
}

/* Extra styles for the submit button */
.submit-btn {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: none !important;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

        /* Additional inline styles to fix checkbox visibility */
        .terms-container {
          margin-top: 20px;
          padding: 15px;
          border-radius: 8px;
          background-color: var(--research-light);
      }
      
      .checkbox-group {
          display: flex;
          align-items: flex-start;
          gap: 10px;
      }
      
      .styled-checkbox {
          appearance: none;
          -webkit-appearance: none;
          width: 20px !important;
          height: 20px !important;
          border: 2px solid var(--research-accent) !important;
          border-radius: 4px;
          background-color: white;
          display: inline-block;
          position: relative;
          margin-top: 3px;
          cursor: pointer;
          flex-shrink: 0;
      }
      
      .styled-checkbox:checked {
          background-color: var(--research-accent);
      }
      
      .styled-checkbox:checked::after {
          content: "✓";
          position: absolute;
          color: white;
          font-size: 14px;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
      }
      
      .checkbox-group label {
          flex: 1;
          font-size: 0.95rem;
          line-height: 1.5;
      }

      /* Form step styling */
      .form-step {
          display: none;
      }
      
      .form-step.active {
          display: block;
      }
      
      .step-title {
          color: var(--research-dark);
          margin-bottom: 20px;
          padding-bottom: 10px;
          border-bottom: 2px solid var(--research-accent);
      }
      
      .form-navigation {
          display: flex;
          justify-content: space-between;
          margin-top: 30px;
      }
      
      /* Success message styling */
      .success-message {
          background-color: #e8f5e9;
          color: #2e7d32;
          padding: 30px;
          border-radius: 8px;
          text-align: center;
          margin-top: 20px;
      }
      
      .success-icon {
          font-size: 3rem;
          color: #2e7d32;
          margin-bottom: 20px;
      }
      
      /* Role selection styling */
      .role-selection {
          display: flex;
          justify-content: space-between;
          gap: 15px;
          margin-bottom: 30px;
      }
      
      .role-option {
          flex: 1;
          position: relative;
      }
      
      .role-option input[type="radio"] {
          position: absolute;
          opacity: 0;
      }
      
      .role-option label {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          padding: 30px 20px;
          border: 2px solid #e0e0e0;
          border-radius: 8px;
          transition: all 0.3s;
          cursor: pointer;
          text-align: center;
      }
      
      .role-option label i {
          font-size: 2rem;
          margin-bottom: 15px;
          color: var(--research-dark);
      }
      
      .role-option input[type="radio"]:checked + label {
          border-color: var(--research-accent);
          background-color: rgba(var(--research-accent-rgb), 0.1);
      }
      
      .role-option input[type="radio"]:checked + label i {
          color: var(--research-accent);
      }
      
      /* Password requirements styling */
      .password-requirements {
          margin-top: 10px;
          font-size: 0.85rem;
          color: #757575;
      }
      
      .password-requirements p {
          margin-bottom: 5px;
      }
      
      .password-requirements ul {
          padding-left: 20px;
          margin: 0;
      }
      
      .password-requirements li.valid {
          color: #2e7d32;
      }
      
      .password-requirements li.valid::before {
          content: "✓ ";
      }

      .styled-checkbox {
        appearance: none;
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        border: 1px solid var(--research-dark);
        border-radius: 3px;
        margin-right: 8px;
        position: relative;
        cursor: pointer;
        vertical-align: middle;
    }
    
    .styled-checkbox:checked {
        background-color: var(--research-accent);
        border-color: var(--research-accent);
    }
    
    .styled-checkbox:checked::after {
        content: '✓';
        position: absolute;
        color: white;
        font-size: 14px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .checkbox-group {
        display: flex;
        align-items: center;
    }
    
    .checkbox-group label {
        cursor: pointer;
        user-select: none;
    }
    
    .error-message {
        color: #e74c3c;
        margin-top: 5px;
        font-size: 14px;
        display: none;
    }
    .logo-link {
      text-decoration: none;
      color: inherit;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    