/* ============================================================
   GLOBAL RESET
============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  color: #1e293b;
  height: 100%;
}

/* Global link style */
a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ============================================================
   HEADER (Glass Rounded Navbar)
============================================================ */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 1300px;
  z-index: 1000;

  background: rgba(42, 123, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-radius: 18px;
  padding: 6px 22px;

  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 6px 26px rgba(15, 35, 80, 0.25);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}

.logo-icon {
  font-size: 1.6rem;
  margin-right: 8px;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 22px;
}

nav ul li a {
  color: white;
  font-size: 0.95rem;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Username displayed after login */
.nav-username {
  margin-left: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

/* Auth buttons inside navbar */
#login-btn,
#signup-btn,
#logout-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  color: #1e293b;
  background: white;
  font-weight: 600;
}
#logout-btn {
  display: none; /* shown after login */
}

/* Ensures body content starts below floating header */
body {
  padding-top: 140px;
}

/* ============================================================
   HERO SECTION (Landing Page)
============================================================ */
.hero {
  padding: 80px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #0b1f4f;
  margin-bottom: 16px;
}

.hero-subtitle,
.hero-tagline,
.hero-note {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: #475569;
}

.hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.hero-tagline {
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 20px;
}

/* Center CTA Row */
.hero-cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 14px 32px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1e4fd1, #1a46c0);
  transform: translateY(-2px);
}

/* ============================================================
   AUTH PAGES (login.html & signup.html)
============================================================ */
.auth-container {
  padding-top: 140px;
  display: flex;
  justify-content: center;
  padding-bottom: 80px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  padding: 32px;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.12);
  border: 1px solid rgba(209,213,219,0.7);
  text-align: center;
}

.auth-card h2 {
  font-size: 1.5rem;
  color: #0b1f4f;
  margin-bottom: 8px;
}

.auth-sub {
  color: #4b5563;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.auth-card input {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}

/* Divider (“OR”) */
.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}
.divider span {
  background: #ffffff;
  padding: 0 10px;
  color: #6b7280;
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
}
.divider::before {
  content: "";
  width: 100%;
  height: 1px;
  background: #e5e7eb;
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 1;
}

.auth-bottom-text {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #4b5563;
}

/* ============================================================
   CARD LAYOUTS (Used in disclaimer & other pages)
============================================================ */
.card-container {
  width: 92%;
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 40px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 34px rgba(15,23,42,0.12);
}

.disclaimer-box {
  background: #f1f5f9;
  border-left: 6px solid #ef4444;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 10px;
}
.disclaimer-box h2 {
  margin-bottom: 12px;
  color: #b91c1c;
}

/* ============================================================
   FOOTER
============================================================ */
footer {
  margin-top: 60px;
  background: #1e293b;
  color: white;
  padding: 40px 20px;
  text-align: center;
}
footer a {
  color: #93c5fd;
}
footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  header {
    padding: 8px 16px;
    top: 10px;
  }

  nav ul {
    gap: 14px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .auth-card {
    padding: 24px;
  }
}

