/* ========================= */
/*        FORM CONTAINER     */
/* ========================= */

form {
    color: white;
    max-width: 950px;
    margin: 0 auto;
}

/* ========================= */
/*        HEADINGS           */
/* ========================= */

h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--twitch-purple);
    font-weight: 600;
    border-bottom: 1px solid var(--bg-gray);
    padding-bottom: 6px;
}

/* ========================= */
/*        INPUTS             */
/* ========================= */

form input,
form select {
    background: var(--bg-gray);
    border: 1px solid transparent;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 6px 8px 6px 0;
    outline: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

/* Width control */
form input[type="text"] { width: 180px; }
form input[type="url"] { width: 250px; }
form input[type="number"] { width: 110px; }

/* Focus effect */
form input:focus,
form select:focus {
    border: 1px solid var(--twitch-purple);
    box-shadow: 0 0 8px rgba(145, 70, 255, 0.4);
}

/* Placeholder */
form input::placeholder {
    color: #bbb;
}

/* ========================= */
/*   NUMBER INPUT SPINNERS   */
/* ========================= */

form input[type="number"]::-webkit-inner-spin-button,
form input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

form input[type="number"] {
    appearance: textfield;
    background: linear-gradient(145deg, var(--bg-gray), #2a2a2d);
}

/* ========================= */
/* SELECT2 CLEAN STABLE FIX */
/* ========================= */

form .select2-container {
    margin: 6px 8px 6px 0;
    width: 200px !important;
}

/* Main selection box */
.select2-container--default .select2-selection--single {
    background-color: var(--bg-gray) !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    height: 42px !important;
    padding: 6px 30px 6px 12px !important;
    color: white !important;
    box-sizing: border-box !important;
}

/* Focus state */
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--twitch-purple) !important;
    box-shadow: 0 0 8px rgba(145, 70, 255, 0.4) !important;
}

/* Rendered text */
.select2-selection__rendered {
    color: white !important;
    padding: 0 !important;
    line-height: 28px !important;
}

/* Arrow */
.select2-selection__arrow {
    height: 100% !important;
    right: 8px !important;
}

/* CLEAR BUTTON FIX */
.select2-selection__clear {
    display: inline !important;
    float: none !important;
    margin-right: 6px !important;
    background: none !important;
    color: white !important;
}

/* REMOVE ANY BACKGROUND FROM CLEAR */
.select2-selection__clear:before,
.select2-selection__clear:after {
    display: none !important;
}

/* ========================= */
/* DROPDOWN PANEL FIX        */
/* ========================= */

.select2-dropdown {
    background-color: var(--twitch-dark) !important;
    border: 1px solid var(--twitch-purple) !important;
    border-radius: 10px !important;
}

.select2-results__option {
    background-color: var(--twitch-dark) !important;
    color: white !important;
    padding: 8px 12px !important;
}

.select2-results__option--highlighted {
    background-color: var(--twitch-purple) !important;
    color: white !important;
}

.select2-results__option--selected {
    background-color: var(--bg-gray) !important;
}

/* Dropdown search */
.select2-search--dropdown .select2-search__field {
    background: var(--bg-gray) !important;
    color: white !important;
    border: 1px solid var(--twitch-purple) !important;
    border-radius: 6px !important;
    padding: 6px !important;
}
/* ========================= */
/*        BUTTON             */
/* ========================= */

form button {
    margin-top: 30px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    background: linear-gradient(
        90deg,
        var(--twitch-purple),
        #772ce8
    );
    transition: 0.2s ease;
}

form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(145, 70, 255, 0.4);
}

.result {
  width: 95%;        /* fills most of parent */
  max-width: 100%;   /* never overflow */
  height: auto;      /* keep aspect ratio */
  display: block;    /* remove inline spacing */
  margin: 1rem auto; /* center + wiggle room */
  border:#772ce8 5px solid;
  border-radius: 16px;
}

#favcolor-tables {
  -webkit-appearance: none;
  appearance: none;
  width: 250px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Color swatch (Chrome, Edge, Safari) */
#favcolor-tables::-webkit-color-swatch {
  border-radius: 10px;
  border: 2px solid #2a2a2a;
}

/* Firefox */
#favcolor-tables::-moz-color-swatch {
  border-radius: 10px;
  border: 2px solid #2a2a2a;
}

/* Hover effect */
#favcolor-tables:hover {
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(145, 70, 255, 0.6);
}

/* Active (click) */
#favcolor-tables:active {
  transform: scale(0.95);
}

/* Optional: focus glow for accessibility */
#favcolor-tables:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.8);
}

.color-label {
  display: block;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
  font-weight: 500;
}

.mkw-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Override centering for this page */
.page-wrapper:has(.mkw-page) {
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 80px;
}

.hero-banner {
    width: 100%;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-banner h1 {
    font-size: 3rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: white;
    text-align: center;
}

.content-panel {
    max-width: 850px;
    width: 90%;
    background-color: #1a1a1c;
    margin-top: 30px;
    margin-bottom: 60px;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid #3a3a3c;
    color: white;
}

.content-panel h2 {
    color: var(--twitch-purple);
    font-size: 2rem;
    margin-top: 0;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.content-panel p {
    line-height: 1.6;
    color: #d1d1d1;
    font-size: 1.1rem;
}

.rule-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.rule-list li {
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
}

.rule-list li::before {
    content: "•";
    color: var(--twitch-purple);
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    top: -2px;
}

.list-subhead {
    font-weight: bold;
    margin: 20px 0 10px 0 !important;
    padding-left: 0 !important;
    text-decoration: underline;
}

.list-subhead::before {
    content: "" !important;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--twitch-purple);
    font-weight: bold;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}