@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* I stole this pretty much 1:1 from Material design <3 */
/* I love multiples of 4*/
:root {
    --primary-color: #673AB7; 
    --primary-color-light: #7E57C2;
    --background-color: #303030; 
    --surface-color: #424242;   
    --text-color: #FFFFFF;
    --text-color-secondary: #BDBDBD; 
    --border-color: #616161;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1, h2 {
    color: var(--text-color);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.5rem; }

/* Nested section headers for sub-configurations */
h4 {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.form-section {
    
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: box-shadow 0.3s ease;
}

.form-section .form-section {
    background-color: var(--background-color);
    margin: 15px 0;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}
select option {
    background-color: var(--surface-color); 
    color: var(--text-color);           
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    color: var(--text-color-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 8px;
}

input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

input[type="text"], input[type="number"], input[type="file"], select {
    background-color: transparent;
    color: var(--text-color);
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 8px 0;
    font-size: 1rem;
    transition: border-bottom-color 0.3s ease;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="file"]:focus, select:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
}

input[type="file"] {
    border-bottom: none;
    padding: 4px 0;
    font-size: 0.9rem;
}

input[type="file"]::-webkit-file-upload-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 10px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

button:hover {
    background-color: var(--primary-color-light);
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.download-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.custom-control {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.custom-control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-control .checkmark {
    position: relative;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    margin-right: 12px;
    transition: background-color 0.2s;
}
.custom-control input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.custom-control .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.custom-control input:checked ~ .checkmark:after {
    display: block;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-group span {
    min-width: 40px;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    flex: 1;
}
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--border-color);
    border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    margin-top: -7px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.file-input-group label {
    display: block;
    margin-bottom: 8px;
}
.file-input-group .file-input-button {
    display: inline-block;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}
.file-input-group input[type="file"] {
    display: none;
}
.file-input-group .file-name {
    margin-left: 10px;
    color: var(--text-color-secondary);
    font-style: italic;
}

textarea {
    width: 100%;
    min-height: 250px;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    padding: 10px;
}
.hidden { display: none; }

/* Hint text for replaced <i> tags */
.hint {
    font-size: 0.85em;
    color: var(--text-color-secondary);
    font-style: normal;
}

/* Feature section styling */
.form-section h2 {
    position: relative;
}

.form-section h2:before {
    content: "";
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
}

#advancedProjectileOptions h2:before,
#meleeOptions h2:before,
#hitscanVFXOptions h2:before {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-color-light));
}

.form-section .form-section .form-grid {
    gap: 16px;
}

#projectileOptions, #meleeOptions, #hitscanVFXOptions, #advancedProjectileOptions {
    border-left: 3px solid var(--primary-color);
    padding-left: 27px;
}

input[type="number"][id*="Color"] {
    position: relative;
}

.form-group:has(h4) {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .form-section {
        padding: 16px;
    }
}

/* Hover tooltips */

.hover-info {
    display: inline-block;
    position: relative;
    cursor: help;
}
.hover-info::after {
    content: '?';
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}
.hover-tooltip {
    position: absolute;
    z-index: 1200;
    background: rgba(32,32,32,0.96);
    color: var(--text-color);
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    max-width: 320px;
    font-size: 0.92rem;
    line-height: 1.3;
    pointer-events: auto;
}
.hover-tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid rgba(32,32,32,0.96);
    left: 50%;
    transform: translateX(-50%);
    bottom: -7px;
}

.separator,
hr.latex-sep {
    display: block;             
    width: 100%;  
    border: none;
    height: 1px;
    background: var(--primary-color-light);
    margin: 24px 0;
}

.form-grid .separator,
.form-grid hr.latex-sep,
.form-section .form-grid .separator,
.form-section .form-grid hr.latex-sep {
    grid-column: 1 / -1;
}

.separator.centered,
hr.latex-sep.centered {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.separator:focus {
    outline: 2px dashed rgba(103,58,183,0.6);
    outline-offset: 6px;
}