/* Background setup */
:root {
    color-scheme: dark;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  color: #fff;
  background: #000;
}

/* Let content breathe */
#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.5rem;
  gap: 1.5rem;
  box-sizing: border-box;
  background-color: rgba(0,0,0,0.55); /* overlay for readability */
  border-radius: 12px;
  margin: auto;
  max-width: 900px;
}

#rootImpostor {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.5rem;
  box-sizing: border-box;
  background: #ffffff42; /* overlay for readability */
  border-radius: 12px;
  margin: auto;
  max-width: 900px;
}
/* Header */
header {
  font-size: 1.4rem;
  font-weight: bold;
  padding: 1rem;
  border-bottom: 2px solid rgba(255,255,255,0.2);
}

/* Footer */
footer {
  padding: 1rem;
  font-size: 0.9rem;
  border-top: 2px solid rgba(255,255,255,0.2);
}

/* Cards */
.card {
  background: rgba(30,30,30,0.8);
  padding: 1.2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

/* Buttons - rectangle w/ rounded corners + dual tone */
.fancy-btn {
  background: linear-gradient(135deg, var(--btn-main, #3b82f6), var(--btn-accent, #1e40af));
  color: #fff;
  border: none;
  padding: 0.7rem 1.2rem;
  margin: 0.3rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fancy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.35);
}

.fancy-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.5);
}

/* Inputs hidden but label triggers */
input[type="file"] {
  display: none;
}

/* Grid spacing */
main {
  display: grid;
  gap: 1.5rem;
}

/* Scrollable library list */
.scroll-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 300px; /* adjust if too big/small */
  overflow-y: auto;
}

.scroll-list li {
  padding: 0.6rem 1rem;
  margin: 0.2rem 0;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.scroll-list li:hover {
  background: rgba(255,255,255,0.15);
}

/* Floating settings button */
.settings-btn {
  position: absolute;
  top: 17px; /* adjust depending on header height */
  right: 65px;
  padding: 0.6rem 0.8rem;
  border-radius: 15%;
  font-size: 1.2rem;
}

/* Make library list scrollable inside the card */
#library {
  max-height: 60vh; /* only scroll inside card */
  overflow-y: auto;
}

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

.reload-btn {
  border: none;
  background: #2196f3;
  color: white;
  border-radius: 10%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.reload-btn:hover {
  background: #1769aa;
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.pack-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease, transform 0.15s ease;
}

.pack-cell:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.pack-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 0.5rem;
}

.pack-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* resizes/crops the image to fill the cell */
}

.pack-label {
  font-size: 0.85rem;
  text-align: center;
  word-break: break-word;
}

#game {
  position: relative;
  z-index: 10;
}

#gameWrap {
    position: relative; 
    z-index: 1;
}

#rootImpostor h2, 
#rootImpostor h3 {
  margin: 0;
  color: #fff;
}


#bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
}

/* Section layout */
.settings-section {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  backdrop-filter: blur(3px);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Fancy slider styling */
.fancy-slider {
  -webkit-appearance: none;
  width: 150px;
  height: 6px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--btn-main, #3b82f6), var(--btn-accent, #1e40af));
  outline: none;
  transition: opacity 0.2s;
}
.fancy-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

/* Small variant of your fancy button */
.fancy-btn.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

/* Key button look */
.key-btn {
  width: 45px;
  text-align: center;
}

/* Fancy select dropdown */
.fancy-select {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  outline: none;
}
.fancy-select:focus {
  border-color: var(--btn-main, #3b82f6);
}

/* Tiny icons next to section titles */
.icon {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  margin-right: 0.4em;
}

/* Footer alignment */
.settings-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.pack-toolbar {
  margin-bottom: 1rem;
}

.back-btn {
  font: inherit;
  padding: 0.4rem 0.9rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.pack-content {
  /* pack fragments render in here, inheriting your site's styles */
}
