html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#app {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.kos-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.kos-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: #252526;
    border-bottom: 1px solid #3c3c3c;
}

.kos-header h1 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.kos-status {
    font-size: 0.85rem;
    color: #6e9955;
}

.kos-status.has-errors {
    color: #f48771;
}

.kos-spacer {
    flex: 1;
}

.kos-button {
    background: #0e639c;
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    border-radius: 2px;
    cursor: pointer;
}

.kos-button:hover:not(:disabled) {
    background: #1177bb;
}

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

.kos-editor {
    flex: 1;
    min-height: 0;
}

.kos-share-toast {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: #252526;
    color: #d4d4d4;
    border: 1px solid #3c3c3c;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    color: #333;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

    .loading-progress circle:last-child {
        stroke: #0e639c;
        stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
        transition: stroke-dasharray 0.05s ease-in-out;
    }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }
