@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #f1f5f9;
    --toolbar-bg: rgba(255, 255, 255, 0.85);
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-border: rgba(255, 255, 255, 0.4);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#canvas-container {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Toolbar */
.toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--toolbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border) !important;
    padding: 8px 14px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 1000;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: 98vw;
    overflow-x: auto;
}

@keyframes slideUp {
    to { transform: translateX(-50%) translateY(0); }
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-tool {
    width: 38px;
    height: 38px;
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    transition: all 0.25s ease !important;
    flex-shrink: 0;
}

.btn-tool:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--accent-color) !important;
    transform: scale(1.05);
}

.btn-tool.active {
    background: var(--accent-color) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
}

.no-caret::after { display: none !important; }

/* Color Picker */
.color-picker-wrapper {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.color-picker-wrapper:hover { transform: scale(1.1); }

#colorPicker, #textColorPicker {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    cursor: pointer;
    border: none;
    background: transparent;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    padding: 6px 14px;
    background: var(--accent-color);
    color: white;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0 20px 20px 20px;
    white-space: nowrap;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    display: none;
}

/* Overlay & User Setup */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(12px);
    z-index: 1999;
}

.user-setup {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    z-index: 2000;
    max-width: 480px;
    width: 90%;
    text-align: center;
}

/* Dark Mode */
body.dark-mode {
    --bg-color: #0f172a;
    --toolbar-bg: rgba(30, 41, 59, 0.85);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

body.dark-mode .user-setup {
    background: #1e293b;
    color: white;
}

body.dark-mode .btn-light {
    background: transparent !important;
    color: var(--text-secondary) !important;
}

body.dark-mode .btn-light:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--accent-color) !important;
}

/* Dropdown */
.dropdown-menu-dark {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.dropdown-item {
    padding: 10px 20px !important;
    font-size: 14px !important;
}

.dropdown-item:hover {
    background-color: var(--accent-color) !important;
}

.dropup .dropdown-menu {
    margin-bottom: 20px !important;
}

/* Toast */
.toast {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease;
}

/* Modal list items */
#serverSavesList .list-group-item {
    border-radius: 8px !important;
    margin-bottom: 4px;
}
