body {
    overflow-x: hidden;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background:  url('https://www.transparenttextures.com/patterns/stardust.png') repeat, #0d0d1a;
  color: #eee;
}

.page5-title {
   margin-left: 2rem;
  font-family: 'Cinzel', serif;
  font-size: 2.4rem;
  color: gold;
  margin-top: 15px;
  margin-bottom: 0.5rem;
  text-shadow: 0px 0px 15px gold;
    transition: margin-left 0.4s ease;
}

/* === Sidebar Styles === */
#sidebar-tab {
  position: fixed;
  top: 1rem;
  left: 0;
  width: 40px;
  height: 40px;
  background: gold;
  color: black;
  font-size: 1.5rem;
  text-align: center;
  line-height: 40px;
  cursor: pointer;
  z-index: 1000;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  box-shadow: 2px 2px 5px #000;
}

#sidebar-panel {
  display:flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  border-right: 2px solid gold;
  color: gold;
  font-family: 'Cinzel', serif;
  padding: 1rem;
  z-index: 999;
  transition: transform 0.3s ease;
   overflow: visible !important;
}

#sidebar-panel.hidden {
  transform: translateX(-100%);
}

#sidebar-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar-panel li {
  margin: 1rem 0;
  cursor: pointer;
  font-size: 1.1rem;
}

#main-sheet-container {
  transition: margin-left 0.3s ease;
}

/* Optional: hide chat area by default */
#chat-area.hidden {
  display: none;
}


.logo-container {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: -0.5rem;
}

.logo-container img {
  max-width: 300px;
  height: auto;
  filter: drop-shadow(0 0 8px rgb(255, 255, 255));
  animation: float 4s ease-in-out infinite;
}

/* Optional animation for magical floating */
@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

header {
  background: #b8a156;
  padding: 1rem;
  text-align: center;
}

.magic-box {
  border: 2px solid #f2c94c;
  padding: 1rem;
  margin-top: 2rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  box-shadow: 0 0 15px #f2c94c;
  text-align:center;
}

.role-sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem auto;
  max-width: 1200px;
}

.role-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: pulseGlow 2s ease-in-out infinite;
  text-shadow: 0 0 8px gold;
}

@keyframes pulseGlow {
  0%   { transform: scale(1); text-shadow: 0 0 6px gold; }
  50%  { transform: scale(1.1); text-shadow: 0 0 15px gold; }
  100% { transform: scale(1); text-shadow: 0 0 6px gold; }
}

.dm-section, .player-section {
  background-color: #111;
  border: 1px solid gold;
  border-radius: 10px;
  box-shadow: 0 0 12px gold;
  padding: 2rem;
  width: 500px;
  color: white;
  text-align: center;
  font-family: 'Cinzel', serif;
}

.dm-section h2,
.player-section h2 {
  color: gold;
  margin-bottom: 1rem;
}

.dm-section .option-card,
.player-section .option-card {
  margin: 1.5rem 0;
}

.campaign-options {
  margin: 2rem auto;
  max-width: 600px;
  background-color: #111;
  border: 1px solid gold;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 0 10px gold;
  color: white;
  text-align: center;
  font-family: 'Cinzel', serif;
}

.campaign-options h2 {
  color: gold;
  margin-bottom: 1.5rem;
}

.option-card {
  margin: 1.5rem 0;
}

.option-card input {
  padding: 0.5rem;
  margin: 0.5rem;
  width: 60%;
  max-width: 300px;
  border-radius: 5px;
  border: 1px solid #555;
}

.option-card button {
  padding: 0.5rem 1rem;
  background-color: gold;
  color: black;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.option-card button:hover {
  background-color: #ffd700;
}

.future-options {
  font-size: 0.9rem;
  color: #ccc;
  font-style: italic;
}

nav a {
  color: #ccc;
  margin: 0 1rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  border-radius: 5px;
}

nav a:hover {
  color: #fff;
  border-color: #f2c94c;
  box-shadow: 0 0 10px #f2c94c;
  background-color: rgba(255, 255, 255, 0.1);
}


nav a.active {
  color: white;
  font-weight: bold;
  border-bottom: 2px solid white;
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
  color: #f2c94c; /* Gold vibes */
  text-shadow: 2px 2px 4px #000;
}

main {
  padding: 2rem;
  animation: fadeIn .5s ease-in-out;
  text-align: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

footer {
  background: #b8a156;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.dropdown {
  margin-top: 1rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid gold;
  border-radius: 8px;
  text-align: center;
  color: white;
}

textarea {
  width: 100%;
  min-height: 100px;
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-family: inherit;
}

.race-buttons button {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: #333;
  color: #f2c94c; /* Gold-yellow text to stand out */
  font-size: 1rem;
  font-weight: bold;
  border: 2px solid #f2c94c;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}


.race-buttons button:hover {
  transform: scale(1.05);
  background-color: #222;
  color: #fff;
}

.race-buttons button.selected {
  background-color: #f2c84c73;
  color: #000;
  box-shadow: 0 0 10px #f2c94c;
}

.race-button-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  height: 80px; /* 👈 Add a fixed height to contain both icons */
  justify-content: center;
}

.race-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
  pointer-events: none;
  user-select: none;
}

.race-icon.base {
  opacity: 1;
  z-index: 1;
}

.race-icon.hover {
  opacity: 0;
  z-index: 2;
}

.race-button-content:hover .race-icon.base {
  opacity: 0;
}

.race-button-content:hover .race-icon.hover {
  opacity: 1;
}

.race-button-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.race-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s ease;
  border-radius: 6px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.race-icon.base {
  opacity: 1;
  z-index: 1;
}

.race-icon.hover {
  opacity: 0;
  z-index: 2;
}

.race-button-content:hover .race-icon.base {
  opacity: 0;
}

.race-button-content:hover .race-icon.hover {
  opacity: 1;
}

.race-button-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding-top: 0.25rem;
}

.race-image-stack {
  position: relative;
  width: 60px;
  height: 60px;
}

.race-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
  pointer-events: none;
  user-select: none;
}

.race-icon.base {
  opacity: 1;
  z-index: 1;
}

.race-icon.hover {
  opacity: 0;
  z-index: 2;
}

