table {
  width: 90%;
  margin: 0 5%;
}

th {
  height: 3em;
  padding: 6px;

  color: #fff;
}

td {
  line-height: 2em;
  text-indent: 5px;
}

tr {
  background: #fefeff;
}

tr:nth-child(even) {
  background: #e6eeff;
}

#history-table {
  font-weight: bold;
}

#history-table tr {
  background: var(--color-warn-bg);
  color: var(--color-warn-text);
}

/* same colors as info boxes! */
#history-table tr.moved-up {
  background: var(--color-ok-bg);
  color: var(--color-ok-text);
}

#history-table tr.moved-down {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

#editors li {
  display: inline-block;
  margin: 2px;
  overflow: hidden;
}

#editors ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-content: center;

  margin: 0% 5%;

  font-variant: small-caps;
}

.right p,
.right span,
#rules span {
  font-size: 0.8em;
  font-weight: normal;
}

@media (max-width: 1071px) {
  #rules,
  #discord {
    order: -1;
  }

  #discord {
    width: 100%;
  }

  #editors,
  #submit,
  #stats {
    min-width: 200px;
    width: 30%;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  #editors,
  #submit,
  #stats {
    width: 100%;
  }

  .video-link {
    display: none;
  }
}

.dropdown {
  background: var(--color-bg);
  text-align: center;
}

.dropdown li {
  padding: 10px calc(10px + 0.52434444444444%);
  min-width: 200px;
  width: 200px;
  flex-grow: 1;
}

.dropdown i {
  font-variant: small-caps;
  font-size: 0.8em;
}

#lists .button {
  font-weight: 600;
}

#level-info span {
  margin: 5px 10px;
}

/* Stats viewer styles */

#stats-viewer-pagination li i {
  padding-left: 5px;

  color: #444;

  font-size: 70%;
  font-variant: small-caps;
}

/* Submission form styles */

#submission-form h3 {
  margin: 20px 0px 10px 0px;
}

#submission-form > p {
  margin: 5px 0;

  font-size: 90%;
  text-align: center;
}

.thumb {
  background: black;
  background-size: cover;
}

.completed {
  background: var(--color-ok-bg);
}

@media (max-width: 767px) {
  .thumb {
    width: 100%;
    box-shadow: 1px -53px 26px -20px var(--color-bg) inset;
  }

  .completed .thumb {
    box-shadow: 1px -53px 26px -20px var(--color-ok-bg) inset;
  }

  .demon-byline {
    font-size: 80%;
  }

  .demon-info {
      margin-top: -10px;
  }
}

@media (min-width: 768px) {
  .thumb {
    max-width: 30%;
    min-width: 30%;
  }

  .demon-byline {
    padding-left: 15px;
  }
}

.ct-series-a .ct-line,
.ct-series-a .ct-point {
  stroke: #0881c6;
}

/* =====================================
   EZ LIST — LIST SECTIONS
   ===================================== */

.ez-list-tabs {
    max-width: 1000px;
    margin: 0 auto 20px auto;

    display: flex;

    background: var(--panel-color, white);
    border: 1px dashed #cfd4e2;
}

.ez-list-tabs a {
    flex: 1;

    padding: 12px 10px;

    text-align: center;
    text-decoration: none;

    font-weight: 600;

    border-right: 1px solid #cfd4e2;

    transition: background 0.15s ease;
}

.ez-list-tabs a:last-child {
    border-right: none;
}

.ez-list-tabs a:hover {
    background: rgba(109, 31, 214, 0.08);
}

.ez-list-tabs a span {
    display: block;

    margin-top: 2px;

    font-size: 11px;
    font-weight: 400;
    opacity: 0.65;
}

@media (max-width: 600px) {
    .ez-list-tabs {
        margin-left: 10px;
        margin-right: 10px;
    }

    .ez-list-tabs a {
        font-size: 13px;
        padding: 10px 4px;
    }
}


/* =========================================================
   EZ LIST REDESIGN
   ========================================================= */

:root {
    --ezl-bg: #eef1f8;
    --ezl-card: #ffffff;
    --ezl-text: #2a2a33;
    --ezl-muted: #666978;
    --ezl-purple: #6d1fd6;
    --ezl-border: #cfd4e2;
}

