:root {
  --primary-color: #6366f1;
  /* Indigo 500 */
  --primary-hover: #4f46e5;
  /* Indigo 600 */
  --secondary-color: #ec4899;
  /* Pink 500 */
  --background-dark: #0f172a;
  /* Slate 900 */
  --surface-dark: #1e293b;
  /* Slate 800 */
  --text-light: #f8fafc;
  /* Slate 50 */
  --text-dim: #94a3b8;
  /* Slate 400 */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-family: 'Inter', sans-serif;
  --transition-speed: 0.3s;
}

/* Global Box Sizing Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--background-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Footer Styles */
.main-footer {
  margin-top: auto;
  padding: 2rem 0;
  text-align: center;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid var(--glass-border);
  width: 100%;
  color: var(--text-dim);
  font-size: 0.875rem;
  z-index: 10;
  position: relative;
}

.main-footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.main-footer a:hover {
  color: var(--primary-color);
}

.footer-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  margin-top: 0;
  color: var(--text-light);
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

p {
  color: var(--text-dim);
  margin-bottom: 2rem;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.hero {
  /* min-height: 100vh;  <-- Removed global min-height */
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 0 0 0;
  /* Adjusted padding, removing bottom padding to let footer sit flush if needed */
}

.disabled-link {
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
}

/* Flex Container for App Pages */
.container-flex {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  /* containment */
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}


.landing-hero {
  min-height: 100vh;
}

/* Background Accents */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
}

.hero::before {
  background: var(--primary-color);
  top: -100px;
  left: -100px;
}

.hero::after {
  background: var(--secondary-color);
  bottom: -100px;
  right: -100px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-top: 3rem;
}

.glass-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  /* Rendering Stability */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.edge-browser .glass-card {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(30, 41, 59, 1.0) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.edge-browser * {
  animation: none !important;
  transition: none !important;
  /* Force visibility on Edge when animations are disabled */
  opacity: 1 !important;
  transform: none !important;
}

.edge-browser .form-row {
  display: block !important;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.glass-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.glass-card p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all var(--transition-speed);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #444cf7 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #3a3fd5 100%);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--text-dim);
  color: var(--text-light);
}

.btn-secondary:hover {
  border-color: var(--text-light);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.delay-1 {
  animation-delay: 0.2s;
  opacity: 0;
}

.delay-2 {
  animation-delay: 0.4s;
  opacity: 0;
}

.delay-3 {
  animation-delay: 0.6s;
  opacity: 0;
}

/* Refactored styles from the-tech.html */
.hero-description {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.text-left {
  text-align: left;
}

.roadmap-section {
  margin-top: 3rem;
  text-align: center;
}

.roadmap-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.caption-text {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.action-container {
  margin-top: 4rem;
}


.copyright-footer {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* JobFit Analysis UI */
.analyze-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
}

.input-group {
  margin-bottom: 20px;
}

textarea {
  width: 100%;
  height: 200px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  font-family: var(--font-family);
  font-size: 1rem;
  resize: vertical;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  box-sizing: border-box;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.analyze-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.analyze-btn:hover {
  background: var(--primary-hover);
}

.analyze-btn:disabled {
  background: var(--text-dim);
  cursor: not-allowed;
}

#result {
  margin-top: 40px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  display: none;
}

#result h3 {
  margin-top: 0;
  color: var(--primary-color);
}

/* Markdown Styles */
#result-content {
  line-height: 1.6;
}

#result-content h1,
#result-content h2,
#result-content h3 {
  color: var(--text-light);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

#result-content ul {
  padding-left: 20px;
}

#result-content li {
  margin-bottom: 8px;
}

#result-content strong {
  color: var(--secondary-color);
}

.loader {
  display: none;
  text-align: center;
  margin-top: 20px;
  color: var(--text-dim);
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  z-index: 1000;
}

.navbar-container {
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  /* For absolute positioning of mobile menu */
}

.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ensure nav-links are visible on desktop and burger is hidden */
@media screen and (min-width: 769px) {
  .nav-links {
    display: flex !important;
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    width: auto !important;
    padding: 0 !important;
    gap: 1.5rem;
    /* Added this from the malformed block, assuming it was for desktop nav-links */
    align-items: center;
    /* Added this from the malformed block, assuming it was for desktop nav-links */
  }

  .burger-menu {
    display: none !important;
  }
}

.burger-menu {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  /* Push to right */
  margin-left: auto;
  z-index: 101;
  /* Ensure above dropdown */
  background: none;
  border: none;
  padding: 0;
}

.burger-menu svg {
  width: 32px;
  height: 32px;
  stroke: var(--text-light);
  transition: transform 0.3s ease;
}