.race-button-content:hover .race-icon.base {
  opacity: 0;
}

.race-button-content:hover .race-icon.hover {
  opacity: 1;
}

.race-name {
  font-weight: bold;
  font-size: 1rem;
  color: #f2c94c;
  text-align: center;
}

.slideshow-frame {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.frame-female.hidden,
.frame-male.hidden {
  opacity: 0;
}

.frame-female:not(.hidden),
.frame-male:not(.hidden) {
  opacity: 1;
}

/* Custom Race Form Styling */
#page-4 input[type="text"],
#page-4 textarea {
  width: 100%;
  max-width: 600px;
  margin: 0.5rem auto;
  display: block;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid gold;
  border-radius: 6px;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

#page-4 input[type="text"]:focus,
#page-4 textarea:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

#page-4 button {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: gold;
  border: none;
  border-radius: 6px;
  color: black;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s ease;
}

#page-4 button:hover {
  background-color: #ffd700;
}

#custom-race-creator {
  text-align: center;
  padding: 2rem;
}

#page-4 button {
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: gold;
  border: none;
  border-radius: 6px;
  color: black;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#page-4 button.back-button {
  background-color: transparent;
  border: 1px solid gold;
  color: gold;
}

#page-4 button.back-button:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

#page-5 {
  padding: 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sheet-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sheet-row label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  color: gold;
  min-width: 150px;
}

.sheet-row input {
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid gold;
  border-radius: 5px;
  color: white;
  font-family: inherit;
  text-align: center;
}

.stats-grid {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  justify-items: center; /* Ensures centering inside each grid cell */
  align-items: start;
}

@media (max-width: 800px) {
  .stats-grid {
    grid-template-columns: 1fr;  /* Stack on mobile */
  }
}

@media (max-width: 800px) {
  .saving-throws-grid {
    flex-direction: column;
    align-items: center;
  }
}

.stat-block {
  display: flex;
   flex: 1 1 300px;
  flex-direction: column;
  gap: 0.5rem;
    width: 100%;
  max-width: 340px;
  min-width: 280px;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border: 1px solid gold;
  border-radius: 6px;
  color: white;
  margin-bottom: 0rem; /* Adds space below each block */
}

.stat-block h4 {
  text-align: center;
  color: gold;
  font-size: 1.3rem;
  margin-bottom: -2rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
}

.stat-block p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: gold;
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

.stat-block ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.stat-block li {
  margin-bottom: 0.25rem;
}

.stat-block input {
  width: 100px;
  padding: 0.4rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid gold;
  border-radius: 4px;
  color: white;
  font-family: inherit;
  text-align: center;
}

.main-stats-row {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  gap: 1rem;
  justify-content: center; /* You can change to space-evenly or start */
  align-items: center;
  flex-wrap: column;  /* Allows responsive behavior */
  margin: 2rem auto;
  width: 100%;
  max-width: 1600px;
}

.main-stats-row h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: bold;
  color: gold;
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.7), 0 0 12px rgba(255, 215, 0, 0.5);
  border-top: 2px solid gold;
  border-bottom: 2px solid gold;
  display: inline-block;
  padding: 0.3rem 1rem;
  margin: 0 auto 2rem auto;
}

.main-stats-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
  margin-top: -2rem;
  margin-bottom: 2rem;
}

.substat-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
 justify-content: flex-start;
  align-items: center;
}

.substat-row label {
  color: white;
  flex-shrink: 0;
width: 110px;  /* Or whatever fits your longest label */
  font-weight: bold;
  text-align: right;
  padding-right: 0.5rem;
  white-space: nowrap;
}

.substat-score {
  width: 130px;         /* Consistent width */
  padding: 0.3rem;
  text-align: center;
  border: 1px solid gold;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 4px;
  font-family: inherit;
}


.substat-name {
  flex-grow: 1;
  padding: 0.3rem;
  border: 1px solid gold;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 4px;
  font-family: inherit;
}

.saving-throws-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 1000px;
   margin-left: auto;
  margin-right: auto;
}


.saving-throw-block {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid gold;
  border-radius: 6px;
  padding: 1rem;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.saving-throw-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.saving-throw-row label {
  color: white;
  flex-shrink: 0;
  width: 100px;
  font-weight: bold;
  text-align: right;
}

.saving-throw-row input.substat-score,
.saving-throw-row input.mod-small {
    width: 3rem;
  text-align: center;
  padding: 0.3rem;
  border: 1px solid gold;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 4px;
  font-family: inherit;
}

input.mod-small {
  width: 3rem;
  text-align: center;
  padding: 0.3rem;
  border: 1px solid gold;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 4px;
  font-family: inherit;
}

.derp-section {
  width: 100%;
  max-width: 800px;
  border: 1px solid gold;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 2rem;
  color: white;
  position: relative;
}

.derp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid gold;
  margin-bottom: 1rem;
}

.derp-header h3 {
  margin-top: 0;
  margin: 0;
  color: gold;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
}

.edit-derps-btn {
  background: none;
  border: none;
  color: gold;
  font-size: 1.2rem;
  cursor: pointer;
}

.edit-derps-btn:hover {
  color: white;
}

.derp-display-box,
.fear-display-box {
  min-height: 200px;
  max-height: 500px;
  height: 100%;
  padding: 1rem;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.02);
  overflow-y: auto;
}

.derp-placeholder {
  text-align: center;
  color: #ccc;
  font-style: italic;
  margin-top: 3rem;
}

.derp-list {
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.derp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1rem 1.5rem;
  border: 1px solid gold;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  color: white;
}

.derp-row span {
  flex: 1;
  text-align: center;
  font-size: 1.2rem;
}

.derp-row button {
  background: none;
  border: none;
  color: gold;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 0.5rem;
}

.derp-row button:hover {
  color: white;
}

.add-derp-btn {
  border: 2px dashed gold;
  padding: 1rem;
  font-size: 1.1rem;
  color: gold;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  transition: background-color 0.2s ease;
}

.add-derp-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Derp/Fear Editor Layout */
#derp-editor-popup .popup-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#derp-editor-popup input[type="text"],
#derp-editor-popup select,
#derp-editor-popup textarea {
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  background-color: #111;
  color: gold;
  border: 1px solid gold;
  border-radius: 4px;
  font-family: inherit;
  box-shadow: inset 0 0 3px gold;
}