body {
    background: var(--ezl-bg);
}

.ezl-section-nav {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    background: var(--ezl-card);
    border: 1px dashed var(--ezl-border);
    border-top: 0;
}

.ezl-section-button {
    flex: 1;
    appearance: none;
    border: 0;
    border-right: 1px solid var(--ezl-border);
    background: transparent;
    color: var(--ezl-text);
    padding: 12px 8px 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.ezl-section-button:last-child {
    border-right: 0;
}

.ezl-section-button span,
.ezl-section-button small {
    display: block;
}

.ezl-section-button small {
    margin-top: 2px;
    opacity: .55;
    font-size: 11px;
    font-weight: 400;
}

.ezl-section-button:hover {
    background: rgba(109, 31, 214, .05);
}

.ezl-section-button.active {
    color: var(--ezl-purple);
    box-shadow: inset 0 -3px var(--ezl-purple);
}

.ezl-page {
    width: calc(100% - 24px);
    max-width: 1000px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
}

.ezl-main {
    min-width: 0;
}

.ezl-intro {
    box-sizing: border-box;
    padding: 18px;
    margin-bottom: 16px;
    background: var(--ezl-card);
    border: 1px dashed var(--ezl-border);
}

.ezl-intro h1 {
    margin: 5px 0;
    text-align: center;
    color: var(--ezl-text);
    font-size: 30px;
    line-height: 1.2;
}

.ezl-intro p {
    margin: 8px 0 14px;
    text-align: center;
    color: var(--ezl-muted);
    font-size: 17px;
}

.ezl-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--ezl-border);
    background: var(--ezl-card);
}

.ezl-search > span {
    padding: 0 10px;
    color: var(--ezl-muted);
    font-size: 20px;
}

.ezl-search input {
    flex: 1;
    min-width: 0;
    padding: 11px 4px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ezl-text);
    font: inherit;
}

.ezl-search button {
    width: 42px;
    align-self: stretch;
    border: 0;
    background: transparent;
    color: var(--ezl-muted);
    cursor: pointer;
    font-size: 21px;
}

.ezl-search button:hover {
    color: var(--ezl-purple);
}

.ezl-demon-card {
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    gap: 16px;
    min-height: 118px;
    padding: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    background: var(--ezl-card);
    border: 1px dashed var(--ezl-border);
}

.ezl-demon-card[hidden] {
    display: none !important;
}

.ezl-thumbnail {
    position: relative;
    width: 170px;
    min-width: 170px;
    min-height: 96px;
    overflow: hidden;
    background-color: #292936;
    background-position: center;
    background-size: cover;
    text-decoration: none;
}

.ezl-thumbnail::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,.35),
        rgba(0,0,0,.03)
    );
}

.ezl-position {
    position: absolute;
    z-index: 1;
    left: 12px;
    bottom: 8px;
    color: white;
    font-size: 29px;
    font-weight: 700;
    text-shadow: 0 2px 7px rgba(0,0,0,.85);
}

