/* Basic styles for the job portal app */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #1a202c;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* Header styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 25px 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
  color: #667eea;
  font-weight: 700;
  font-size: 28px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info span {
  font-weight: 600;
  color: #4a5568;
  padding: 8px 16px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Auth section styles */
.auth-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-section h1 {
  margin-bottom: 50px;
  color: white;
  text-align: center;
  font-size: 48px;
  font-weight: 800;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
}

.auth-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Card styles */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.auth-card {
  width: 420px;
  max-width: 90vw;
  background: rgba(255, 255, 255, 0.98);
}

.auth-card h2 {
  margin-bottom: 30px;
  color: #2d3748;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
}

.auth-card input {
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.auth-card input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: white;
}

.auth-card button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.auth-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.auth-card button:active {
  transform: translateY(0);
}

.auth-card p {
  text-align: center;
  margin-top: 20px;
  color: #718096;
  font-size: 14px;
}

.auth-card a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-card a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.auth-card .guest-link {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-card .guest-link:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  text-decoration: none;
  transform: translateY(-2px);
}

/* Main app styles */
.app-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.header {
  grid-column: 1 / -1;
}

@media (max-width: 968px) {
  .app-section {
    grid-template-columns: 1fr;
  }
}

.search-card, .manage-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-card h2, .manage-card h2 {
  margin-bottom: 25px;
  color: #2d3748;
  font-size: 24px;
  font-weight: 700;
  padding-bottom: 15px;
  border-bottom: 3px solid transparent;
  background: linear-gradient(white, white), linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}

/* Form styles */
.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2d3748;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.field input, .field select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.field input:focus, .field select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: white;
}

/* Category picker */
.picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: #f7fafc;
  border: 2px solid transparent;
  font-size: 14px;
}

.picker label:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-color: #667eea;
}

.picker input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #667eea;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

/* Exclusions */
.exclusions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 16px;
  background: #f7fafc;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.checkbox-label:hover {
  background: linear-gradient(135deg, rgba(245, 87, 108, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
  border-color: #f5576c;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f5576c;
  cursor: pointer;
}

/* Buttons */
.btn, button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover, button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn:active, button:active {
  transform: translateY(0);
}

#logoutBtn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

#logoutBtn:hover {
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

/* Site list */
#siteList {
  list-style: none;
  padding: 0;
}

#siteList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #3498db;
}

#siteList .site-url {
  flex: 1;
  font-family: monospace;
  color: #2c3e50;
}

#siteList button {
  margin-left: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

#siteList button:first-of-type {
  background: #f39c12;
}

#siteList button:first-of-type:hover {
  background: #e67e22;
}

#siteList button:last-of-type {
  background: #e74c3c;
}

#siteList button:last-of-type:hover {
  background: #c0392b;
}

/* Manage form */
#addForm {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: stretch;
}

#addForm input {
  flex: 1;
  min-width: 200px;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #f7fafc;
}

#addForm input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: white;
}

#addForm button {
  white-space: nowrap;
  padding: 14px 28px;
}

#refreshAll {
  background: #95a5a6;
  width: 100%;
}

#refreshAll:hover {
  background: #7f8c8d;
}

/* Hint section */
.hint {
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 4px;
  padding: 15px;
  margin: 20px 0;
}

.hint p {
  margin: 0;
  color: #0c5460;
}

/* Debug section */
.debug {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  border-radius: 4px;
  font-family: monospace;
  white-space: pre-wrap;
  display: none;
  grid-column: 1 / -1;
}

.debug.active {
  display: block;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .auth-cards {
    flex-direction: column;
    align-items: center;
  }
  
  #addForm {
    flex-direction: column;
  }
  
  #addForm input {
    min-width: auto;
  }
  
  .exclusions {
    flex-direction: column;
  }
  
  #siteList li {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  #siteList .site-url {
    word-break: break-all;
  }
}