#derp-editor-popup textarea {
  resize: vertical;
}

#derp-editor-popup .derp-stats .derp-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

#derp-editor-popup .popup-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

#derp-editor-popup .popup-actions button {
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  background-color: black;
  color: gold;
  border: 1px solid gold;
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 0 6px gold;
  transition: 0.2s ease;
}

#derp-editor-popup .popup-actions button:hover {
  background-color: gold;
  color: black;
  box-shadow: 0 0 10px gold, 0 0 20px gold;
}

#derp-editor-popup .popup-actions #close-derp-editor {
  background-color: #222;
  color: #ccc;
  border-color: #ccc;
  box-shadow: 0 0 4px #888;
}

#derp-editor-popup .popup-actions #close-derp-editor:hover {
  background-color: #444;
  color: white;
  box-shadow: 0 0 6px white, 0 0 10px #aaa;
}

#derp-editor-popup button {
  background-color: #111;
  color: gold;
  border: 1px solid gold;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-family: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

#derp-editor-popup button:hover {
  background-color: gold;
  color: black;
}

#derpName {
  width: 100%;
}

#derp-editor-popup #derpTier {
  width: auto !important;
  min-width: 150px;
  max-width: 150px;
}
.tier-stat-row {
  display: flex;
  flex: 1;
  gap: 1.5rem;
  align-items: flex-end;
}

.tier-stat-row .field-block {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tier-stat-row .field-block label {
  display: block;
  margin-bottom: 0.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
}

.field-block label {
  font-weight: bold;
  font-size: 0.95rem;
  color: gold;
  margin-bottom: 0.25rem;
}


/* --- Backdrop overlay --- */
#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#popup-overlay.hidden {
  display: none;
}


/* --- Popup container --- */
.popup {
  position: fixed; /* 🧠 now anchors to the screen, not inside scroll */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  background-color: rgba(0, 0, 0, 0.95);
  border: 2px solid gold;
  border-radius: 10px;
  padding: 2rem;
  width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  color: white;
  box-shadow: 0 0 20px gold;
}

/* Optional inner layout styling */
.popup-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
    align-items: stretch;
}


.stat-display-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid gold;
  padding: 1rem;
  margin-top: 0.5rem;
  border-radius: 8px;
  max-height: 150px;
  overflow-y: auto;
}

.derp-row span {
  flex: 1;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-block label {
  margin-left: 0.25rem;
}

.field-block input[type="text"] {
  width: 100%;
}

.stat-select-group {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  align-self: stretch;
  width: 100%;
}

.stat-select-group button {
  padding: 0.4rem 0.75rem;
  height: 2.2rem;
}

.stat-select-group select {
  flex: 1 1 auto;
  min-width: 0;
}

/* === FEARS SECTION === */
.fear-section {
  width: 100%;
  max-width: 800px;
  border: 1px solid gold;
  background-color: rgba(255, 0, 0, 0.00);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 2rem;
  color: white;
  position: relative;
}

.fear-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid gold;
  margin-bottom: 1rem;
}

.fear-header h3 {
  margin-top: 0;
  margin: 0;
  color: gold;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
}

.fear-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.fear-placeholder {
  text-align: center;
  color: #ccc;
  font-style: italic;
  margin-top: 3rem;
}

.fear-list {
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fear-row {
  display: flex;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1rem 1.5rem;
  border: 1px solid gold;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  color: white;
  margin-bottom: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.fear-row span {
  flex: 1;
  text-align: center;
  font-size: 1.2rem;
}

.fear-row button {
  background: none;
  border: none;
  color: gold;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 0.5rem;
}

.fear-row button:hover {
  color: white;
}

.fear-title {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.fear-trigger {
  margin-top: 0.5rem;
  font-style: italic;
  font-size: 1rem;
  text-align: center;
  padding: 0 1rem;
  line-height: 1.4;
}

.fear-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-fear-btn {
  border: 2px dashed gold;
  padding: 1rem;
  font-size: 1.1rem;
  color: gold;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  transition: background-color 0.2s ease;
}

.add-fear-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.fear-active-toggle {
  margin-left: 1rem;
  transform: scale(1.4);
  cursor: pointer;
}

body.bg-default {
  background-color: #0b0b14;
  background-image: url('./sheetbackground-images/bg-stars.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body.bg-grunge {
  background: url('./sheetbackground-images/bg-grunge.jpg') no-repeat center center fixed;
  background-size: cover;
}

body.bg-starryclouds {
  background: url('./sheetbackground-images/bg-starryclouds.jpg') no-repeat center center fixed;
  background-size: cover;
}

body.bg-blueprint {
  background: url('./sheetbackground-images/bg-blueprint.jpg') no-repeat center center fixed;
  background-size: cover;
}

body.bg-paper {
  background: url('./sheetbackground-images/bg-paper.jpg') no-repeat center center fixed;
  background-size: cover;
}

body.bg-void {
  background: #000000;
}

input,
textarea,
select {
  background-color: rgba(0, 0, 0, 0.4); /* Dark semi-transparent */
  color: white;
  border: 1px solid gold;
  padding: 5px;
  border-radius: 5px;
}

input:not(.race-icon):not(.edit):not(.delete),
textarea,
select {
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: 1px solid gold;
  padding: 6px;
  border-radius: 5px;
  font-family: inherit;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.character-image-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: gold;
  font-family: 'Cinzel', serif;
}

#character-frame {
   top: 0;
  left: 0;
  transform: translateY(0); /* prevents mid-centering weirdness */
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

.character-image-section h3 {
  margin-bottom: 1rem;
}

#character-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  margin-bottom: 0px;
}

#image-preview {
  margin-top: 1rem;
  max-width: 300px;
  max-height: 300px;
  overflow: hidden;
  border: 2px solid gold;
  border-radius: 8px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

#image-preview img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.remove-image-btn {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: crimson;
  border: none;
  color: white;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s ease;
}

.remove-image-btn:hover {
  background-color: darkred;
}

#image-preview img {
  max-width: 240px;
  max-height: 280px;
  object-fit: contain;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: block;
  margin: 0 auto;
}

#portrait-container {
  width: 100%;
  height: 100%;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  border-radius: 50%;
}

