/* -------------------------------------------------------------------------- */
/*                              CSS VARIABLES                                 */
/* -------------------------------------------------------------------------- */
:root {
  /* Primary colors (professional slate-blue) */
  --primary: #1e4a6b;
  --primary-dark: #0f3b5c;
  --primary-light: #2c6e9e;
  --primary-soft: #e6f0f7;
  
  /* Secondary colors (warm gray for contrast) */
  --secondary: #5b6e8c;
  --secondary-dark: #3b4a62;
  --secondary-light: #8ba0bc;
  
  /* Semantic colors */
  --success: #2b6e4f;
  --success-light: #e6f4ef;
  --danger: #b33b2c;
  --danger-light: #fef0ee;
  --warning: #b86b1f;
  --warning-light: #fef4e6;
  --info: #2c6e9e;
  --info-light: #e6f0f7;
  
  /* Neutral colors – high contrast, SEO friendly */
  --text-dark: #1e2a3a;
  --text-light: #334e68;
  --text-muted: #5b6e8c;
  --text-disabled: #94a3b8;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-active: #e2e8f0;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;
  
  /* Shadows – layered for depth */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.04), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.04), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.03);
  
  /* Radius scale */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s ease;
  
  /* Typography scale */
  --font-xs: 1.2rem;
  --font-sm: 1.4rem;
  --font-base: 1.6rem;
  --font-lg: 1.8rem;
  --font-xl: 2rem;
  --font-2xl: 2.4rem;
  --font-3xl: 3rem;
  --font-4xl: 3.6rem;
  
  /* Spacing scale (8px base) */
  --space-1: 0.4rem;
  --space-2: 0.8rem;
  --space-3: 1.2rem;
  --space-4: 1.6rem;
  --space-5: 2rem;
  --space-6: 2.4rem;
  --space-8: 3.2rem;
  --space-10: 4rem;
  --space-12: 4.8rem;
  --space-16: 6.4rem;
  
  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* Dark theme class (toggle via JS) */
.dark-theme {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --text-dark: #f1f5f9;
  --text-light: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-light: #0f172a;
  --bg-white: #1e293b;
  --bg-hover: #334155;
  --bg-active: #475569;
  --border: #334155;
  --border-dark: #475569;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}

/* -------------------------------------------------------------------------- */
/*                               RESET & BASE                                 */
/* -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-base);
  line-height: 1.5;
  color: var(--text-dark);
  background: var(--bg-light);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------------------- */
/*                               TYPOGRAPHY & UTILITIES                       */
/* -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--space-4);
  color: var(--text-dark);
}

h1 { font-size: var(--font-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--font-2xl); letter-spacing: -0.01em; margin-top: var(--space-2); }
h3 { font-size: var(--font-xl); }
h4 { font-size: var(--font-lg); }
h5 { font-size: var(--font-base); }
h6 { font-size: var(--font-sm); text-transform: uppercase; letter-spacing: 0.05em; }

p { margin-bottom: var(--space-4); color: var(--text-light); }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* Text utilities */
.text-xs { font-size: var(--font-xs); }
.text-sm { font-size: var(--font-sm); }
.text-base { font-size: var(--font-base); }
.text-lg { font-size: var(--font-lg); }
.text-xl { font-size: var(--font-xl); }
.text-2xl { font-size: var(--font-2xl); }
.text-3xl { font-size: var(--font-3xl); }
.text-4xl { font-size: var(--font-4xl); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }

/* Spacing utilities */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-5 { margin: var(--space-5); }
.m-6 { margin: var(--space-6); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

/* Flex utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* Grid utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}

/* -------------------------------------------------------------------------- */
/*                               LAYOUT & CONTAINER                           */
/* -------------------------------------------------------------------------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) var(--space-10);
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-5);
}

header h1 a {
  color: var(--text-dark);
  text-decoration: none;
}
header h1 a:hover { color: var(--primary); }

.footer {
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: var(--font-sm);
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------- */
/*                               SEARCH BOX                                   */
/* -------------------------------------------------------------------------- */
.search-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.search-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.search-box form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.search-box input[type="text"] {
  flex: 1;
  padding: 1.4rem 1.8rem;
  font-size: var(--font-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  color: var(--text-dark);
  transition: var(--transition);
}
.search-box input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 74, 107, 0.1);
}
.search-box button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 0 2.4rem;
  font-size: var(--font-base);
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: var(--transition);
}
.search-box button::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.6rem;
}
.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 74, 107, 0.2);
}