.ezl-demon-content {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ezl-demon-content h2 {
    margin: 0 0 5px;
    text-align: left;
    font-size: 21px;
    line-height: 1.25;
}

.ezl-demon-content h2 a {
    color: var(--ezl-text);
    text-decoration: none;
}

.ezl-demon-content h2 a:hover {
    color: var(--ezl-purple);
}

.ezl-byline {
    color: var(--ezl-text);
    font-size: 15px;
    line-height: 1.5;
}

.ezl-byline a {
    color: var(--ezl-purple);
    font-weight: 600;
}

.ezl-score {
    margin-top: 5px;
    color: var(--ezl-muted);
    font-size: 13px;
}

.ezl-progress {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ezl-progress strong {
    color: var(--ezl-purple);
    font-size: 28px;
}

.ezl-progress span {
    color: var(--ezl-muted);
    font-size: 11px;
}

.ezl-sidebar {
    min-width: 0;
}

/* Bring existing Pointercrate sidebar panels closer to the EZL cards. */
.ezl-sidebar .panel {
    box-shadow: none;
    border: 1px dashed var(--ezl-border);
    background: var(--ezl-card);
}

/* Hide old overview layout styles when inside the new page. */
.ezl-page .left,
.ezl-page .right {
    width: auto;
}

/* Mobile */
@media (max-width: 800px) {
    .ezl-page {
        grid-template-columns: 1fr;
    }

    .ezl-sidebar {
        order: 2;
    }
}

@media (max-width: 550px) {
    .ezl-section-button {
        padding-left: 3px;
        padding-right: 3px;
        font-size: 13px;
    }

    .ezl-intro h1 {
        font-size: 24px;
    }

    .ezl-demon-card {
        gap: 11px;
        padding: 11px;
        min-height: 90px;
    }

    .ezl-thumbnail {
        width: 100px;
        min-width: 100px;
        min-height: 70px;
    }

    .ezl-position {
        left: 7px;
        bottom: 5px;
        font-size: 20px;
    }

    .ezl-demon-content h2 {
        font-size: 17px;
    }

    .ezl-byline {
        font-size: 12px;
    }

    .ezl-score {
        font-size: 11px;
    }

    .ezl-progress {
        display: none;
    }
}

/* Old pre-redesign tab bar — replaced by .ezl-section-nav */
.ez-list-tabs {
    display: none !important;
}

/* =========================================================
   EZ LIST DARK MODE
   ========================================================= */

html[data-ezl-theme="dark"] {
    --ezl-bg: #12141c;
    --ezl-card: #1b1e29;
    --ezl-text: #e9eaf2;
    --ezl-muted: #a3a6b8;
    --ezl-border: #363a4d;
}

html[data-ezl-theme="dark"] body {
    background: var(--ezl-bg);
    color: var(--ezl-text);
}

html[data-ezl-theme="dark"] .ezl-section-nav,
html[data-ezl-theme="dark"] .ezl-intro,
html[data-ezl-theme="dark"] .ezl-demon-card,
html[data-ezl-theme="dark"] .ezl-sidebar .panel {
    background: var(--ezl-card);
    color: var(--ezl-text);
    border-color: var(--ezl-border);
}

html[data-ezl-theme="dark"] .ezl-section-button {
    color: var(--ezl-text);
    border-color: var(--ezl-border);
}

html[data-ezl-theme="dark"] .ezl-section-button.active {
    color: #9b5cff;
}

html[data-ezl-theme="dark"] .ezl-intro h1,
html[data-ezl-theme="dark"] .ezl-demon-content h2 a,
html[data-ezl-theme="dark"] .ezl-byline {
    color: var(--ezl-text);
}

html[data-ezl-theme="dark"] .ezl-search {
    background: #151821;
    border-color: var(--ezl-border);
}

html[data-ezl-theme="dark"] .ezl-search input {
    color: var(--ezl-text);
}

html[data-ezl-theme="dark"] .ezl-search input::placeholder {
    color: var(--ezl-muted);
}

/* Pointercrate navigation */
html[data-ezl-theme="dark"] header,
html[data-ezl-theme="dark"] nav {
    background: #1b1e29 !important;
}

html[data-ezl-theme="dark"] nav a,
html[data-ezl-theme="dark"] nav span,
html[data-ezl-theme="dark"] nav i {
    color: #e9eaf2 !important;
}

/* Sidebar text/headings */
html[data-ezl-theme="dark"] .ezl-sidebar h1,
html[data-ezl-theme="dark"] .ezl-sidebar h2,
html[data-ezl-theme="dark"] .ezl-sidebar h3,
html[data-ezl-theme="dark"] .ezl-sidebar p {
    color: var(--ezl-text);
}

/* =========================================================
   EZ LIST CLEANUP
   ========================================================= */

/* Hide Pointercrate's original demon-list dropdown/navigation row.
   EZL now uses .ezl-section-nav instead. */
body > .dropdowns,
body > .demon-dropdowns,
.ezl-section-nav ~ .dropdowns {
    display: none !important;
}

/* Remove the obsolete first EZL tab implementation too. */
.ez-list-tabs {
    display: none !important;
}