.portrait-button-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}


#portrait-wrapper {
  width: 240px;
  height: 280px;
  position: relative;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  padding-bottom: 1px;
  margin: 0 auto;
}

#portrait-container img.frame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: contain;
  z-index: 2;
}

#portrait-container.clickable-upload:hover #upload-hint {
  display: block;
}

#portrait-container input[type="file"] {
  display: none;
}

#upload-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(20, 20, 20, 0.8);
  color: white;
  padding: 2px 8px;
  font-size: 0.8rem;
  border-radius: 4px;
  pointer-events: none;
  z-index: 3;
}

#upload-placeholder {
  position: absolute;
  font-size: 4rem;
  color: #ffffff90;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  display: none;
}

#portrait-container.no-image #upload-placeholder {
  display: block;
}

#portrait-container.no-image img.portrait-preview {
  display: none;
}

/* === Portrait Container Behavior === */
#portrait-container.clickable-upload {
  position: relative;
  cursor: pointer;
}

#portrait-container img.portrait-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 1;
}

#upload-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(20, 20, 20, 0.8);
  color: white;
  padding: 2px 8px;
  font-size: 0.8rem;
  border-radius: 4px;
  pointer-events: none;
  z-index: 3;
  display: none;
}

#portrait-container:hover #upload-hint {
  display: block;
}



/* Frame Styles */

.frame-controls {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.frame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.frame-style-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Cinzel', serif;
  color: gold;
  font-size: 0.8rem;
}

.frame-style-row select {
    width: 110px;
  margin-top: 0.3rem;
  background-color: black;
  color: gold;
  border: 2px solid gold;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-family: 'Cinzel', serif;
}

.fear-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.25rem;
}

.trigger-line {
  font-size: 0.95rem;
  color: #ccc;
  font-style: italic;
}

#health-container {
  position: relative;
   display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  text-align: center;
  color: white;
  font-family: 'Cinzel', serif;
  outline: black
}

#health-bar-outer {
  width: 240px;
   margin-left: 0;           /* align left */
  margin-right: auto;       /* prevent centering */
  height: 25px;
  background-color: darkred;
  border: 2px solid black;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  z-index: 3; /* higher so it fully sits above gold bars */
}


#health-bar-inner {
  height: 100%;
  background-color: limegreen;
  width: 100%;
  transition: width 0.3s ease;
  position: relative;
  z-index: 3; /* keep on top for heal/shake animations */
}

#health-bar-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  position: relative;
  margin: 0 auto 0.5rem auto;
  background-color: rgba(255, 215, 0, 0.05); /* subtle glow behind all */
  padding: 2px;
  border-radius: 10px;
}

#health-container input[type="number"] {
  width: 50px;
    margin: 0 0.2rem;
    margin-right: 0.2rem;     /* breathing room */
    padding: 0.25rem;
  text-align: center;
  border: 1px solid gold;
  border-radius: 4px;
  background-color: rgba(0,0,0,0.6);
  color: white;
}

@keyframes shake {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-4px, 2px); }
  50%  { transform: translate(4px, -2px); }
  75%  { transform: translate(-2px, 4px); }
  100% { transform: translate(0, 0); }
}

.shake {
  animation: shake 0.3s ease-in-out;
}

@keyframes healPulse {
  0%   { box-shadow: 0 0 0px 0px lime; }
  50%  { box-shadow: 0 0 20px 10px lime; }
  100% { box-shadow: 0 0 0px 0px lime; }
}

.heal {
  animation: healPulse 0.6s ease-in-out;
}

#overheal-overlay {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  pointer-events: none;
  z-index: 4; /* above green bar, below sparkles */
  opacity: 0.9;
  transition: width 0.3s ease, background 0.4s ease;
  border-radius: 6px;
}

/* Yellow phase */
.overheal-yellow {
  background-color: gold;
}

/* Invincible Rainbow Mode 🌈 */
.overheal-rainbow {
  background: linear-gradient(270deg, red, orange, yellow, green, cyan, blue, violet, red);
  background-size: 800% 100%;
  animation: rainbowFlow 3s linear infinite;
  box-shadow: 0 0 12px 4px white;
}

/* The scrolling animation */
@keyframes rainbowFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Sparkle Particle Animation */
@keyframes sparkleRise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-30px) scale(0.5);
    opacity: 0;
  }
}

.sparkle-wun1e7 {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: #ffe786;
  border-radius: 50%;
  box-shadow: 0 0 5px #fffacd, 0 0 10px #ffffe0;
  animation: sparkleRise 0.8s ease-out forwards;
  z-index: 10;
  pointer-events: none;
}

.hp-adjust-wrap {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.hp-btn {
  background-color: rgba(255, 215, 0, 0.15);
  border: 1px solid gold;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hp-btn:hover {
  background-color: gold;
  color: black;
}

#death-save-box {
  position: absolute;
  width: 200px;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid gold;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.95);
  color: white;
  z-index: 999;
  font-family: 'Cinzel', serif;
  text-align: center;
  box-shadow: 0 0 10px gold;
  pointer-events: auto;
}

#death-save-box.hidden {
  display: none;
}

.death-track {
  margin: 0.2rem 0;
}

.death-checks {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.1rem;
}

.death-check {
  width: 16px;
  height: 16px;
  border: 2px solid gold;
  background-color: black;
  appearance: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  font-size: 13px;
  font-weight: bold;
  box-sizing: border-box; /* prevents border from distorting sizing */
  line-height: 1;
}

.death-check:hover {
  transform: scale(1.15);
}

.death-check:checked {
  box-shadow: 0 0 4px gold;
  background-color: rgba(255, 215, 0, 0.15);
}

#death-successes .death-check:checked::before {
  content: "✓";
  color: lime;
}

#death-failures .death-check:checked::before {
  content: "✕";
  color: crimson;
}

.death-check:disabled {
  opacity: 0.3;
  cursor: default;
}

#death-save-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

#death-save-label {
  font-weight: bold;
  color: white;
}

#death-roll-btn {
  font-family: 'Cinzel', serif;
  background-color: black;
  color: gold;
  border: 2px solid gold;
  border-radius: 10px;
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#death-roll-btn:hover {
  background-color: gold;
  color: black;
  transform: scale(1.05);
}


