:root {
    /* New color palette */
    --deep-purple: #262624;
    --dark-purple: #2b2b29;
    --mid-purple: #444442;
    --light-purple: #e89c3a;
    --pale-pink: #e89c3a;

    /* UI tokens */
    --bg: var(--deep-purple);
    --card: var(--dark-purple);
    --border: var(--mid-purple);
    --text: var(--pale-pink);
    --accent: var(--light-purple);
    --link: var(--light-purple);
    --code-bg: #0a0110;
    --win-color: #042c62;
    --lin-color: #C76E00;
}

body {
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: var(--bg);
    color: var(--text);
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.controls-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    gap: 10px;
    background: var(--card);
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    align-items: center;
}

.mode-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    transition: all 0.2s;
    font-size: 0.9em;
}

.mode-btn:hover:not(.active) {
    background: rgba(249, 226, 171, 0.2);
}

.mode-btn.active {
    background: var(--accent);
    border-color: var(--light-purple);
    color: white;
}

.os-btn.active[data-os="linux"] {
    background: var(--lin-color);
    border-color: var(--lin-color);
    color: white;
}

.os-btn.active[data-os="windows"] {
    background: var(--win-color);
    border-color: var(--win-color);
    color: white;
}

.interface-selector select {
    background: var(--code-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
    width: 100%;
}

.dir-link {
    display: block;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--link);
    margin-bottom: 8px;
}

details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}

summary {
    padding: 12px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
}

summary:hover {
    background: rgba(249, 226, 171, 0.3);
    border-left: 3px solid var(--accent);
}

summary::-webkit-details-marker {
    display: none;
}

.content-wrapper {
    padding: 0 15px;
    background: var(--code-bg);
    border-top: 1px solid var(--border);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 220ms ease, opacity 180ms ease;
}

details[open] .content-wrapper {
    padding: 15px;
    max-height: 500px; /* large enough for typical payload list */
    opacity: 1;
}

.upload-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 15px;
}

.file-input {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.file-input input {
    flex-grow: 1;
    background: var(--code-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 15px;
    border-radius: 4px;
    font-family: inherit;
}

.generate-btn {
    padding: 12px 30px;
    background: var(--accent);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.cmd-line {
    display: flex;
    align-items: stretch;
    margin-bottom: 10px;
    border: 1px solid var(--mid-purple);
    border-radius: 4px;
    overflow: hidden;
}

.copy-btn {
    background: var(--mid-purple);
    border: none;
    color: var(--text);
    padding: 0 15px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75em;
    min-width: 100px;
    border-right: 1px solid var(--border);
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
}

.copy-btn.copied {
    background: var(--light-purple);
}

.code-block {
    flex-grow: 1;
    padding: 10px;
    background: #000;
    color: var(--light-purple);
    font-size: 0.85em;
    white-space: nowrap;
    overflow-x: auto;
}

.hidden {
    display: none !important;
}

footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.7em;
    color: var(--mid-purple);
}

/* Relay Mode Styles */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.tool-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: var(--accent);
}

.tool-tag {
    font-size: 0.7em;
    background: var(--mid-purple);
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
}

.tool-desc {
    font-size: 0.8em;
    color: #d6dae0;
    margin-bottom: 12px;
    flex-grow: 1;
}

.filter-bar input {
    width: 100%;
    padding: 10px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    font-family: inherit;
}

.small-cmd .copy-btn {
    min-width: 60px;
}