:root {
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary-color: #10b981;
  --secondary-light: #34d399;
  --secondary-dark: #059669;
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-color: #e2e8f0;
  --border-radius: 0.5rem;
  --transition: all 0.2s ease-in-out;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f172a;
    --surface: #1e293b;
    --surface-elevated: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #cbd5e1;
    --border-color: #334155;
  }
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  z-index: 0;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

/* Navigation */
nav {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

nav a.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

/* Main content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Search container */
.search-container {
  background-color: var(--surface-elevated);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  border: 1px solid var(--border-color);
}

#search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background-color: var(--surface);
  color: var(--text-primary);
  transition: var(--transition);
}

#search-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#industry-filter, #country-filter {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background-color: var(--surface);
  color: var(--text-primary);
  transition: var(--transition);
}

#industry-filter:focus, #country-filter:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#search-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

#search-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

#search-button:active {
  transform: translateY(0);
}

/* Results container */
#results-container {
  margin-top: 2rem;
}

/* Updated result card styling with better spacing */
.result-card {
  width: 320px;
  height: 250px;
  background-color: var(--surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin: 0 auto;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
  z-index: 1; /* Lower z-index than content */
}

.result-card:hover {
  box-shadow: var(--shadow-md);
}

/* Text truncation to handle long content */
.result-card h3 {
  margin-bottom: 1rem; /* Increased from 0.75rem */
  line-height: 1.3;
  height: 1.3em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  z-index: 5; /* Ensure title is above other elements */
}

.result-card h3 a {
  text-decoration: none;
  color: var(--text-primary);
}

.result-card h3 a:hover {
  color: var(--primary-color);
}

/* URL links styling */
.url-links {
  margin-top: 0.25rem;
  margin-bottom: 1rem; /* Increased from 0.75rem */
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Increased from 0.35rem */
  max-width: 100%;
  position: relative;
  z-index: 4; /* Lower than title but higher than other elements */
}

.url-links div {
  display: flex;
  align-items: baseline;
  max-width: 100%;
  flex-wrap: nowrap;
}

.url-links span {
  font-weight: 500;
  margin-right: 0.5rem; /* Increased from 0.35rem */
  color: var(--text-secondary);
  min-width: 70px; 
  flex-shrink: 0;
}

.url-links a {
  display: inline-block;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: var(--primary-color);
  text-decoration: none;
}

.url-links a:hover {
  text-decoration: underline;
}

.result-card .meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.result-card .meta span {
  background-color: var(--background);
  padding: 0.2rem 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.api-badge {
  background-color: var(--secondary-color) !important;
  color: white !important;
}

.result-card .details {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.result-card .details p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8em;
}

.result-card .actions {
  margin-top: auto;
}

.result-card .edit-btn {
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: background-color 0.2s ease;
}

.result-card .edit-btn:hover {
  background-color: var(--secondary-dark);
}

/* Simple edit.html implementation */
.edit-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.2s, opacity 0.2s;
}

.edit-popup.active {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.edit-popup-content {
  background: var(--background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.edit-popup-content h2 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.close-popup {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-tertiary);
}

.pagination-info {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* Form styles */
.form-container {
  background-color: var(--surface-elevated);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
  max-width: 800px;
  margin: 0 auto;
}

.form-container h2 {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: var(--text-primary);
  font-weight: 600;
}

.form-container h3 {
  margin: 1.5rem 0 1rem;
  font-size: 1.25rem;
  color: var(--text-primary);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background-color: var(--surface);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

#submit-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

#submit-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#cancel-button {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

#cancel-button:hover {
  background-color: var(--background);
  border-color: var(--text-tertiary);
}

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

footer p {
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

footer .links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

footer .links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

footer .links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Loading state */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.loading::after {
  content: '';
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--primary-light);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

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

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-tertiary);
}

.empty-state p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  #search-input, #industry-filter, #search-button, #country-filter {
    width: 100%;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  #submit-button, #cancel-button {
    width: 100%;
  }
  
  footer .links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Futuristic design elements */
.glow-effect {
  position: relative;
}

.glow-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-effect:hover::before {
  opacity: 1;
}

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

.employer-card {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Add some depth with subtle gradient on cards */
.employer-card {
  background: linear-gradient(to bottom right, var(--surface), var(--surface) 80%, rgba(59, 130, 246, 0.05));
}

/* Add this to styles.css for visual feedback on invalid URLs */
.form-group input.invalid {
  border-color: #ef4444;
  background-color: rgba(239, 68, 68, 0.05);
}

.form-group input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Validation message styling - browser built-in */
input:invalid + span::after {
  content: '✖';
  color: #ef4444;
  padding-left: 5px;
}

input:valid + span::after {
  content: '✓';
  color: #10b981;
  padding-left: 5px;
}

/* Form validation styling */
.form-group input.invalid {
  border-color: #ef4444;
  background-color: rgba(239, 68, 68, 0.05);
}

.form-group input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Show validation status indicator next to inputs */
.form-group {
  position: relative;
}

.form-group input:invalid ~ .validation-status::before {
  content: '✖';
  color: #ef4444;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.form-group input:valid ~ .validation-status::before {
  content: '✓';
  color: #10b981;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* Style form error messages */
.form-error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group input.invalid + .form-error-message {
  display: block;
}

/* Add styles for the no data message */
.no-data-message {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.no-data-message h3 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.no-data-message p {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.error {
    color: #dc2626;
    padding: 1rem;
    background-color: #fee2e2;
    border-radius: 4px;
    margin: 1rem 0;
    text-align: center;
}

/* Add these styles for the improved form sections */
.form-section {
  padding: 1rem;
  border-radius: var(--border-radius);
  background-color: var(--surface);
  margin-bottom: 1.5rem;
}

.form-section h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  font-style: italic;
}

.form-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 1.5rem 0;
}

/* Better form action buttons */
.primary-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.primary-button:hover {
  background-color: var(--primary-dark);
}

.secondary-button {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.secondary-button:hover {
  background-color: var(--background);
  border-color: var(--text-tertiary);
}

/* Success message styling */
.success-message {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background-color: var(--secondary-color);
  color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  animation: fadeIn 0.3s ease-out forwards;
}

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

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Add grid layout for results */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

/* Keep the left border accent */
.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
} 