.cs-container {
  width: 100%;
  max-width: 1470px; /* Or whatever your Main Stats row width currently is + 50px */
  display: flex;
  flex-direction: column;
  gap: 2rem;
  border: 3px solid gold;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 0 12px gold;
  background: black;
}

.cs-container,
#page5-title {
  transition: margin-left 0.4s ease;
}


.cs-row,
.cs-header-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center; /* ✅ Makes portrait centered */
  gap: 1rem;
  margin-bottom: 1.5rem;
   align-items: flex-start;
}

.cs-row {
   text-align: center;
  margin-top: 2rem;
  align-items: center; /* ✅ Centers content vertically */
  width: 100%;         /* ✅ Ensures it takes full width */
}

.cs-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cs-box h3,
.cs-box label {
  margin: 0;
}

.cs-box label {
  font-weight: bold;
  color: gold;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.cs-box input {
   height: auto;
  min-height: 30px;
  width: 100%;
  padding: 0.4rem;
  border-radius: 5px;
  border: 1px solid gold;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  font-family: inherit;
    font-size: 0.9rem;
}

.cs-header-row {
  display: flex;
  flex-wrap: wrap;        /* ✅ Already good */
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
  width: 100%;            /* ✅ Makes it respect parent width */
  box-sizing: border-box; /* 🔒 Prevents overflow from padding */
}


.cs-box {
  border: 1px solid gold;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.cs-box.cs-pfp {
  width: 100%;
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin: 0 auto;
  position: relative;
}

.cs-box.cs-pfp h3 {
  margin-bottom: 0.5rem;
  color: gold;
}

.cs-box.small {
  flex: 0.3;
}

.center-label {
  justify-content: center;
  text-align: center;
}

.center-label h3,
.center-label h4 {
  margin: 0;
  color: gold;
  font-size: 1.1rem;
}

.cs-box input {
  margin-bottom: 0.3rem;
}

.cs-box label {
  line-height: 1;
}

.center-label h3, .center-label h4 {
  border-top: 2px solid gold;
  border-bottom: 2px solid gold;
  padding: 0.25rem 0;
  margin-top: 1rem;
}

.cs-box.cs-class input,
.cs-box.cs-race input {
   height: 30px;
  min-height: 30px;
  max-height: 30px;
  width: 100%;
  box-sizing: border-box; /* ✅ prevents overflow */
}

.cs-box.cs-class,
.cs-box.cs-race {
  padding: 0.5rem;
  height: auto;
  min-height: 85px; /* Ensures they're still visually consistent */
  max-height: 85px; /* This caps it */
}


.cs-class,
.cs-race {
  flex: 0 0 220px; /* fixed width for both */
}

.cs-hp {
  flex: 0 0 220px;
}

.cs-box-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
  min-width: 220px;
   padding: 0;
  margin: 0;
}

.cs-top-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  width: 100%;
   align-items: flex-start;
   flex-direction:row;
}    



.cs-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 0;
  min-width: 220px;
}

.cs-left-column,
.cs-middle-column,
.cs-right-column {
  flex: 1;
}

.cs-middle-column {
  display: flex;
   width: calc(15rem * 2 + 1.2rem); /* = 31.2rem or about 499px */
  max-width: 32rem;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: flex-start; /* 👈 aligns the top edge */
  padding-top: 0.2rem;         /* optional small nudge */
   align-items: center;
    height: 280px;
  box-sizing: border-box;
  padding: 0 !important; 
    margin-top: 4px;
}

.cs-name-level {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 0.5rem;
  width: 220px; /* match portrait width */
  margin-top: 2.4rem;
  padding: 0.5rem;
  box-sizing: border-box;
}

.cs-name-level input {
  flex: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.cs-info-grid {
  display: grid;
  height: 280px; /* Full height for the grid */
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: -.2rem;
}

.cs-info-grid .cs-box {
  width: 15rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid gold;
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 85px; /* Equal height! */
  box-sizing: border-box;
}

.cs-box.cs-hp {
   align-items: flex-start; /* Aligns everything left inside HP box */
   padding: 0.75rem;        /* give it internal space */
  box-sizing: border-box;
  width: 270px;
  max-width: 270px;
  min-height: 170px;
  max-height: 170px;
  margin-top: -0.2rem;
}


/* Ensure left column layout is locked */
.cs-left-column {
  width: 28%;
  display: flex;
  flex-direction: column;
   align-items: center;
  height: 100%;
  gap: 1rem;
  max-width: 270px;
}

/* Force the right column boxes to match portrait height evenly */
.cs-right-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* even spacing! */
  gap: 1rem;
}

.cs-box.cs-pfp {
  height: 280px;
  max-height: 280px;
  flex: 0 0 280px;
}

/* Name + Level bar */
.cs-box.cs-name-level {
  margin-top: -.2rem;
  width: 270px;
  display: flex;
  flex: 1;
  gap: 0.5rem;
  padding: 0.5rem;
  box-sizing: border-box;
}

.cs-box.cs-name-level .field-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
}

.cs-name-level .field-group.level {
  flex: 0 0 3.5ch; /* just wide enough for 3 digits */
}

/* Set specific width for level input group */
.cs-box.cs-name-level .field-group:first-child {
  flex: 0 0 3.5ch; /* ~3 characters + breathing room */
}

/* Optional: make sure inputs are full width within their group */
.cs-box.cs-name-level input {
  width: 100%;
}

.cs-left-column,
.cs-right-column {
  justify-content: space-between;
}

#hp-inputs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

#hp-inputs input {
  width: 60px;
  text-align: center;
}

#hp-inputs span {
  color: white;
  font-family: 'Cinzel', serif;
}

#portrait-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background-color: black;
  border: 2px solid gold;
  border-radius: 0.5rem;
  padding: 0.6rem;
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#portrait-actions button {
  background: black;
  color: gold;
  border: 1px solid gold;
  padding: 0.2rem 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  cursor: pointer;
}

#portrait-actions.hidden {
  display: none;
}

.utility-stats-row {
  display: flex;
  justify-content: center; /* or use center if you want it tighter */
  gap: 0rem;
  margin-bottom: 0rem;
  flex-wrap: wrap;
}

