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

    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f0f0f0;
    user-select: none;
}

h1 {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1;
    margin: 1rem;
    color: #333;
}

img {
    pointer-events: none;
}

.kursor--5,
.kursorChild--5 {
    transition: none !important;
}

.kursor--5.kursor--down {
    width: 10px !important;
    height: 10px !important;
}

.link-actions,
.zoom-actions,
.color-actions {
    position: fixed;
    margin: 1rem;
    z-index: 1;
}

.link-actions {
    bottom: 10px;
    right: 10px;
}

.zoom-actions {
    bottom: 10px;
    left: 10px;
}

.color-actions {
    top: 50%;
    transform: translateY(-50%);
    left: 10px;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 0.1rem;
    margin-top: 0.1rem;
}

.color-actions .color-btn,
.color-actions #toggleCollapse,
.color-actions input[type="color"],
.color-actions #decreaseStrokeSize,
.color-actions #increaseStrokeSize,
.color-actions #strokeSize {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 1rem;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.zoom-actions button {
    padding: 0.8rem 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.color-btn.selected {
    border: 2px solid #333;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.color-options.collapsed {
    display: none;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 240, 240, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    font-size: 1.2rem;
    color: #333;
}

#loadingOverlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 50rem) {

    .color-actions .color-btn,
    .color-actions #toggleCollapse,
    .color-actions input[type="color"],
    .color-actions #decreaseStrokeSize,
    .color-actions #increaseStrokeSize,
    .color-actions #strokeSize {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .color-actions img {
        width: 24px;
        height: 24px;
    }
}