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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.tavle-page {
    background: #edf2f7;
}

#toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 10px 14px;
    background: rgba(248, 250, 252, 0.96);
    border-bottom: 1px solid #cbd5e1;
    flex-wrap: wrap;
}

.toolbar-actions,
.toolbar-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.coordinate-panel,
.geometry-panel {
    position: fixed;
    top: var(--coordinate-panel-top, calc(var(--toolbar-height, 64px) + 20px));
    left: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    transform: translateX(-50%);
}

.geometry-panel {
    top: var(--geometry-panel-top, calc(var(--toolbar-height, 64px) + 20px));
}

.coordinate-panel[hidden],
.geometry-panel[hidden] {
    display: none !important;
}

.coord-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
}

.coord-field input {
    width: 92px;
    min-height: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 4px 8px;
    font: inherit;
}

.coord-function-field input {
    width: 180px;
}

button {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    border-radius: 12px;
}

button:hover {
    background: #f8fafc;
}

.resolution-badge {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 700;
}

.fullscreen-button {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.fullscreen-button:hover {
    background: #1e40af;
}

#canvasContainer {
    width: 100%;
    height: calc(100vh - var(--toolbar-height, 64px));
    position: relative;
    background: #ffffff;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

body.is-presenter #toolbar {
    background: rgba(241, 245, 249, 0.98);
}

@media (max-width: 900px) {
    #toolbar {
        padding: 10px;
    }

    #canvasContainer {
        height: calc(100% - 112px);
    }
}