.utility-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Keeps label at top */
  width: 90px;                /* Slightly narrower */
  height: 55px;                /* Controls vertical footprint */
  color: gold;
  font-family: 'Cinzel', serif;
  gap: 0.2rem;
}

.utility-stat.wide {
  flex: 1 1 0;
}

.utility-stat:not(.wide) {
  flex: 0 0 auto;
  min-width: 60px; /* or whatever feels balanced */
}



.utility-stat label {
  margin-bottom: 0.1rem;
  font-size: 0.75rem;
  line-height: 1;
  text-align: center;
}

.utility-stat input[type="number"] {
  width: 55px;
  height: 32px;
  font-size: 0.9rem;
  text-align: center;
  color: white;
  background: transparent;
  border: 2px solid yellow;
  border-radius: 6px;
  box-shadow: 0 0 8px yellow;
  font-family: 'Cinzel', serif;
  outline: none;
}

.utility-stats-wrapper {
  margin-top: -0.2rem;
  width: 100%; /* stays inside the column now */
  display: flex;
  justify-content: center;

  border: 2px solid gold;
  border-radius: 12px;
  padding: 1rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.6);
}

.stat-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem;
}


/* Remove number arrows (reuse from earlier if needed) */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}


.combat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%; /* Make it stretch full width */
   margin-bottom: 1rem;
}

.combat-header h3 {
  font-size: 1.2rem;
  color: gold;
  font-family: 'Cinzel', serif;
  text-shadow: 0 0 6px gold;
  white-space: nowrap;
}

.combat-header .line {
  flex-grow: 1;
  height: 2px;
  background-color: gold;
  box-shadow: 0 0 8px gold;
}

.combat-stat {
  position: relative;
  width: 100px;
  height: 140px;
  border: 2px solid yellow;
  border-radius: 12px;
  padding-top: 10px;
  text-align: center;
  font-family: 'Cinzel', serif;
}

.combat-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 1.5rem 2rem; /* row gap, then column gap */
  padding: 0 0.5rem;
  justify-items: center;
  margin-top: -1rem; /* Adjust to align with main stats */
}

.stat-box {
  position: relative;
  width: 100%;
  height: 107px; /* Container for the button + modifier */
}

.stat-score-input {
  position: absolute;
  top: 25px; /* or wherever you want the input to show */
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 80px;
  font-size: 2rem;
  text-align: center;
  z-index: 2;
}


.stat-label {
  font-size: 0.85rem;
  margin-bottom: 5px;
  color: gold;
   text-transform: uppercase;
}

.stat-mod-circle {
  position: absolute;
  bottom: 0px; /* Adjust for overlap */
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: black;
  color: #ffeb3b;
  border: 2px solid yellow;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  z-index: 2;
}


.stat-mod-input {
  width: 40px;       /* was 30px */
  height: 40px;      /* was 30px */
  font-size: 1.2rem; /* bump it up for legibility */
  font-weight: bold;
  text-align: center;
  color: white;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Cinzel', serif;
}


.stat-score-input:hover,
.stat-mod-input:hover {
  background-color: rgba(255, 255, 0, 0.1);
}

.grid-3x2 {
  margin-top: -1.7rem;
  height: 151px;
  width: 497px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.2rem;
  padding: 1rem;
  justify-items: center;
  align-items: center;
}

.cs-input {
  flex: 1;
  min-width: 0;
  padding: 0.3rem;
  border: 2px solid gold;
  background-color: black;
  color: gold;
  font-family: 'Cinzel', serif;
  border-radius: 4px;
}

.simple-box {
  margin-top: -1.5rem;
   margin-bottom: 0.75rem; /* add this */
  padding: 0.4rem 1rem; /* reduce vertical padding */
  border: 2px solid gold;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  color: gold;
  width: 100%;
  box-sizing: border-box;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem 1.2rem;
  padding: 0.5rem;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.status-item label {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: gold;
}

.status-item input {
  background-color: black;
  color: white;
  border: 2px solid gold;
  border-radius: 5px;
  padding: 0.4rem;
  font-size: 0.9rem;
  width: 100%; /* default full width */
}

#hunger,
#exhaustion {
  width: 60px;
  margin-left: auto;
  margin-right: auto;
}

label[for="hunger"],
label[for="exhaustion"] {
  text-align: center;
  display: block;
}


.quick-action-console {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.cs-box.quick-action-container {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: stretch;
}

.cs-section-title {
  font-family: 'Cinzel', serif;
  color: gold;
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.qac-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.6rem;
  grid-template-areas:
    "left-top middle right-top"
    "left-bottom middle right-bottom";
}


.qac-button {
  background-color: black;
  color: gold;
  border: 2px solid gold;
  border-radius: 0.4rem;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  padding: 0.5rem;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  width: 100%;
  height: 100%;
  text-align: center;
}

.qac-button:hover {
  background-color: gold;
  color: black;
}

.small-button {
  font-size: 0.85rem;
  padding: 0.6rem;
}

.big-roll {
  grid-column: span 2;
  font-size: 1rem;
  padding: 0.8rem;
  font-weight: bold;
  text-align: center;
}

.tab-container {
  width: calc(100% - 16px); /* Leaves 8px on either side */
  margin: 0 auto;
  padding: 0.5rem 0;
  border: 1px solid gold;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.tab-buttons {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  border-bottom: 1px solid gold;
  margin-bottom: 1rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: gold;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab-btn.active {
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
  border-bottom: 2px solid gold;
}

.tab-btn:hover {
  color: white;
}

.tab-content {
  display: none;
  flex-direction: column;
  align-items: center;
  max-height: 700px; /* Adjust this based on your layout */
  overflow-y: auto;
  padding: 1rem;
  border-top: 1px solid gold;
  scroll-behavior: smooth;
}

.tab-content.active {
  display: block;
}

.tab-content::-webkit-scrollbar {
  width: 10px;
}

.tab-content::-webkit-scrollbar-thumb {
  background-color: gold;
  border-radius: 6px;
}

.tab-content::-webkit-scrollbar-track {
  background-color: rgba(255, 255, 255, 0.05);
}

.derp-fear-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
  flex-wrap: nowrap;
  width: 100%;
  margin-top: -5rem;
  
}


.derp-section,
.fear-section {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  max-width: 50%;
  min-height: 300px; /* 👈 or whatever height you want visible */
}


 #dice-roller-modal.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    border: 3px solid yellow;
    padding: 1rem;
    z-index: 999;
    font-family: 'Cinzel', serif;
    color: white;
  }
  .popup-content input {
    width: 4rem;
    margin: 0 0.5rem;
    font-size: 1.2rem;
    text-align: center;
  }

.popup-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%; /* ensure full width */
}