@media screen and (max-width: 768px) {
  .nav-links {
    position: absolute;
    right: 0;
    height: auto;
    top: 100%;
    /* Align right below navbar */
    background-color: var(--surface-dark);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Right align content */
    width: 200px;
    /* Limit width */
    transform: translateY(-20px);
    /* Start hidden slightly above */
    transition: all 0.3s ease-in;
    z-index: 100;
    border: 1px solid var(--glass-border);
    border-radius: 0 0 0 1rem;
    padding: 1rem 2rem;
    opacity: 0;
    visibility: hidden;
    /* Hide completely when closed */
  }

  .nav-links.active {
    transform: translateY(0%);
    opacity: 1;
    visibility: visible;
  }

  .burger-menu {
    display: flex;
  }

  .burger-menu.toggle svg {
    transform: rotate(90deg);
    stroke: var(--primary-color);
  }
}

.nav-links a:hover {
  color: var(--primary-color);
  transition: color 0.2s;
}

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

/* Centralized Profile Form Styles */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group-full {
  width: 100%;
  margin-bottom: 1rem;
}

.profile-card {
  max-width: 600px;
  margin: 2rem auto;
  text-align: left;
}

/* Cleanup Utility Classes */
.status-text {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.full-width {
  width: 100%;
}

.mt-1-5 {
  margin-top: 1.5rem;
}

.secondary-action-container {
  margin-top: 2rem;
}

.btn-logout {
  margin-left: 2rem;
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  text-decoration: underline;
}

.signup-card {
  max-width: 400px;
  margin: 2rem auto;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.text-center {
  text-align: center;
}

.text-dim-link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.text-dim-link:hover {
  color: var(--text-light);
}

.label-icon {
  width: 1.1rem;
  height: 1.1rem;
  margin-right: 0.6rem;
  opacity: 0.8;
  flex-shrink: 0;
}

label {
  display: flex;
  align-items: center;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.success-text {
  color: #4ade80 !important;
}

.error-text {
  color: #ff6b6b !important;
}

.dim-text {
  color: var(--text-dim) !important;
}

/* Interview Mode Styles */
.chat-container {
  max-width: 800px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);

  border-radius: 16px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message {
  max-width: 85%;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  line-height: 1.5;
  position: relative;
  color: var(--text-light);
}

.message.recruiter {
  align-self: flex-end;
  background: var(--primary-color);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.candidate {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  /* Dark mode compatible */
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: 4px;
}

.message.candidate p {
  margin: 0.5em 0;
}

.message.candidate p:first-child {
  margin-top: 0;
}

.message.candidate p:last-child {
  margin-bottom: 0;
}

.chat-input-area {
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.8);
  /* Dark background matching theme */
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 1rem;
}

.chat-input-area textarea {
  flex: 1;
  padding: 1rem;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  border-radius: 8px;
  resize: none;
  height: 50px;
  font-family: inherit;
  transition: all 0.2s;
}

.chat-input-area textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.setup-screen {
  max-width: 600px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
}

.typing-indicator {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  display: none;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
  margin-left: 2rem;
}

.setup-textarea {
  width: 100%;
  height: 150px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

/* Technical Details Section */
.tech-details-card {
  margin-top: 3rem;
}

.tech-details-title {
  color: white;
}

.flex-split-gap {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.text-sm {
  font-size: 0.875rem;
}

.w-full {
  width: 100%;
}

.tech-details-content {
  line-height: 1.8;
  color: var(--text-light);
}

.chat-input-container-styled {
  border-radius: 12px;
  margin-top: 1rem;
}

.pb-2 {
  padding-bottom: 2rem;
}

.hero-header {
  align-items: start;
}

.split-grid {
  grid-template-columns: 1fr 1fr;
}

.stats-row {
  width: 100%;
  justify-content: space-around;
}

.flex-center-width {
  display: flex;
  justify-content: center;
  width: 100%;
}

.flex-1 {
  flex: 1;
}

/* Utility Classes for Refactoring */
.hidden {
  display: none !important;
}

.block {
  display: block;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mt-4 {
  margin-top: 4rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.gap-1 {
  gap: 1rem;
}

.gap-2 {
  gap: 2rem;
}

.new-interview-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

.pt-2 {
  padding-top: 2rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.max-w-800 {
  max-width: 800px;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.text-dim {
  color: var(--text-dim);
}

.no-underline {
  text-decoration: none;
}

.text-inherit {
  color: inherit;
}

/* Specific Component Refactors */
.logo-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.stat-number-primary {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-number-secondary {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.flex-center-gap {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.chart-container-wrapper {
  position: relative;
  height: 200px;
  width: 100%;
}

.history-sidebar-title {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.loading-text {
  text-align: center;
  color: var(--text-dim);
  padding: 2rem;
}

.setup-link-text {
  margin-bottom: 2rem;
  display: block;
  cursor: default;
}

.nav-brand-reset {
  text-decoration: none;
  color: inherit;
}



/* Cookie Consent Popup */
.cookie-popup {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 90%;
  width: 500px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.5rem;
}

.cookie-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: left;
}

/* Mobile responsiveness for cookie popup */
@media (max-width: 600px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-content p {
    text-align: center;
    margin-bottom: 1rem;
  }

  .cookie-popup {
    bottom: 1rem;
    width: 95%;
  }
}