:root {
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --card-bg: rgba(30, 41, 59, 0.4);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --gradient-start: #38bdf8;
  --gradient-end: #818cf8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", sans-serif;
}

body {
  background-color: var(--bg-darker);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Abstract Backgrounds */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
}

.top-left {
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

.bottom-right {
  bottom: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    var(--gradient-start) 0%,
    transparent 70%
  );
  opacity: 0.2;
}

/* Header */
.glass-header {
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.logo-icon {
  background: linear-gradient(
    135deg,
    var(--gradient-start),
    var(--gradient-end)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.5rem;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--text-primary);
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.auth-buttons {
  display: flex;
  gap: 1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
}

.btn-secondary:hover {
  color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 4px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -3px rgba(99, 102, 241, 0.6);
}

/* Main Content */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.hero-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 5rem;
}

.badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--gradient-start);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--gradient-start),
    var(--gradient-end)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* Search Container */
.search-container {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  padding: 0.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.search-icon {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-left: 1rem;
}

.search-container input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.search-container input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  padding: 0.8rem 2rem;
}

/* Jobs Section */
.jobs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.jobs-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.job-count {
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

/* Grid */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.job-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.job-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow:
    0 15px 30px -10px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(99, 102, 241, 0.05);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gradient-start);
  font-size: 1.2rem;
  border: 1px solid var(--card-border);
}

.job-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.job-company {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.job-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.2rem;
  border-top: 1px solid var(--card-border);
}

.salary {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.apply-btn {
  text-decoration: none;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.apply-btn:hover {
  background: var(--accent);
  color: white;
}

/* Loader */
.loader {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 1rem;
}

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

/* Footer */
footer {
  border-top: 1px solid var(--card-border);
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  nav,
  .auth-buttons {
    display: none;
  }
  .search-container {
    flex-direction: column;
    gap: 1rem;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .search-container input,
  .search-container .search-btn {
    width: 100%;
    border-radius: 8px;
  }
  .search-container input {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
  }
  .search-icon {
    display: none;
  }
}

/* Terminal / Pipeline UI css */
.terminal-window {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  max-width: 900px;
  margin: 0 auto;
}

.terminal-header {
  background: #0f172a;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red {
  background: #ef4444;
}
.dot.yellow {
  background: #f59e0b;
}
.dot.green {
  background: #10b981;
}

.terminal-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.terminal-body {
  padding: 1.5rem;
  height: 500px;
  overflow-y: auto;
  font-family: "Fira Code", "Courier New", Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  background: #020617;
}

.prompt {
  color: #f43f5e;
  font-weight: bold;
  margin-right: 8px;
}

.log-line {
  margin-bottom: 4px;
  word-break: break-all;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.log-line i {
  margin-top: 3px;
}

/* Custom coloring for log lines matching Scrapy */
.log-line.success {
  color: #34d399;
}
.log-line.warning {
  color: #facc15;
}
.log-line.system {
  color: #c084fc;
  font-weight: 600;
}
.log-line.debug {
  color: #475569;
}
.log-line.info {
  color: #94a3b8;
}
