:root {
    --bg-main: #121212;
    --bg-panel: #18181b;
    --bg-button: #27272a;
    --bg-button-active: #3f3f46;
    --bg-list: #121214;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-success: #10b981;
    --color-primary: #3b82f6;
    --font-family: "Segoe UI", sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background-color: var(--bg-panel);
    padding: 20px 20px 16px 20px;
    width: 380px;
    text-align: center;
}

.modal-title {
    font-weight: bold;
    margin-bottom: 16px;
    font-size: 1.1em;
}

.modal-message {
    margin-bottom: 20px;
    font-size: 10pt;
    word-wrap: break-word;
}

button {
    background-color: var(--bg-button);
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 9pt;
    font-weight: bold;
    border: none;
    padding: 6px 24px;
    cursor: pointer;
    margin: 0 5px;
}

button:active, button:hover {
    background-color: var(--bg-button-active);
    color: #ffffff;
}

.btn-red { background-color: var(--color-error); color: #ffffff; }
.btn-red:active, .btn-red:hover { background-color: #dc2626; }
.btn-blue { background-color: var(--color-primary); color: #ffffff; }
.btn-blue:active, .btn-blue:hover { background-color: #2563eb; }
.btn-green { background-color: var(--color-success); color: #ffffff; }
.btn-green:active, .btn-green:hover { background-color: #059669; }

input[type="text"] {
    background-color: var(--bg-button);
    color: var(--text-main);
    border: none;
    border-bottom: 4px solid var(--bg-button);
    padding: 8px;
    font-size: 10pt;
    width: 80%;
    margin-bottom: 16px;
    font-family: var(--font-family);
}

input[type="text"]:focus {
    outline: none;
    border-bottom: 4px solid var(--text-main);
}

#top-container {
    display: flex;
    justify-content: space-between;
    background-color: var(--bg-list);
    padding: 4px;
    border-bottom: 1px solid var(--bg-button);
}

#tabs-container {
    display: flex;
}

.tab-btn {
    background-color: transparent;
    color: var(--text-muted);
    padding: 10px 16px;
    margin: 0;
}

.tab-btn.active {
    background-color: var(--bg-button);
    color: var(--text-main);
}

#global-actions {
    display: flex;
    align-items: center;
    padding-right: 12px;
}

#main-content {
    display: flex;
    flex: 1;
    background-color: #09090b;
    overflow: hidden;
}

#canvas-area {
    flex: 1;
    background-color: #09090b;
    cursor: crosshair;
    position: relative;
    overflow: hidden;
}

#sidebar {
    width: 310px;
    background-color: var(--bg-panel);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--bg-button);
}

.sidebar-title {
    text-align: center;
    color: #71717a;
    font-weight: bold;
    font-size: 11pt;
    padding: 10px 0;
}

.sidebar-section {
    background-color: var(--bg-button);
    margin: 4px 10px;
    display: flex;
    flex-direction: column;
}

.section-header {
    background-color: transparent;
    text-align: left;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.section-content {
    background-color: var(--bg-list);
    padding: 2px;
    margin: 2px;
    min-height: 50px;
}

.tab-panel {
    display: none;
    background-color: var(--bg-panel);
    padding: 6px 12px;
    border-bottom: 1px solid var(--bg-button);
}

.tab-panel.active {
    display: flex;
}

.tool-group {
    display: flex;
    flex-direction: column;
    margin-right: 16px;
    padding-right: 16px;
    border-right: 1px solid var(--bg-button);
}

.tool-group-title {
    font-size: 7pt;
    font-weight: bold;
    color: #71717a;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tool-group-content {
    display: flex;
    align-items: center;
}

.token-modal-box {
    background-color: var(--bg-panel);
    padding: 16px 24px;
    width: 340px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.token-modal-lbl {
    color: var(--text-muted);
    font-size: 9pt;
    font-weight: bold;
    text-align: left;
}

.token-modal-box input[type="text"], .token-modal-box select {
    background-color: var(--bg-button);
    color: var(--text-main);
    border: none;
    padding: 6px;
    font-size: 9pt;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-family);
    margin-bottom: 4px;
}

.token-modal-box input[type="range"] {
    width: 100%;
    margin-bottom: 6px;
}