/* Fonts loaded via <link> in index.html — no @import needed */

:root {
    /* Backgrounds */
    --bg-app: #111111;
    --bg-panel: #1a1a1a;
    --bg-workspace: #0d0d0d;
    --bg-canvas: #ffffff;

    /* Text */
    --text-primary: #e0e0e0;
    --text-secondary: #808080;
    --text-accent: #a0a0a0;

    /* Borders */
    --border-color: #2a2a2a;
    --border-strong: #404040;

    /* Accent — RGB channel exposed for rgba() composition */
    --accent-color: #c0392b;
    --accent-rgb: 192, 57, 43;
    --accent-dim: #7a1f18;
    --accent-gold: #5a5a5a;

    /* Surfaces */
    --ink-dark: #050505;

    /* Layout */
    --menu-height: 30px;
    --toolbar-height: 46px;
    --statusbar-height: 26px;
    --sidebar-width: 260px;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-mono: 'Special Elite', 'Courier New', monospace;
    --font-ui: 'Oswald', 'Arial Narrow', sans-serif;

    /* Transitions */
    --transition-fast: 0.1s ease;
    --transition-ui: 0.15s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-app);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23111111'/%3E%3Ccircle cx='1' cy='1' r='0.6' fill='%23080808' opacity='0.5'/%3E%3Ccircle cx='3' cy='3' r='0.6' fill='%23080808' opacity='0.5'/%3E%3C/svg%3E");
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.main-workspace {
    display: flex;
    flex: 1 1 0;
    overflow: hidden;
}

.workspace-area {
    flex-grow: 1;
    background-color: var(--bg-workspace);
    background-image: linear-gradient(135deg, var(--bg-workspace) 0%, var(--bg-panel) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 40px;
    position: relative;
    min-width: 0;
    min-height: 0;
}

.workspace-area .canvas-container {
    position: absolute !important;
    background-color: #d0d0d0;
    background-image:
        linear-gradient(45deg, #c0c0c0 25%, transparent 25%, transparent 75%, #c0c0c0 75%),
        linear-gradient(45deg, #c0c0c0 25%, transparent 25%, transparent 75%, #c0c0c0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    box-shadow:
        0 0 0 2px var(--border-strong),
        0 0 0 4px var(--ink-dark),
        0 8px 40px rgba(var(--accent-rgb), 0.4),
        0 2px 8px rgba(0, 0, 0, 0.6);
    cursor: crosshair;
}

#brush-cursor-overlay {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    border: 1.5px solid rgba(var(--accent-rgb), 0.7);
    box-shadow: 0 0 0 1px rgba(232, 223, 200, 0.3);
    background-color: transparent;
    transform: translate(-50%, -50%);
    display: none;
}

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.custom-modal {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-strong);
    border-top: 2px solid var(--accent-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
    padding: 20px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-modal-message {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.custom-modal-input {
    background-color: var(--ink-dark);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    padding: 8px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    outline: none;
    width: 100%;
}

.custom-modal-input:focus {
    border-color: var(--accent-color);
}

.custom-modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.custom-modal-btn {
    background: none;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    padding: 6px 12px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.15s;
}

.custom-modal-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.custom-modal-btn.confirm {
    border-color: var(--accent-dim);
    color: var(--text-primary);
}

.custom-modal-btn.confirm:hover {
    background-color: var(--accent-dim);
}

.custom-modal-scroll::-webkit-scrollbar {
    width: 4px;
}

.custom-modal-scroll::-webkit-scrollbar-track {
    background: var(--ink-dark);
}

.custom-modal-scroll::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 0;
}

.custom-modal-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dim);
}