/* Reset & basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f4f6f8;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header and Footer */
header {
    background: #27084b;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

footer {
    background: #27084b;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    margin-top: auto;
    /* Force footer to bottom */
}

/* Main container */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    /* Increased gap */
    padding: 2rem 3rem;
    justify-content: center;
    flex: 1;
    /* allow expansion */
}

/* Filters panel */
.filters {
    flex: 0 0 350px;
    /* Increased width */
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    align-self: flex-start;
}

.filters h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #27084b;
    border-bottom: 2px solid #ffc107;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.filter-group {
    margin-bottom: 1.2rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #444;
}

/* Checkboxes */
.checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.4rem;
    transition: all 0.2s;
    font-size: 0.92rem;
}

.checkboxes label:hover {
    color: #27084b;
}

/* Dropdown */
select {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.95rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    transition: all 0.2s;
}

select:focus {
    border-color: #27084b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(39, 8, 75, 0.1);
}

/* Number input */
input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
}

input[type="number"]:focus {
    border-color: #27084b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(39, 8, 75, 0.1);
}

/* After 30 checkbox */
.checkbox-after30 label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Button */
button {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 6px;
    background: #27084b;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    width: 100%;
}

button:hover {
    background: #ffc107;
    color: #27084b;
}

button:active {
    transform: scale(0.98);
}

/* JSON Output Panel */
.json-output {
    flex: 1 1 400px;
    /* Reduced basis, allows shrinking */
    max-width: 600px;
    /* limit width */
    background: #1e1e1e;
    color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.json-output h2 {
    color: #ffc107;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

pre {
    background: #2c2c2c;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px solid #444;
}

.json-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
}

.json-buttons button {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: #444;
    color: #fff;
    margin-top: 0;
}

.json-buttons button:hover {
    background: #ffc107;
    color: #1e1e1e;
}