/* -------------------------------------------------------------------------- */
/*                               CARDS & COMPONENTS                           */
/* -------------------------------------------------------------------------- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
  font-weight: 600;
}
.card-body {
  padding: var(--space-5);
}
.card-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--bg-light);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.8rem;
  font-size: var(--font-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-light);
  color: var(--text-light);
  border: 1px solid var(--border);
}
.badge-primary {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-light);
}
.badge-success {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success);
}
.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}
.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning);
}

/* Buttons – additional variants */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.8rem 1.6rem;
  font-size: var(--font-sm);
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--bg-white);
  color: var(--text-dark);
  border-color: var(--border);
}
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.btn-sm {
  padding: 0.4rem 1rem;
  font-size: var(--font-xs);
}
.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--font-base);
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* -------------------------------------------------------------------------- */
/*                               FORMS (ENHANCED)                             */
/* -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-5);
}
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text-light);
}
.form-control {
  width: 100%;
  padding: 1rem 1.2rem;
  font-size: var(--font-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  color: var(--text-dark);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 74, 107, 0.1);
}
.form-control.is-invalid {
  border-color: var(--danger);
}
.form-control.is-valid {
  border-color: var(--success);
}
.invalid-feedback {
  color: var(--danger);
  font-size: var(--font-xs);
  margin-top: var(--space-1);
}

/* Custom checkbox & radio */
.custom-checkbox, .custom-radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}
.custom-checkbox input, .custom-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkmark {
  width: 1.8rem;
  height: 1.8rem;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.custom-checkbox input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}
.custom-checkbox input:checked ~ .checkmark::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1rem;
  color: white;
}
.custom-radio .checkmark {
  border-radius: var(--radius-full);
}
.custom-radio input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}
.custom-radio input:checked ~ .checkmark::after {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  background: white;
  border-radius: 50%;
}

/* Range slider */
.range-slider {
  width: 100%;
  -webkit-appearance: none;
  background: transparent;
}
.range-slider:focus {
  outline: none;
}
.range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.5rem;
  background: var(--border);
  border-radius: var(--radius-full);
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--primary);
  margin-top: -0.55rem;
  cursor: pointer;
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* -------------------------------------------------------------------------- */
/*                               TOOLTIPS                                     */
/* -------------------------------------------------------------------------- */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.8rem;
  background: var(--text-dark);
  color: white;
  font-size: var(--font-xs);
  white-space: nowrap;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: var(--z-tooltip);
}
[data-tooltip]:hover::before {
  opacity: 1;
}

/* -------------------------------------------------------------------------- */
/*                               MODAL                                        */
/* -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal-backdrop);
  display: none;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-modal);
  width: 90%;
  max-width: 500px;
  display: none;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}
.modal.show, .modal-backdrop.show {
  display: flex;
}
.modal-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-body {
  padding: var(--space-5);
  overflow-y: auto;
}
.modal-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}
.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------------- */
/*                               DROPDOWN                                     */
/* -------------------------------------------------------------------------- */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: var(--z-dropdown);
  display: none;
  flex-direction: column;
  padding: var(--space-2) 0;
}
.dropdown.show .dropdown-menu {
  display: flex;
}
.dropdown-item {
  padding: var(--space-2) var(--space-4);
  color: var(--text-dark);
  transition: var(--transition);
}
.dropdown-item:hover {
  background: var(--bg-hover);
  text-decoration: none;
}

/* -------------------------------------------------------------------------- */
/*                               TABS & ACCORDION                             */
/* -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: var(--space-1);
}
.tab {
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  color: var(--text-muted);
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-content {
  display: none;
  padding: var(--space-5) 0;
}
.tab-content.active {
  display: block;
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.accordion-header {
  background: var(--bg-light);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}
.accordion-header:hover {
  background: var(--bg-hover);
}
.accordion-body {
  padding: var(--space-4);
  border-top: 1px solid var(--border);
  display: none;
}
.accordion-item.open .accordion-body {
  display: block;
}

/* -------------------------------------------------------------------------- */
/*                               PROGRESS & SPINNERS                          */
/* -------------------------------------------------------------------------- */
.progress {
  height: 0.8rem;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}
.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-hover) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* -------------------------------------------------------------------------- */
/*                               ANIMATIONS                                   */
/* -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-fade { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideInUp 0.3s ease; }
.animate-slide-right { animation: slideInRight 0.3s ease; }
.animate-pulse { animation: pulse 1.5s infinite; }



/* -------------------------------------------------------------------------- */
/*                               POPULAR SITES & RESULTS                      */
/* -------------------------------------------------------------------------- */
.popular-sites, .results {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.popular-sites:hover, .results:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.popular-sites ul, .results ul {
  list-style: none;
}
.popular-sites li, .results li {
  padding: var(--space-2) 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.popular-sites li::before, .results li::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f0c1";
  color: var(--primary);
}


/* -------------------------------------------------------------------------- */
/*                               RESPONSIVE                                   */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .container { padding: var(--space-4); }
  h1 { font-size: var(--font-2xl); }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .accounts thead { display: none; }
  .accounts tr {
    display: block;
    margin-bottom: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
  }
  .accounts td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: var(--space-2) 0;
  }
  .accounts td:before {
    content: attr(data-label);
    font-weight: 600;
    width: 40%;
  }
  .accounts td:last-child { border-bottom: none; }
}

