@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

:root {
  /* Light theme */
  --primary-color: #6c63ff;
  --background-light: #f8f9fa;
  --surface-light: #ffffff;
  --text-primary-light: #2d2d2d;
  --text-secondary-light: #666666;
  --border-light: #e0e0e0;

  /* Dark theme */
  --background-dark: #121212;
  --surface-dark: #1e1e1e;
  --text-primary-dark: #ffffff;
  --text-secondary-dark: #b3b3b3;
  --border-dark: #2d2d2d;

  /* Common colors */
  --error-color: #ff6b6b;
  --success-color: #69db7c;

  /* Default theme (dark) */
  --background: var(--background-dark);
  --surface: var(--surface-dark);
  --text-primary: var(--text-primary-dark);
  --text-secondary: var(--text-secondary-dark);
  --border: var(--border-dark);
}

/* Light theme class */
[data-theme="light"] {
  --background: var(--background-light);
  --surface: var(--surface-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --border: var(--border-light);
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  right: 2rem;
  top: 1rem;
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  width: 2.5rem;
  height: 2.5rem;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--primary-color);
  border-color: var(--primary-color);
}

body {
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation Styles - Keep original animations */
.nav {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 1rem 2rem;
}

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

.nav-link {
  position: relative;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Keep original underline animation */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
  transform-origin: left;
}

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

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-link.active {
  color: var(--primary-color);
}


/* Slide down animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Styles */
.section {
  padding: 5rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.6s ease-out;
}

h1,
h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

h1 {
  font-size: 4rem;
  font-weight: 800;
}

h2 {
  font-size: 3.5rem;
  font-weight: 600;
}

/* Results Section */
.search-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.custom-input {
  width: 100%;
  max-width: 320px;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background-color: var(--surface);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.custom-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.25);
  outline: none;
}

.custom-input::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

textarea.custom-input {
  resize: vertical;
  min-height: 120px;
}

#loadresults,
.submit-btn {
  background-color: var(--primary-color);
  color: var(--text-primary);
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#loadresults:hover,
.submit-btn:hover {
  background-color: #5651d8;
  transform: translateY(-2px);
}

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

/* Results Display Styles */
.results-display {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 800px;
  border: 1px solid var(--border);
}

.result-section {
  margin-bottom: 20px;
  padding: 15px;
  border-bottom: 1px solid var(--border);
}

.result-section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--primary-color);
}

.result-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 5px 0;
}

.result-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 150px;
}

.result-value {
  color: var(--text-primary);
}

.result-score {
  margin: 5px 0;
  padding: 3px 0;
  color: var(--text-secondary);
}

.result-text {
  margin: 5px 0;
  line-height: 1.5;
  color: var(--text-secondary);
}

.error-message {
  color: var(--error-color);
  text-align: center;
  padding: 20px;
  font-weight: 500;
}

/* About Section */
.about-content {
  max-width: 800px;
  text-align: center;
  padding: 2rem;
  background-color: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

/* Contact Form */
.contact-form {
  width: 100%;
  max-width: 600px;
  background-color: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

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

.form-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  display: none;
}

.form-status:not(:empty) {
  display: block;
}

.form-status.success {
  background-color: rgba(105, 219, 124, 0.1);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.form-status.error {
  background-color: rgba(255, 107, 107, 0.1);
  color: var(--error-color);
  border: 1px solid var(--error-color);
}

/* Footer */
.footer {
  background-color: var(--surface);
  color: var(--text-secondary);
  padding: 3rem 2rem 2rem;
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.footer-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

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

.footer a:hover {
  color: var(--primary-color);
}

.legal-text {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
}

.copyright {
  margin-bottom: 1rem;
}

.license-notice {
  font-size: 0.85rem;
  opacity: 0.8;
}

.license-notice p {
  margin: 0.3rem 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Replace your current media queries with this more comprehensive approach */
/* Base styles first (for all devices) */

/* Then add these media queries */
/* Mobile & Tablet Styles */
@media screen and (max-width: 768px) {
    .search-container {
      flex-direction: column;
      align-items: center;
    }
    
    .custom-input, 
    #loadresults, 
    .submit-btn {
      width: 100%;
      max-width: 100%;
    }
    
    /* Adjust navigation for mobile */
    .nav-links {
      gap: 0.5rem;
      justify-content: space-around;
    }
    
    .nav-link {
      padding: 0.3rem 0.5rem;
      font-size: 0.9rem;
    }
  }
  
  /* Small mobile screens */
  @media screen and (max-width: 400px) {
    .search-container {
      flex-direction: column;
    }
    
    .results-display {
      padding: 1rem;
    }
    
    h1 {
      font-size: 2rem;
    }
    
    h2 {
      font-size: 30px;
    }
    
    /* Ensure elements stack properly */
    .footer-sections {
      grid-template-columns: 1fr;
    }
  }
  @media only screen and (max-width: 600px) {
    .nav {
      padding: 0.5rem 1rem;
    }
    
    .nav-links {
      /* Change these properties */
      display: flex;          /* Keep flex display */
      flex-direction: row;    /* Force horizontal layout */
      justify-content: space-between; /* Space items evenly */
      gap: 5px;               /* Reduce gap between items */
      padding-right: 2.5rem;  /* Keep padding for theme toggle */
    }
  
    .nav-link {
      padding: 0.3rem;        /* Reduce padding */
      font-size: 0.7rem;      /* Make font smaller */
      white-space: nowrap;    /* Prevent text wrapping */
    }
    
    /* Keep your theme toggle adjustments */
    .theme-toggle {
      right: 0.5rem;
      top: 0.5rem;
      padding: 0.3rem;
      width: auto;
      height: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
    }
  }