:root {
    --primary: #6366f1;
    --bg: #0f172a;
    --surface: #1e293b;
    --text-main: #f1f5f9;
    --text-dim: #94a3b8;
    --border: #d1d5db;
    --input-bg: #0f172a;
    --danger: #ef4444;
    --success: #10b981;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    padding: 2rem;
    color: var(--text-main);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

h2 {
    margin: 0;
    color: var(--text-main);
}

.clear-btn-top {
    background-color: #450a0a;
    color: #fca5a5;
    border: 1px solid #7f1d1d;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.clear-btn-top:hover {
    background-color: var(--danger);
    color: white;
}

.section {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.6rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    color: var(--text-main);
}

/* Series Dynamic Rows */
.series-row {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.series-row:only-child .remove-btn {
    display: none;
}

.remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.add-series-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* Button Grids */
.btn-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    align-items: stretch;
}

.choice-btn {
    width: 100%;
    padding: 0.8rem 0.5rem;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-main);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.choice-btn:hover {
    background: #334155;
}

.choice-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.choice-btn.selected {
    background-color: #059669;
    color: white;
    border-color: #059669;
}

.actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--bg);
    display: flex;
    gap: 10px;
}

.actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--bg);
}

.gen-btn {
    flex: 2;
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}

.copy-btn {
    flex: 1;
    background-color: #4b5563;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.copy-btn.copied {
    background-color: var(--success);
}

textarea {
    width: 100%;
    background: #020617;
    color: #38bdf8;
    font-family: 'Fira Code', monospace;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    box-sizing: border-box;
    border: 1px solid var(--border);
    resize: vertical;
}

textarea#output {
    height: 250px;
}

textarea.auto-expand {
    height: auto;
    min-height: 120px;
    overflow-y: hidden;
    resize: none;
}

.disclaimer {
    width: 100%;
    color: var(--text-main);
}