html,
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    min-height: 100%;
    background: #101010;
    color: #f4f2ed;
}

a,
.btn-link {
    color: #9dc1ff;
}

button,
input,
textarea {
    font: inherit;
}

button {
    min-height: 42px;
    border: 1px solid #525252;
    border-radius: 6px;
    background: #272727;
    color: #f4f2ed;
    padding: 0.55rem 0.85rem;
}

button:hover {
    background: #343434;
}

.primary-action {
    border-color: #8db3ff;
    background: #275a9f;
}

.page {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #151515;
    border-right: 1px solid #2f2f2f;
}

main {
    flex: 1;
    min-width: 0;
}

.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid #2f2f2f;
    color: #bdb7ad;
}

.content {
    padding-top: 1rem;
}

.navbar-brand {
    color: #ffffff;
}

.nav-link {
    color: #cfc9c0;
}

.nav-link.active {
    color: #ffffff;
    font-weight: 700;
}

.teleprompter-shell {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 1rem;
    height: calc(100vh - 5.5rem);
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.control-panel h1 {
    margin: 0;
    font-size: 1.75rem;
}

.control-panel p {
    margin: 0.35rem 0 0;
    color: #c8c0b4;
}

.upload-row,
.transport {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.file-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border: 1px solid #6d6d6d;
    border-radius: 6px;
    background: #f4f2ed;
    color: #151515;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
}

.file-picker input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.setting,
.font-control {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #d5cfc5;
}

.setting input {
    width: 6rem;
    min-height: 42px;
    border: 1px solid #555;
    border-radius: 6px;
    background: #181818;
    color: #ffffff;
    padding: 0.35rem 0.5rem;
}

.font-control input {
    width: 9rem;
}

.script-summary {
    display: grid;
    gap: 0.25rem;
    border-left: 3px solid #8db3ff;
    padding-left: 0.8rem;
    color: #d8d2c8;
}

.script-summary strong {
    color: #ffffff;
}

.status.error {
    border: 1px solid #a84242;
    border-radius: 6px;
    background: #351b1b;
    color: #ffd9d9;
    padding: 0.75rem;
}

.markdown-editor {
    display: grid;
    gap: 0.55rem;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: #d8d2c8;
}

.editor-header span {
    color: #aeadab;
}

.markdown-editor textarea {
    width: 100%;
    min-height: 12rem;
    resize: vertical;
    border: 1px solid #555;
    border-radius: 6px;
    background: #080808;
    color: #f4f2ed;
    padding: 0.75rem;
    line-height: 1.45;
}

.stage {
    min-width: 0;
    min-height: 0;
}

.prompter-window,
.empty-state {
    height: 100%;
    min-height: 420px;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    background: #050505;
}

.prompter-window {
    overflow-y: auto;
    scroll-behavior: auto;
    padding: 0 clamp(1rem, 4vw, 4rem);
}

.prompter-spacer {
    height: 38vh;
}

.script-line {
    margin: 0 0 1.1em;
    font-size: var(--prompter-font-size);
    line-height: 1.45;
    letter-spacing: 0;
    color: #f6f1e8;
    text-wrap: balance;
}

.empty-state {
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 2rem;
    text-align: center;
    color: #c8c0b4;
}

.empty-state h2 {
    margin: 0 0 0.5rem;
    color: #ffffff;
}

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

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

@media (max-width: 900px) {
    .page {
        display: block;
    }

    .sidebar {
        width: auto;
        border-right: 0;
        border-bottom: 1px solid #2f2f2f;
    }

    .top-row {
        display: none;
    }

    .content {
        padding: 0.75rem;
    }

    .teleprompter-shell {
        grid-template-columns: 1fr;
        height: auto;
    }

    .prompter-window,
    .empty-state {
        height: 62vh;
        min-height: 360px;
    }

    .script-line {
        font-size: min(var(--prompter-font-size), 12vw);
    }
}
