/* Main layout styles */
html,
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
}

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

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

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    display: flex;
    padding: 0 1rem;
}

.top-row h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.top-row ::deep a,
.top-row .btn-link {
    white-space: nowrap;
    text-decoration: none;
    color: #007bff;
}

.top-row ::deep a:hover,
.top-row .btn-link:hover {
    text-decoration: underline;
}

/* Code editor and output styles */
.output-area {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    background-color: #1e1e1e;
    color: #d4d4d4;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Monaco Editor container */
#editor {
    border: 1px solid #dee2e6;
    border-radius: 0;
    height: 400px;
    width: 100%;
}

/* Button styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsive design */
@media (max-width: 767.98px) {
    .top-row {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        text-align: center;
    }

    .top-row h1 {
        margin-bottom: 0.5rem;
    }

    .top-row a {
        margin-left: 0;
    }

    #editor {
        height: 300px;
    }
}

@media (min-width: 768px) {
    .top-row {
        padding: 0 2rem;
    }
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
}

/* Custom scrollbar for output area */
.output-area::-webkit-scrollbar {
    width: 8px;
}

.output-area::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.output-area::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.output-area::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.output-area {
    height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: 'Consolas', monospace;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    color: black;
}