body {
  background: #181818;
  color: #e0e0e0;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
}

header {
  background: #222;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.status-badge {
  background: #424242;
  color: #fff;
  padding: 0.15em 1em;
  border-radius: 16px;
  font-size: 1rem;
  margin-left: 1em;
}

#proBadge {
  background: linear-gradient(90deg,#e3b700,#e65a00);
  color: #222;
  font-weight: bold;
  padding: 0.15em 0.8em;
  border-radius: 14px;
  font-size: 1rem;
  margin-left: 0.6em;
  box-shadow: 0 0 6px #e3b70066;
  cursor: pointer;
  display: none;
}

.pro-upgrade-btn {
  display: none;
  background: #1e88e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  padding: 0.6em 1.2em;
  cursor: pointer;
  margin-left: 2em;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  background: #222;
  border-radius: 18px;
  box-shadow: 0 4px 32px #000a;
}

section {
  margin-bottom: 2.5rem;
}

#videoSection {
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

#motionZoneSnackbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background: #1e88e5;
    color: #fff;
    padding: 14px 24px;
    border-radius: 0 0 12px 12px;
    min-width: 300px;
    max-width: 90vw;
    box-shadow: 0 8px 20px #0003;
    display: none;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1em;
    gap: 12px;
    user-select: none;
    pointer-events: auto;
    opacity: 0.97;
    transition: opacity 0.3s;
  }
  #motionZoneSnackbar button {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 14px;
    font-size: 1em;
    cursor: pointer;
    margin-left: 6px;
  }
  #motionZoneSnackbar button:hover { background: #0d47a1; }

video {
  width: 100%;
  height: auto;
  max-width: 500px;
  display: block;
  margin: 0 auto;
  border: 2px solid #444;
  box-shadow: 0 0 16px #0008;
  border-radius: 8px;
  background: #222;
}

.banner {
  position: absolute;
  left: 10%;
  top: 0;
  width: 80%;
  background: #e3b700;
  color: #222;
  font-weight: bold;
  padding: 8px 0;
  margin: 0 auto; /* margin: 10px auto; is not needed with absolute positioning */
  border-radius: 14px;
  font-size: 1.3em;
  box-shadow: 0 2px 8px #e3b70066;
  display: none;
  text-align: center;
}
#bannerContainer {
  position: relative;
  min-height: 48px; /* Or whatever height fits your design */
  width: 100%;
}
.controls {
  margin-top: 0em;
}

button {
  background: #333;
  color: #eee;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  padding: 0.5em 1.1em;
  margin: 0.3em;
  cursor: pointer;
  transition: background 0.2s;
}
button:disabled {
  background: #555;
  cursor: not-allowed;
}
button:hover:not(:disabled) {
  background: #1e88e5;
  color: #fff;
}

#settingsPanel, #galleryPanel, #logPanel, #proPanel {
  background: #252525;
  border-radius: 14px;
  padding: 1em 1.5em;
  box-shadow: 0 2px 12px #0003;
}

#settingsPanel h2,
#galleryPanel h2,
#logPanel h2,
#proPanel h2 {
  margin-top: 0;
  font-size: 1.2em;
  color: #e3b700;
}

input[type="range"] {
  width: 160px;
  margin-left: 0.5em;
  vertical-align: middle;
}

input[type="checkbox"] {
  transform: scale(1.3);
  margin-left: 1em;
  accent-color: #e3b700;
}

#thresholdValue {
  font-weight: bold;
  color: #e3b700;
  margin-left: 0.7em;
}

#galleryList {
  margin-top: 1em;
  padding-left: 1em;
  list-style: disc;
  color: #ffd700;
}

/* --- Gallery Thumbnail Styles --- */
.sample-thumb {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover;
    border-radius: 6px;
    background: #333;
    margin-bottom: 0.5em;
    border: 2px solid #444;
    display: block;
}
.samples-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}
.sample-card {
    background: #222;
    border-radius: 8px;
    padding: 0.5em;
    min-width: 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.person-card {
    background: #232323;
    border-radius: 12px;
    margin: 1.2em 0;
    padding: 1em 1.5em;
    box-shadow: 0 2px 12px #0003;
}
.person-title {
    margin-bottom: 0.7em;
    font-size: 1.08em;
}
.sample-label {
    font-size: 0.93em;
    color: #aaa;
    margin-top: 0.3em;
}
/* --- End Gallery Thumbnail Styles --- */

.log-area {
  background: #191919;
  border-radius: 10px;
  min-height: 80px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.97em;
  padding: 0.8em;
  margin-top: 0.7em;
  border: 1px solid #292929;
}

footer {
  text-align: center;
  color: #888;
  padding: 2em 0 1em 0;
  font-size: 0.98em;
  letter-spacing: 0.02em;
}

footer a {
  color: #e3b700;
  text-decoration: none;
}

@media (max-width: 700px) {
  main {
    max-width: 99vw;
    padding: 0.2rem;
    border-radius: 0;
    box-shadow: none;
  }
  header {
    flex-direction: column;
    gap: 0.7em;
    padding: 1em;
  }
  section {
    margin-bottom: 1.7rem;
  }
  #videoSection {
    max-width: 100vw;
    padding: 0;
    margin: 0;
  }
  video {
    max-width: 100vw;
    border-radius: 0;
  }
}