/* -------------------------------------------------------------------------- */
/*                               ACCESSIBILITY & PRINT                        */
/* -------------------------------------------------------------------------- */
@media print {
  body { background: white; color: black; }
  .search-box, .footer, .vote-btn, .popular-sites { display: none; }
  a { color: black; text-decoration: none; }
  .container { max-width: 100%; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== ADDITIONAL STYLES FOR MISSING ELEMENTS ===== */

/* Tagline under header */
.tagline {
  font-size: var(--font-lg);
  color: var(--text-muted);
  margin-top: -1rem;
  margin-bottom: var(--space-4);
}

/* Site search form inside header */
.site-search {
  margin-top: var(--space-3);
}
.site-search form {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  gap: var(--space-2);
}
.site-search input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  font-size: var(--font-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  color: var(--text-dark);
  transition: var(--transition);
}
.site-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 74, 107, 0.1);
}
.site-search button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 0 1.6rem;
  font-size: var(--font-sm);
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(30, 74, 107, 0.2);
}

/* Back button (used in various pages) */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-light);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-light);
  transition: var(--transition);
  text-decoration: none;
  font-size: var(--font-sm);
}
.back-button:hover {
  background: var(--bg-hover);
  color: var(--primary);
  border-color: var(--primary-light);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Submit form container */
.submit-form {
  max-width: 600px;
  margin: 0 auto;
}

/* Success & error message boxes */
.success, .error {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: var(--font-sm);
}
.error {
  background: var(--danger-light);
  border-left: 4px solid var(--danger);
  color: var(--danger);
}
.success {
  background: var(--success-light);
  border-left: 4px solid var(--success);
  color: var(--success);
}

/* Vote wrapper (container for up/down buttons) */
.vote-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Votes count styling */
.votes-up, .votes-down {
  display: inline-block;
  font-weight: 600;
  margin: 0 0.2rem;
}
.votes-up {
  color: var(--success);
}
.votes-down {
  color: var(--danger);
}


/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}
.page-link, .page-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-dark);
  transition: var(--transition);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-sm);
}
.page-link:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
  text-decoration: none;
}
.page-current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  cursor: default;
}

/* Notification toasts */
.notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg-white);
  border-left: 4px solid;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-4);
  max-width: 360px;
  animation: slideInRight 0.3s ease;
  font-size: var(--font-sm);
}
.success-notification {
  border-left-color: var(--success);
  background: var(--success-light);
  color: var(--success);
}
.error-notification {
  border-left-color: var(--danger);
  background: var(--danger-light);
  color: var(--danger);
}
.notification-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0 var(--space-1);
  color: currentColor;
  opacity: 0.6;
  transition: var(--transition);
  line-height: 1;
}
.notification-close:hover {
  opacity: 1;
}
.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Responsive notifications on mobile */
@media (max-width: 768px) {
  .notification {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

/* Footer links spacing */
.footer a {
  margin: 0 0.5rem;
}
.footer a:first-child {
  margin-left: 0;
}
.footer a:last-child {
  margin-right: 0;
}

/* ===== SPECIFIC STYLES FOR ADMIN PANEL (admin.php) ===== */

/* Admin header links (Logout, View site) */
header p a {
  display: inline-block;
  margin: 0 0.5rem;
  font-weight: 500;
  background: var(--bg-white);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  transition: var(--transition);
}
header p a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Admin pending submissions table wrapper */
.admin-table-wrapper {
  overflow-x: auto;
  margin: var(--space-5) 0;
}

/* Admin action links (Approve / Reject) */
td a {
  display: inline-block;
  font-weight: 500;
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}
td a[href*="action=approve"] {
  color: var(--success);
  background: var(--success-light);
  border: 1px solid var(--success);
}
td a[href*="action=approve"]:hover {
  background: var(--success);
  color: white;
  text-decoration: none;
}
td a[href*="action=reject"] {
  color: var(--danger);
  background: var(--danger-light);
  border: 1px solid var(--danger);
}
td a[href*="action=reject"]:hover {
  background: var(--danger);
  color: white;
  text-decoration: none;
}

/* ===== SPECIFIC STYLES FOR LOGIN PAGE (login.php) ===== */

/* Center the login form with card style */
body:has(.container > h1:contains("Admin Login")) .container,
.login-container {
  max-width: 480px;
  margin: 5rem auto;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-8);
  border: 1px solid var(--border);
}
/* Fallback if :has() not supported – add class to body or container via PHP */
.login-box {
  max-width: 480px;
  margin: 5rem auto;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-8);
  border: 1px solid var(--border);
}
.login-box h1 {
  text-align: center;
  margin-bottom: var(--space-6);
}
.login-box .form-group {
  margin-bottom: var(--space-5);
}
.login-box button {
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 1rem;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.login-box button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.login-box .back-button {
  display: block;
  text-align: center;
  margin-top: var(--space-4);
}

/* ===== SPECIFIC STYLES FOR SUBMIT PAGE (submit.php) ===== */

/* Enhance submit form layout */
.submit-form .form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.submit-form button[type="submit"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: var(--font-base);
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
}
.submit-form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* -------------------------------------------------------------------------- */
/*                               END OF STYLESHEET                           */
/* -------------------------------------------------------------------------- */