body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
    margin: 0;
    overflow: hidden;
}

.floating-toolbar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: rgba(30, 41, 59, 0.85);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid #334155;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.floating-toolbar h1 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

.floating-toolbar p {
    color: #94a3b8;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.85rem;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    background-color: #0f172a;
    z-index: 0;
}

.toolbar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.btn {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.btn:hover {
    background-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.btn.active {
    background-color: #38bdf8;
    background-image: linear-gradient(135deg, #38bdf8, #818cf8);
    color: #0f172a;
    border: transparent;
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.4);
}

.side-palette {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 90px;
    bottom: 20px;
    background: rgba(30, 41, 59, 0.85);
    padding: 0.75rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid #334155;
    backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    align-items: center;
}

.side-palette h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #f8fafc;
    font-size: 1.2rem;
    text-align: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
}

.btn-icon {
    width: 60px;
    height: 60px;
    padding: 0;
    margin: 0 auto;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80%;
}

.btn-icon:hover {
    background-color: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
    transform: none;
}

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

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid #334155;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    min-width: 300px;
    text-align: left;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #f8fafc;
}

.modal-body {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-body label {
    font-size: 0.95rem;
    color: #cbd5e1;
}

.modal-body input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #475569;
    color: #fff;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.modal-body input:focus {
    border-color: #38bdf8;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.context-menu {
    position: absolute;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 0.5rem 0;
    min-width: 160px;
    backdrop-filter: blur(10px);
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.context-menu .menu-item {
    background: transparent;
    border: none;
    color: #cbd5e1;
    padding: 0.5rem 1rem;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}

.context-menu .menu-item:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.context-menu hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 0.25rem 0;
}
