:root {
    --primary: #E84393;
    --primary-hover: #FD79A8;
    --accent: #6C5CE7;
    --bg: #1A0A14;
    --card: #2D1B26;
    --border: #3D2B36;
    --text: #FFFFFF;
    --text-muted: #B2BEC3;
    --radius: 12px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden; /* Prevent scrolling */
    height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: row;
    height: 100vh;
    width: 100vw;
}

/* Tools Panel */
.tools-panel {
    width: 80px;
    background-color: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1rem;
    z-index: 10;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
}

.divider {
    width: 40px;
    height: 1px;
    background-color: var(--border);
    margin: 0.5rem 0;
}

.tool-btn, .action-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.tool-btn:hover, .action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transform: translateY(-2px);
}

.tool-btn.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(232, 67, 147, 0.4);
}

.action-btn.primary {
    background-color: var(--accent);
    color: white;
}

.action-btn.primary:hover {
    background-color: #7d6df2;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

/* Color Picker & Brush Size */
.color-picker-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
}

#color-picker {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    cursor: pointer;
    border: none;
    background: none;
}

.brush-size-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0 10px;
}

#brush-size {
    writing-mode: bt-lr; /* Vertical range slider */
    -webkit-appearance: slider-vertical;
    width: 8px;
    height: 100px;
    cursor: pointer;
}

#brush-size-value {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Canvas Area */
.canvas-container {
    flex: 1;
    position: relative;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 30px 30px;
    overflow: hidden;
    cursor: crosshair;
}

#whiteboard-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Text Input */
#text-input-container {
    position: absolute;
    background: var(--card);
    border: 1px solid var(--primary);
    border-radius: 4px;
    padding: 4px;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#canvas-text-input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    padding: 4px 8px;
    font-size: 16px;
}

/* Status Bar */
.status-bar {
    position: absolute;
    bottom: 0;
    left: 80px;
    right: 0;
    height: 30px;
    background-color: rgba(45, 27, 38, 0.8);
    backdrop-filter: blur(5px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .app-container {
        flex-direction: column-reverse;
    }
    .tools-panel {
        width: 100%;
        height: auto;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid var(--border);
        padding: 0.75rem 1rem;
        justify-content: space-around;
    }
    .tool-group {
        flex-direction: row;
        width: auto;
    }
    .divider {
        width: 1px;
        height: 30px;
        margin: 0 0.5rem;
    }
    #brush-size {
        -webkit-appearance: slider-horizontal;
        width: 60px;
        height: 8px;
    }
    .status-bar {
        left: 0;
        bottom: 75px; /* Above mobile tools panel */
    }
}