/* Top Blue Strip */
.disclaimer-header-strip {
    background: linear-gradient(90deg, #1e63ff, #4a8dff);
    padding: 18px 24px;
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
  }
  
  .disclaimer-header-strip h2 {
    margin: 0;
    color: white;
    font-size: 28px;
    font-weight: 700;
  }
  
  /* Yellow disclaimer box */
  .disclaimer-box {
    background: #fff8dd;
    border: 2px solid #eac24f;
    padding: 25px;
    border-radius: 0 0 16px 16px;
    font-size: 16px;
    line-height: 1.6;
  }
  
  /* Disabled button appearance */
  .disabled-btn {
    background-color: #bfbfbf !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
  }
  
  /* Enabled button appearance (blue) */
  .enabled-btn {
    background: linear-gradient(90deg, #1e63ff, #4a8dff) !important;
    cursor: pointer !important;
    box-shadow: 0px 8px 20px rgba(30, 99, 255, 0.35) !important;
  }
  
  /* ============================================================
   STATE WIZARD CARD
============================================================ */
.wizard-card {
    max-width: 1100px;
    margin: 120px auto 80px;
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.15);
    overflow: hidden;
  }
  
  /* Blue top strip */
  .wizard-card-header {
    background: linear-gradient(90deg, #1e63ff, #4a8dff);
    padding: 28px 40px;
    text-align: left;
    color: #ffffff;
  }
  
  .wizard-card-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
  }
  
  .wizard-card-header p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.95;
  }
  
  /* White body */
  .wizard-card-body {
    padding: 32px 40px 36px;
  }
  
  .wizard-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 18px;
  }
  
  /* Field + select */
  .wizard-field {
    margin-bottom: 28px;
  }
  
  .wizard-select {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    background: #f9fafb;
    outline: none;
  }
  
  .wizard-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
  }
  
  /* Buttons row */
  .wizard-buttons {
    display: flex;
    gap: 16px;
    margin-top: 10px;
  }
  
  /* Pill-style buttons, bigger like screenshot */
  .wizard-btn {
    border: none;
    border-radius: 999px;
    padding: 12px 38px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s ease;
  }
  
  /* Back (dark grey) */
  .wizard-btn-secondary {
    background: #4b5563;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.35);
  }
  
  .wizard-btn-secondary:hover {
    background: #374151;
    transform: translateY(-1px);
  }
  
  /* Next (blue) – script.js still controls disabled state */
  .wizard-btn-primary {
    background: #93c5fd;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  }
  
  .wizard-btn-primary:enabled {
    background: #2563eb;
  }
  
  .wizard-btn-primary:enabled:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
  }
  
  .wizard-btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  /* Smaller screens */
  @media (max-width: 768px) {
    .wizard-card {
      margin: 110px 16px 40px;
    }
    .wizard-card-header,
    .wizard-card-body {
      padding: 20px;
    }
    .wizard-buttons {
      flex-direction: column-reverse;
      align-items: stretch;
    }
    .wizard-btn {
      width: 100%;
      justify-content: center;
      text-align: center;
    }
  }
  
  /* ============================================================
   VIOLATION GRID TILES
============================================================ */
/* Container adjustments to center everything */
/* Center layout container */
.violation-selector {
    text-align: left;
    margin: 30px auto;
    width: 100%;
    max-width: 1100px;
  }
  
  /* Title alignment */
  .violation-selector h2 {
    margin-bottom: 20px;
    text-align: left;
  }
  
  /* GRID — 3 cards per row, wide rectangles */
  .violation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
    margin-top: 20px;
  }
  
  /* CARD — wide rectangular cards */
  .violation-card {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* centers vertically */
    align-items: center;      /* centers horizontally */
  
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    min-height: 130px;
    transition: all 0.3s ease;
    text-align: center;       /* ensures text is centered */
  }
  
  
  /* Hover effect */
  .violation-card:hover {
    background: linear-gradient(135deg, #1877F2 0%, #5195f7 100%);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  }
  
  /* ICON */
  .violation-card .icon {
    font-size: 28px;
    margin-bottom: 6px;
  }
  
  /* TITLE */
  .violation-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
  }
  
  /* Description text */
  .violation-card-desc {
    font-size: 0.9rem;
    opacity: 0.85;
    text-align: center;
  }
  

  /* ============================================================
   CHAT PAGE LAYOUT
============================================================ */
.chat-card {
    margin-top: 110px;
    margin-bottom: 80px;
  }
  
  /* Status bar (state + violation + download button) */
  .status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f3f4f6;
    font-size: 0.92rem;
    color: #374151;
  }
  
  /* Two-column layout for desktop */
  .chat-layout {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 20px;
    align-items: stretch;
  }
  
  /* Left panel: Common questions */
  .common-questions-panel {
    background: #f9fafb;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 16px 18px;
    font-size: 0.95rem;
  }
  
  .common-questions-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
  }
  
  #commonQuestionsList {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .question-btn {
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  }
  
  .question-btn:hover {
    background: #eff6ff;
    border-color: #2563eb;
    transform: translateY(-1px);
  }
  
  /* Right panel: Chat */
  .chat-panel {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 0;
  }
  
  .chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
  }
  
  .chat-messages {
    padding: 14px 16px;
    height: 260px;
    overflow-y: auto;
    font-size: 0.95rem;
  }
  
  /* Individual messages (user / bot) */
  .message {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 10px;
  }
  
  .message.user {
    background: #2563eb;
    color: #ffffff;
    align-self: flex-end;
  }
  
  .message.bot {
    background: #f3f4ff;
    color: #111827;
  }
  
  /* Input row */
  .chat-input-container {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
  }
  
  .chat-input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
  }
  
  .chat-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  }
  
  /* Bottom actions + disclaimer */
  .chat-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .disclaimer-text {
    margin-top: 12px;
    font-size: 0.8rem;
    text-align: center;
    color: #6b7280;
  }
  
  /* Responsive: stack columns on small screens */
  @media (max-width: 900px) {
    .chat-layout {
      grid-template-columns: 1fr;
    }
  
    .chat-messages {
      height: 220px;
    }
  }
/* ============================================================
   Generic Pill Buttons (used by nav + chat + wizard)
============================================================ */
.btn,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, color 0.15s ease,
              box-shadow 0.15s ease, transform 0.1s ease;
}

/* Primary blue pill */
.btn {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Secondary (Logout style): white pill with subtle border */
.btn-secondary {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-secondary:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

/* Danger (red) */
.btn-danger {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}
  /* Mock script content styling */
.script-container {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  padding: 20px 22px;
  max-height: 520px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.script-container h2,
.script-container h3 {
  margin-top: 18px;
  margin-bottom: 8px;
}

.script-container p {
  margin-bottom: 8px;
}

.script-container ul {
  margin: 10px 0 10px 20px;
  padding-left: 18px;
}

.script-container li {
  margin-bottom: 4px;
}
/* Mock script content styling */
.script-container {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    padding: 20px 22px;
    max-height: 520px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .script-container h2,
  .script-container h3 {
    margin-top: 18px;
    margin-bottom: 8px;
  }
  
  .script-container p {
    margin-bottom: 8px;
  }
  
  .script-container ul {
    margin: 10px 0 10px 20px;
    padding-left: 18px;
  }
  
  .script-container li {
    margin-bottom: 4px;
  }
  