body {
    background-color: #121212;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 13px;
    margin: 0;
    padding: 20px;
    text-align: center;
}

h1, h2 {
    font-weight: bold;
    margin: 5px 0;
}

.gold { color: #E6C300; }
.red { color: red; }

/* League Percent */
.form-group {
    margin: 15px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-group label {
    min-width: 180px;
    text-align: right;
    margin-right: 10px;
}

.form-group input {
    width: 100px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    color: white;
    padding: 5px;
    font-size: 13px;
}

/* Remove input number arrows */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Layout: legend + grid */
.layout {
    display: grid;
    grid-template-columns: 300px 1fr; /* legend left, categories right */
    gap: 20px;
    margin-top: 20px;
}

/* Legend styles */
.legend {
    text-align: left;
    font-size: 13px;
    line-height: 1.4;
}
.legend h3 {
    margin-bottom: 10px;
}
.legend p {
    margin: 5px 0;
}
.legend em {
    font-style: italic;
    font-weight: bold;
}

/* Grid for categories */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* exactly 2 per row */
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
    padding: 0 500px; /* side spacing */
}

/* Category boxes */
.category-box {
    border: 1px solid #444;
    padding: 10px;
    display: grid;
    grid-template-columns: 150px 150px; /* equal widths */
    gap: 5px 10px;
    justify-content: center;     
    align-items: center;         
}

.category-box label {
    text-align: right;   /* align label text to the right */
    padding-right: 5px;  /* small space before the input */
}

/* Category titles spanning two columns */
.category-title {
    grid-column: 1 / span 2;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    margin-bottom: 5px;
}

/* Category colors */
.legendary .category-title { color: #FFD700; }
.epic .category-title { color: #800080; }
.rare .category-title { color: #1E90FF; }
.uncommon .category-title { color: #00FF00; }

/* Total RLT */
.total-rlt {
    margin: 20px auto;
    display: grid;
    grid-template-columns: 180px 120px;
    gap: 5px 10px;
    justify-content: center;
    align-items: center;
}

/* Math note under Total RLT */
.math-note {
    font-size: 12px;
    font-style: italic;
    text-align: left;
    margin-top: 5px;
}

/* Global input styles */
input {
    background-color: #1e1e1e; /* all inputs same dark color */
    color: white;
    border: 1px solid #333;
    padding: 5px;
    font-size: 13px;
    box-sizing: border-box;
}
