html,
body {
  height: 100%;
  margin: 0;
}

:root {
  --battle-blur-gradient-left: linear-gradient(to right, rgba(44, 47, 51, 0.9) 60%, transparent 100%);
  --battle-blur-gradient-right: linear-gradient(to left, rgba(44, 47, 51, 0.9) 60%, transparent 100%);
}

.page-center {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.two-column-layout {
  display: flex;
  gap: 0.2rem;
}

.compare-container {
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  width: 700px;
  height: 400px;
  overflow: hidden;
  border: 1px solid #ccc;
}

.compare-container img,
.compare-container canvas {
  -webkit-user-drag: none;
  user-drag: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-sizing: border-box;
}

.slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: red;
  cursor: ew-resize;
  z-index: 2;
}

.left,
.right {
  width: 50%;
}

.subheader-pill {
  background: linear-gradient(90deg, #0dcaf0, #20c997);
  border-radius: 999px;
  font-weight: 500;
  color: #212529;
}

.full-width-pill {
  width: 100%;
  background: #23272b;
  color: #f8f9fa;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 0 10px rgba(50, 52, 52, 0.4);
  border-radius: 0;
  border-bottom: 4px solid #181a1b;
  /* dark border at the bottom */
}

.inner-box {
  background-color: #2c2f33;
  /* dark, but lighter than page bg */
  margin-top: 1rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  /* subtle glow */
  color: #f8f9fa;
  /* Bootstrap light text */
}

.compare-result {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0dcaf0;
  /* Bootstrap “info” accent */
  background-color: rgba(13, 202, 240, 0.1);
  /* subtle highlight */
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  text-align: center;
  margin: 1rem auto;
  max-width: 300px;
  border: 2px solid #0dcaf0;
  /* solid accent border */
  box-shadow: 0 0 8px rgba(13, 202, 240, 0.2);
}

.description {
  background: rgba(13, 202, 240, 0.1);
  border-radius: 0.5rem;
  color: #e9ecef;
  font-weight: 400;
  box-shadow: inset 0 0 5px rgba(13, 202, 240, 0.2);
  max-width: 1200px;
  margin: 1rem auto;
}

.inner-box h4 {
  display: block;
  width: 100%;
  margin: 0 0 1rem 0;
  /* Remove default margin, add bottom space if needed */
  background: #23272b;
  color: #f8f9fa;
  text-align: center;
  padding: 1rem 0;
  font-weight: 600;
  border-radius: 0;
  border-bottom: 4px solid #181a1b;
}

.padding {
  padding: 1rem 1rem;
}

.editor-header-row {
  display: flex;
  align-items: center;
  width: 100%;
  background: #23272b;
  color: #f8f9fa;
  border-bottom: 4px solid #181a1b;
  border-radius: 0;
}

.editor-header-row h4 {
  margin: 0;
  font-weight: 600;
  background: none;
  color: inherit;
  flex: 1;
  text-align: left;
}

.inner-box .code-window h4 {
  border: none;
  box-shadow: none;
}

.editor-header-row #runButton {
  margin-left: 1rem;
  color: #f8f9fa;
  border: none;
  font-weight: 600;
  border-radius: 0;
  box-shadow: none;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 1rem;
  padding-right: 1rem;
  line-height: 1.2;
  height: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
}

/* Base styles */
body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6,
#show-diff {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

/* Paragraphs and text */
p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Buttons and labels */
button,
input,
select,
label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

/* Optional: improve font smoothing */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111c;
  /* dark with transparency */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 6px solid #ccc;
  border-top-color: #00bcd4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.list-battles {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: scroll;
  flex-direction: row;
  position: relative
}

.list-battles-wrapper {
  position: relative;
  overflow: hidden;
}

.list-battles {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: scroll;
  flex-direction: row;
  padding-bottom: 20px
  /* Remove position: relative here */
}

.list-battles-wrapper::before,
.list-battles-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 150px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.list-battles-wrapper::before {
  left: 0;
  background: var(--battle-blur-gradient-left);
  filter: blur(6px);
}

.list-battles-wrapper::after {
  right: 0;
  background: var(--battle-blur-gradient-right);
  filter: blur(6px);
}

.list-battles-wrapper.hide-left::before {
  display: none;
}

.list-battles-wrapper.hide-right::after {
  display: none;
}

.battle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 10px;
  background: #23272b;
  padding: 5px 20px 20px 20px;
  border-radius: 10px
}

.battle-title {
  color: #f8f9fa;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.5rem 0;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
  /* Match thumbnail width */
}

.battle-thumbnail {
  width: 350px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 0;
  /* Remove since it's handled by .battle-item */
}

.intro-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(13, 202, 240, 0.05);
  border-radius: 6px;
  border-left: 3px solid #0dcaf0;
}

.feature-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}