/* General Styles */
:root {
  --brand-blue: #1a73e8;
  --bg: #f4f4f4;
  --card-w: 380px;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
}

/* Dark Mode */
body.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
}

body.dark-mode .contact-section {
  background-color: #1e1e1e;
  box-shadow: 0px 4px 8px rgba(255, 255, 255, 0.1);
}

body.dark-mode .contact-form {
  background-color: #1e1e1e;
}

body.dark-mode .form-group label {
  color: #ddd;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
  background-color: #1e1e1e;
  color: #f0f0f0;
  border: 1px solid #444;
}

body.dark-mode #scrapSourceOther {
  background-color: #1e1e1e;
  color: #f0f0f0;
  border: 1px solid #444;
}

body.dark-mode #scrapSourceOther:focus {
  border-color: #00c853;
  box-shadow: 0 0 5px rgba(0, 200, 83, 0.3);
}

body.dark-mode button[type="submit"] {
  background-color: #008837;
}

body.dark-mode button[type="submit"]:hover,
body.dark-mode button[type="submit"]:focus {
  background-color: #00a843;
}

body.dark-mode #darkModeToggle {
  background-color: #333;
  color: #fff;
}

body.dark-mode .pickup-card {
  background-color: #1e1e1e;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.08);
}

body.dark-mode .pickup-card h2 {
  color: #f0f0f0;
}

body.dark-mode .pickup-card p {
  color: #a0a0a0;
}

body.dark-mode .pickup-card .muted {
  color: #a0a0a0;
}

body.dark-mode .crate {
  background: #2a2a2a;
  border-color: #4a90e2;
}

body.dark-mode .crate svg path {
  stroke: #4a90e2;
  fill: #333;
}

body.dark-mode .badge .scrap-path {
  stroke: #4a90e2;
}

/* Header */
.header {
  background-color: #222;
  color: white;
  padding: 15px;
  text-align: center;
}

.header .logo {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: #00c853;
}

/* Navigation */
.navigation ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.navigation a {
  text-decoration: none;
  color: white;
  font-size: 18px;
}

.navigation a:hover,
.navigation .active {
  border-bottom: 2px solid #00e676;
}

/* Contact Section */
.contact-section {
  max-width: 700px;
  margin: 50px auto;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-section h1 {
  text-align: center;
  color: #008837;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 5px;
  color: black;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00c853;
  box-shadow: 0 0 5px rgba(0, 200, 83, 0.3);
}

.checkbox-group label {
  display: block;
  margin-bottom: 5px;
}

/* Submit Button */
button[type="submit"] {
  background-color: #00c853;
  color: white;
  padding: 12px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover,
button[type="submit"]:focus {
  background-color: #00e676;
}

/* Login Reminder Box */
#loginReminderBox {
  display: none;
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  background-color: #ffe0e0;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#loginReminderBox h3 {
  color: #c00;
  margin-bottom: 10px;
}

#loginReminderBox button {
  background-color: #007bff;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
}

#loginReminderBox button:hover,
#loginReminderBox button:focus {
  background-color: #0056b3;
}

/* Dark Mode Toggle */
#darkModeToggle {
  position: fixed;
  top: 16px;
  right: 16px;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background-color: #f0f0f0;
  font-size: 18px;
  cursor: pointer;
  z-index: 999;
}

/* Pickup Animation */
.pickup-card {
  width: var(--card-w);
  background: white;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  text-align: center;
  position: relative;
  margin: 0 auto;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
  background-color: #ddd;
}

body.dark-mode .close-btn {
  background-color: #444;
  color: #fff;
}

body.dark-mode .close-btn:hover,
body.dark-mode .close-btn:focus {
  background-color: #555;
}

.pickup-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #111827;
}

.pickup-card p {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
}

.scene {
  width: 280px;
  height: 140px;
  margin: 12px auto 16px;
  position: relative;
  overflow: visible;
  display: flex;
  justify-content: center;
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 6px;
  background: linear-gradient(90deg, #e6eefc, #f1f5f9);
  border-radius: 6px;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.03);
}

.truck-wrap {
  position: absolute;
  left: -110px;
  bottom: 18px;
  width: 120px;
  height: 70px;
  transform: translateX(0);
  transition: transform 900ms cubic-bezier(.2, .9, .3, 1);
}

.truck-wrap.arrived {
  transform: translateX(calc(var(--card-w) / 2 - 60px)); /* Center truck in card */
}

svg.truck {
  width: 120px;
  height: 70px;
  display: block;
}

.wheel {
  fill: #0f172a;
  transform-origin: center;
  transition: transform 300ms linear;
}

.wheel.spin {
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.crate {
  position: absolute;
  left: calc(var(--card-w) / 2 - 23px); /* Center crate in card */
  bottom: 36px;
  width: 46px;
  height: 36px;
  background: #f5f5f5;
  border: 2px solid #1a73e8;
  border-radius: 4px;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 280ms ease, opacity 280ms ease;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 50%, #e0e0e0 50%, #e0e0e0 75%, transparent 75%, transparent);
  background-size: 10px 10px;
}

.crate.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.crate svg {
  width: 24px;
  height: 24px;
}

.badge {
  position: absolute;
  left: calc(var(--card-w) / 2 - 28px); /* Center badge in card */
  bottom: 86px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(26, 115, 232, 0.12), rgba(26, 115, 232, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: transform 300ms cubic-bezier(.2, .9, .3, 1), opacity 300ms;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.badge.show {
  opacity: 1;
  transform: scale(1);
}

.scrap-path {
  stroke: var(--brand-blue);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 420ms cubic-bezier(.2, .9, .3, 1);
}

.scrap-path.draw {
  stroke-dashoffset: 0;
}

.muted {
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
}

/* Footer */
.footer {
  background-color: #222;
  color: white;
  padding: 20px;
  text-align: center;
  margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contact-section {
    width: 90%;
    padding: 15px;
  }
  .pickup-card {
    width: 92vw;
    padding: 18px;
  }
  .scene {
    width: 92%;
    height: 120px;
  }
  .truck-wrap.arrived {
    transform: translateX(calc(92% / 2 - 60px));
  }
  .crate {
    left: calc(92% / 2 - 23px);
  }
  .badge {
    left: calc(92% / 2 - 28px);
  }
}
