@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Official Prolific Light Theme Colors */
  --prolific-blue: #0046E5;
  /* Main Prolific Blue */
  --prolific-dark: #0036B5;
  /* Darker Blue for Active/Hover */
  --prolific-light-blue: #E8F0FE;
  /* Background for active sidebar items */

  --bg-main: #F5F7FA;
  /* Light grey background */
  --surface: #FFFFFF;
  /* White surfaces */
  --text-main: #000000;
  /* Pure black for maximum contrast */
  --text-muted: #334155;
  /* Darker grey for subtler but readable text */
  --hero-blue: #007BFF;
  /* Strong baby blue for main titles */

  --accent-green: #10B981;
  --accent-red: #EF4444;

  --border: #E2E8F0;
  --glass-border: rgba(0, 70, 229, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
}

/* Header inspired by the screenshot */
nav {
  background-color: var(--prolific-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.nav-links {
  display: flex;
  height: 100%;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: 0.2s;
}

.nav-item:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: #FFF;
}

.nav-item.active {
  background-color: var(--prolific-dark);
  color: #FFF;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  font-size: 1.2rem;
}

/* Custom Translation Widget Styling for Light Header */
.lang-switcher-wrapper {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 2px 10px;
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#google_translate_element img {
  display: none !important;
}

.goog-te-gadget-simple {
  background-color: transparent !important;
  border: none !important;
  font-size: 0.8rem !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
}

.goog-te-gadget-simple span {
  color: #fff !important;
}

/* Main Content Styling */
.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
}

.glass-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.2s ease;
  color: var(--text-main);
  text-decoration: none;
  display: block;
}

.card:hover {
  border-color: var(--prolific-blue);
  background: var(--prolific-light-blue);
  transform: translateY(-2px);
}

/* Form Elements */
input,
textarea,
select {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 1rem;
  transition: 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--prolific-blue);
  box-shadow: 0 0 0 3px rgba(0, 70, 229, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  background-color: var(--prolific-blue);
  color: #FFFFFF;
  gap: 0.5rem;
}

.btn:hover {
  background-color: var(--prolific-dark);
}

.btn-success {
  background-color: var(--accent-green);
}

.btn-danger {
  background-color: var(--accent-red);
}

/* Meters and Badges */
.confidence-meter {
  height: 8px;
  background: #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.confidence-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-positive {
  background: #DCFCE7;
  color: #166534;
}

.status-negative {
  background: #FEE2E2;
  color: #991B1B;
}

/* Dashboard Grids */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  animation: fadeInUp 0.4s ease forwards;
}

/* ============ GOOGLE TRANSLATE - NUCLEAR HIDE ============ */
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
body>.skiptranslate:first-child {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
  overflow: hidden !important;
}

body {
  top: 0px !important;
  position: static !important;
}

#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight,
.goog-te-balloon-frame,
div#goog-gt-tt,
.jfk-bubble {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.goog-te-gadget {
  font-size: 0 !important;
  color: transparent !important;
}

.goog-te-gadget .goog-te-combo {
  font-size: 0.85rem !important;
  padding: 0.4rem 0.8rem !important;
  border-radius: 99px !important;
  border: 1px solid var(--prolific-blue) !important;
  background: #fff !important;
  color: var(--prolific-blue) !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  outline: none !important;
}

.goog-te-gadget .goog-te-combo:focus {
  box-shadow: 0 0 0 2px rgba(0, 70, 229, 0.2) !important;
}

.goog-te-gadget img,
.goog-te-gadget-icon {
  display: none !important;
}

.goog-te-gadget>span {
  display: none !important;
}

/* ============ END GOOGLE TRANSLATE ============ */

.goog-te-menu-frame {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
}

footer {
  margin-top: 4rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============ MOBILE RESPONSIVE ============ */
html,
body {
  overflow-x: hidden !important;
  width: 100% !important;
}

/* Nav: stack vertically on mobile */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.2rem;
    width: 100%;
    justify-content: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
  }

  .nav-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  /* The right-side controls (translate + login/logout) */
  nav>div:last-child {
    width: 100%;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .main-wrapper {
    padding: 0 0.75rem 2rem 0.75rem;
  }

  .glass-container {
    padding: 1.25rem;
    border-radius: 10px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Search section */
  .search-section h1 {
    font-size: 1.8rem !important;
  }

  .search-section p {
    font-size: 0.9rem !important;
  }

  .search-bar {
    margin: 1.5rem auto !important;
  }

  .search-bar input {
    font-size: 1rem !important;
    padding: 1rem 4rem 1rem 1rem !important;
  }

  /* Cards */
  .card {
    padding: 1rem;
    flex-direction: column !important;
    gap: 0.75rem;
    align-items: flex-start !important;
  }

  /* Profile header (requester page) */
  .glass-container>div[style*="display: flex"][style*="justify-content: space-between"] {
    flex-direction: column !important;
    gap: 1.5rem;
    text-align: center;
  }

  .glass-container>div[style*="display: flex"][style*="justify-content: space-between"]>div {
    text-align: center !important;
    min-width: unset !important;
    width: 100%;
  }

  /* Review items */
  .review-item {
    padding: 1rem !important;
  }

  .review-item div[style*="justify-content: space-between"] {
    flex-direction: column !important;
    gap: 0.75rem;
    align-items: flex-start !important;
  }

  /* Status badges in reviews: wrap */
  .review-item div[style*="display: flex"][style*="gap: 0.5rem"] {
    flex-wrap: wrap !important;
  }

  /* Buttons in reviews */
  .review-item .btn {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.6rem !important;
  }

  /* Forms */
  .input-group {
    margin-bottom: 1rem;
  }

  .input-group label {
    font-size: 0.9rem;
  }

  /* Rating buttons on add page */
  div[style*="display: flex"][style*="gap: 1rem"][style*="margin-top: 0.5rem"] {
    flex-direction: column !important;
  }

  /* Confidence meter text */
  div[style*="font-size: 3.5rem"] {
    font-size: 2.5rem !important;
  }

  /* Google Translate dropdown on mobile */
  .goog-te-gadget .goog-te-combo {
    font-size: 0.75rem !important;
    padding: 0.3rem 0.5rem !important;
  }

  /* FAQ */
  .faq-question {
    font-size: 1rem !important;
  }

  .faq-answer {
    font-size: 0.95rem !important;
  }

  /* Login / Register pages */
  div[style*="max-width: 450px"] {
    margin: 2rem auto !important;
  }

  /* Fix any inline style overflows */
  h1 {
    word-break: break-word;
  }

  /* Fix review action buttons wrapping */
  div[style*="display: flex"][style*="gap: 0.25rem"][style*="margin-right: 1rem"] {
    flex-wrap: wrap !important;
    margin-right: 0 !important;
  }
}

/* Extra small screens (phones < 400px) */
@media (max-width: 400px) {
  .logo {
    font-size: 1rem;
  }

  .nav-item {
    padding: 0.4rem 0.5rem;
    font-size: 0.7rem;
  }

  .glass-container {
    padding: 1rem;
  }

  .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }

  .status-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
}

/* ============ END MOBILE ============ */