/* =========================================
   1. GLOBAL RESET & BASE STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000000;
  color: #ffffff;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2 {
  text-align: center;
  color: crimson;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2rem; }

h3 {
  text-align: center;
  color: #ffffff;
  font-size: 1.75rem;
}

p {
  text-align: center;
  color: #ffffff;
  font-size: 1rem;
}

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

img {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* =========================================
   2. NAVIGATION BAR & CONTAINERS
   ========================================= */
.navbar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 5%;
  background-color: rgba(26, 26, 26, 0.95);
  border-bottom: 1px solid crimson;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.logo {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
}

.logo span {
  color: crimson;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: #e0e0e0;
  font-size: 1.05rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: crimson;
}

.Border, .Border2, .Border3 {
  padding: 1.25rem 5%;
  background-color: rgba(26, 26, 26, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.Border {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================================
   3. HOME PAGE & NICHE CARDS
   ========================================= */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

.section-title {
  margin-bottom: 2rem;
  font-size: 2.2rem;
}

.niche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.niche-card,
.Card {
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.niche-card:hover {
  transform: translateY(-5px);
  border-color: crimson;
  box-shadow: 0 10px 25px rgba(220, 20, 60, 0.25);
}

.niche-card p {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.niche-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border: 2px solid #ffffff;
  border-radius: 8px;
}

/* =========================================
   4. SEARCH PAGE & AUTOCOMPLETE
   ========================================= */
.search-header p {
  opacity: 0.8;
  margin-bottom: 2rem;
}

.search-container,
.search-box {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto 2.5rem auto;
}

.search-box input[type="text"],
.search-container input[type="text"] {
  flex: 1;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(26, 26, 26, 0.95);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-box input[type="text"]:focus,
.search-container input[type="text"]:focus {
  border-color: crimson;
}

.search-box button,
button {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  border: none;
  border-radius: 999px;
  background-color: crimson;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.search-box button:hover,
button:hover {
  background-color: #b01030;
  transform: scale(1.03);
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid crimson;
  border-radius: 8px;
  list-style: none;
  margin-top: 6px;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  text-align: left;
}

.autocomplete-list li {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: capitalize;
  transition: background-color 0.2s ease;
}

.autocomplete-list li:last-child {
  border-bottom: none;
}

.autocomplete-list li:hover,
.autocomplete-list li.active {
  background-color: crimson;
  color: #ffffff;
  font-weight: 600;
}

.search-error {
  color: crimson;
  font-size: 0.9rem;
  margin-top: 8px;
  display: none;
}

/* =========================================
   5. DASHBOARD UPLOAD FORM
   ========================================= */
.Card {
  width: 92%;
  max-width: 620px;
  margin: 2.5rem auto;
  padding: 2rem;
}

.Card h2 {
  margin-bottom: 1.5rem;
}

#uploadForm {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Large, Styled Text Boxes matching the Dropzone */
.field input[type="text"] {
  width: 100%;
  padding: 1.1rem 1.25rem;
  font-family: inherit;
  font-size: 1.1rem;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.field input[type="text"]::placeholder {
  color: #777777;
}

.field input[type="text"]:hover,
.field input[type="text"]:focus {
  border-color: crimson;
  background-color: rgba(220, 20, 60, 0.08);
  box-shadow: 0 0 15px rgba(220, 20, 60, 0.15);
}

/* Custom File Input Dropzone */
#fileInput {
  width: 100%;
  padding: 2rem 1.25rem;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.04);
  color: #e0e0e0;
  font-family: inherit;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

#fileInput:hover,
#fileInput:focus {
  border-color: crimson;
  background-color: rgba(220, 20, 60, 0.08);
  box-shadow: 0 0 15px rgba(220, 20, 60, 0.15);
  outline: none;
}

#fileInput::file-selector-button {
  background-color: crimson;
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.2rem;
  margin-right: 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#fileInput::file-selector-button:hover {
  background-color: #b01030;
}

/* Selected File Pill */
.selection {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
}

.selection-size,
.selection-cost {
  color: #aaaaaa;
  font-size: 0.85rem;
}

.link-button {
  margin-left: auto;
  background: none;
  border: none;
  color: crimson;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.link-button:hover {
  background-color: rgba(220, 20, 60, 0.15);
  transform: none;
  text-decoration: underline;
}

/* Action Buttons */
.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button-row button {
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
}

#submitBtn,
#resumeBtn {
  flex: 1;
}

#submitBtn:disabled {
  background-color: #444444;
  cursor: not-allowed;
  transform: none;
}

.button-row button.secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.button-row button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

/* Progress Bar */
.progress-container {
  width: 100%;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, crimson, #ff4d6d);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.progress-text {
  margin-top: -0.75rem;
  font-size: 0.85rem;
  color: #aaaaaa;
  text-align: right;
}

/* Keep HTML 'hidden' attribute working with flex */
.selection[hidden],
.button-row button[hidden],
.progress-container[hidden],
.progress-text[hidden] {
  display: none;
}