.popup-actions button {
  width: auto; /* ✅ prevent stretching */
  flex: 0 0 auto;
}

  #dice-roll-console {
    width: 280px;
    max-height: 600px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid yellow;
    padding: 0.5rem;
    font-family: monospace;
      margin-bottom: 0.5rem;
    color: lime;
  }

  #chat-input-container {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  padding: 4px;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.75);
  width: fit-content;
}

#chat-username,
#chat-message {
  padding: 4px;
  font-family: monospace;
  font-size: 0.9rem;
  background-color: #111;
  color: lime;
  border: 1px solid lime;
  border-radius: 4px;
  width: 100px;
}

#chat-message {
  flex-grow: 1;
  min-width: 200px;
}

#send-message {
  padding: 4px 12px;
  background-color: black;
  border: 1px solid lime;
  color: lime;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}

#chat-area {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  max-width: 400px;
  z-index: 998;
  display: flex;
  flex-direction: column;
   flex-grow: 1;
   overflow: hidden;
  gap: 0.5rem;
}

  #dice-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--bg-color-dark, #111);
  border: 2px solid gold;
  border-radius: 0.5rem;
  font-family: 'Cinzel', serif;
  color: white;
}

.dice-console {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0.5rem;
  background-color: #111;
  border: 1px solid yellow;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  min-height: 200px; /* Optional: minimum space before scroll */
}

.dice-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dice-input-row label {
  margin: 0;
}

.dice-input-row input {
  width: 60px;
  padding: 0.3rem;
  text-align: center;
  background: black;
  color: white;
  border: 1px solid gold;
  border-radius: 4px;
}

.dice-buttons-row {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.dice-buttons-row button {
  padding: 0.4rem 1rem;
  background: gold;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: black;
  border-radius: 4px;
}

.dice-buttons-row button:hover {
  background-color: white;
  color: black;
}

#animated-die {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2); /* Start centered & large */
  width: 120px;
  height: 120px;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: top 1s ease-in-out, left 1s ease-in-out, transform 1s ease-in-out, opacity 1s ease-in-out;
}

#animated-die.show {
  top: 20px;
  left: 20px;
  transform: scale(1);
}

.die-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

#die-number {
  position: absolute;
  top: 50%; /* <-- Adjust this until it's centered visually */
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 6px black;
  z-index: 10;
  pointer-events: none;
}

#die-image {
  width: 100%;
  height: 100%; 
  object-fit: contain; 
  transition: transform 0.1s ease-in-out;
}

.grow {
  animation: grow-shrink 0.4s ease-in-out infinite;
}

@keyframes grow-shrink {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

#chat-roll-tab {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem;
  border-top: 1px solid gold;
  color: white;
  font-size: 0.9rem;
    flex-grow: 1;
  overflow-y: auto;
    box-sizing: border-box;
}

#chat-input-container input,
#chat-input-container button {
  margin-top: 4px;
  font-size: 0.8rem;
  padding: 2px 6px;
  width: 100%;
  margin-bottom: 4px;
}

#dice-roll-console {
  min-height: 150px;
  border: 1px solid yellow;
  padding: 0.5rem;
  background-color: #111;
  overflow-y: auto;
}

#chat-input-container {
  display: flex;
   gap: 0.3rem;
  padding: 0.3rem 0;
  width: 100px;
}

#chat-input-container input[type="text"] {
  flex: 1;
  padding: 0.25rem;
  background-color: black;
  color: white;
  border: 1px solid yellow;
}

#chat-input-container button {
  background-color: green;
  color: black;
  border: 1px solid yellow;
  padding: 0.25rem 0.5rem;
    width: 60px;
  flex-shrink: 0;
}

#dice-results-column {
  position: fixed;
  top: 20px;
  left: 20px;
    width: 60px; /* lock width so dice overlap cleanly */
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 9998;
  pointer-events: none;
}

.dice-result-display {
  width: 60px;
  height: 60px;
  position: relative;
  animation: slide-in 0.5s ease-out;
}

.dice-result-display img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dice-result-display .roll-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  font-size: 1.5rem;
  color: white;
  text-shadow: 2px 2px 4px black;
}

@keyframes slide-in {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0px);
    opacity: 1;
  }
}

/* === Critical Glow Effects === */

.die-crit-success img {
  box-shadow: 0 0 20px 10px gold;
  animation: crit-glow 1s ease-in-out infinite alternate;
  border-radius: 50%;
}

@keyframes crit-glow {
  0% {
    box-shadow: 0 0 12px 6px gold;
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 24px 12px gold;
    transform: scale(1.1);
  }
}

.die-crit-fail img {
  box-shadow: 0 0 12px 6px red;
  animation: crit-fail 0.6s ease-in-out infinite alternate;
  border-radius: 50%;
  filter: grayscale(0.4);
}

@keyframes crit-fail {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: rotate(-10deg) scale(0.95);
    opacity: 0.8;
  }
}

.roll-modifier {
  position: absolute;
  top: 50%;
  left: 110%;
  transform: translateY(-50%);
  font-size: 1rem;
  font-weight: bold;
  color: lime;
  white-space: nowrap;
  font-family: monospace;
  text-shadow: 1px 1px 2px black;
  pointer-events: none;
}

.modifier-inside {
  position: absolute;
  top: 50%;
  left: 110%;
  transform: translateY(-50%);
  color: lime;
  font-size: 0.9rem;
  font-family: monospace;
  font-weight: bold;
  pointer-events: none;
  opacity: 0;
  animation: fly-in-up 1s ease-out forwards;
}

@keyframes fly-in-up {
  0% {
    opacity: 0;
    left: 110%;
    top: 50%;
    transform: translateY(-50%);
  }
  50% {
    opacity: 1;
    left: 50%;
    top: 10%;
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    opacity: 0;
    left: 50%;
    top: 10%;
    transform: translate(-50%, -50%);
  }
}


.final-total {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
  font-weight: bold;
  color: rgb(255, 255, 255);
  text-shadow: 2px 2px 4px black;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mode-toggle {
  position: center;
  top: 15px;
  right: 15px;
}
.mode-toggle input {
  display: none;
}
.mode-toggle .slider {
  display: inline-block;
  width: 60px;
  height: 30px;
  background-color: #555;
  border-radius: 30px;
  position: relative;
  cursor: pointer;
}
.mode-toggle .slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  top: 3px;
  background-color: #eee;
  border-radius: 50%;
  transition: transform 0.3s;
}
#edit-mode-toggle:checked + .slider::before {
  transform: translateX(30px);
}

/* === Use Mode Button Styling === */
/* Container for button + circle */
.stat-roll-container {
  position: relative;
  display: block;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 130px; /* Adjusted for better fit */
}

.stat-roll-btn {
  width: 100%;
  height: 107px;
  background-color: black;
  color: #ffeb3b;
  border: 2px solid #ffeb3b;
  border-radius: 12px;
  font-size: 2.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
}


.stat-roll-btn:hover {
  background-color: #222;
  box-shadow: 0 0 8px #ffeb3b;
  transform: scale(1.03);
}

/* Modifier number */
.stat-mod-output {
  font-weight: bold;
  font-size: 1rem;
  color: #ffeb3b;
  user-select: none;
  text-align: center;
}


.score-btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 12px #fff700;
}

#skip-animation-btn {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background-color: #222;
  color: #fff;
  padding: 8px 16px;
  font-size: 16px;
  border: 2px solid gold;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 10px gold;
}

#skip-animation-btn:hover {
  background-color: #cc1111;
  transform: translateX(-50%) scale(1.05);
}

#skip-animation-btn.hidden {
  display: none;
}

.console-crit {
  color: gold;
  font-weight: bold;
  text-shadow: 0 0 6px yellow;
}

.console-fail {
  color: red;
  font-weight: bold;
}

.base-stat-btn {
  display: inline-block;
  width: 130px;
  padding: 0.4rem;
  border: 2px solid gold;
  border-radius: 6px;
  background-color: rgba(255, 215, 0, 0.1);
  color: gold;
  font-family: 'Cinzel', serif;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease; 
}

.substat-btn {
  width: 130px;
  padding: 0.3rem;
  border: 1px solid gold;
  border-radius: 4px;
  background-color: rgba(255, 215, 0, 0.05);
  color: gold;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}

.substat-btn:hover,
.substat-btn:focus {
  background-color: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 5px gold;
  transform: scale(1.03);
  outline: none;
}

.base-stat-btn:hover,
.base-stat-btn:focus {
  background-color: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 8px 2px gold;
  transform: scale(1.05);
  outline: none;
}

.initiative-roll-btn {
  margin-top: -0.5rem;
  padding: 0.5rem 0.7rem;
  border: 2px solid gold;
  border-radius: 6px;
  background-color: black;
  color: gold;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.initiative-roll-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px 4px gold;
}

.initiative-roll-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 6px 2px orange;
}

.movement-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.movement-row {
  display: flex;
  flex-direction: column;
  margin-top: -0.6rem;
  align-items: center;
  width: 3.5rem;
  display: inline-block;
  margin-right: 0.96rem;
  text-align: center;
}

.move-base-input {
  width: 100%;
  padding: 0.3rem;
  font-size: 1rem;
  text-align: center;
  border: 1px solid gold;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 4px;
}

.move-roll-btn {
  margin-top: 0.3rem;
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  border: 1px solid gold;
  background: black;
  color: gold;
  border-radius: 4px;
  cursor: pointer;
}

.move-mod-label {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: gold;
  white-space: nowrap;
}

.movement-group {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.move-announcement-btn {
  padding: 0.3rem;
  width: 100%;
  font-size: 0.9rem;
  background-color: black;
  color: gold;
  border: 1px solid gold;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}

.dodge-roll-btn {
  width: 100%;
  padding: 0.3rem;
  font-size: 0.9rem;
  background-color: black;
  color: gold;
  border: 1px solid gold;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}

.armor-group {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.armor-row {
  display: flex;
  flex-direction: column;
  margin-top: -0.1rem;
  align-items: center;
  width: 3.5rem;
  display: inline-block;
  margin-right: 0.96rem;
  text-align: center;
}

.armor-base-input,
.armor-roll-btn {
  width: 100%;
  padding: 0.3rem;
  font-size: 1rem;
  text-align: center;
  border: 1px solid gold;
  border-radius: 4px;
}

.armor-roll-btn {
  background-color: black;
  color: gold;
  cursor: pointer;
}

.support-project {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  border: 2px solid gold;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  text-align: center;
  color: white;
}

.cashtag-box {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 500;
  background-color: rgba(255, 215, 0, 0.08); /* gold-ish background, low opacity */
  color: #ffeeb1;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  margin-top: 1.2rem;
  border: 1px solid rgba(255, 215, 0, 0.6); /* gold border */
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.3); /* soft gold glow */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.cashtag-box:hover {
  transform: scale(1.03);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.support-project h2 {
  font-size: 1.4rem;
  color: #ffe96a;
  margin-bottom: 0.6rem;
  letter-spacing: 0.5px;
  font-weight: bold;
}

.support-project p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85); /* soft white */
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.2px;
}

.patreon-btn {
  display: inline-block;
  background-color: #f96854;
  color: white;
  font-weight: bold;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 1rem;
  margin-left: 0.5rem;
  box-shadow: 0 0 6px rgba(249, 104, 84, 0.4);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.patreon-btn:hover {
  background-color: #ff7c6b;
  transform: scale(1.03);
}

.admin-box {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #222;
  padding: 1.5rem;
  border: 1px solid gold;
  border-radius: 8px;
  text-align: left;
  font-size: 0.9rem;
  z-index: 999;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.admin-box h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
}

.admin-box input {
  padding: 0.4rem;
  font-size: 0.9rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.admin-box button {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  background-color: gold;
  color: black;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

/* Remove default number input arrows */
/* Chrome, Safari, Opera, Edge */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}