/* Custom styles for OneSol Judge */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Code textarea */
#code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    tab-size: 4;
}

/* Pre formatted code blocks */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

pre code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
}

/* Problem page styles */
.card-header h4 {
    font-weight: 600;
}

/* Table hover effect */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Result badges */
.badge {
    font-weight: 500;
}

/* Navbar brand */
.navbar-brand {
    font-weight: 700;
}

/* Card shadows */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #code {
        font-size: 12px;
    }
}

/* Markdown content styles */
.markdown-content h1, .markdown-content h2, .markdown-content h3,
.markdown-content h4, .markdown-content h5, .markdown-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.markdown-content h2 {
    font-size: 1.25rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.markdown-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.25rem;
}

.markdown-content table {
    width: auto;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.markdown-content table th,
.markdown-content table td {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
}

.markdown-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.markdown-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.markdown-content code {
    background-color: #f1f3f5;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.markdown-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Dark mode styles */
[data-bs-theme="dark"] .markdown-content table th {
    background-color: #2d3238;
}

[data-bs-theme="dark"] .markdown-content table tr:nth-child(even) {
    background-color: #2d3238;
}

[data-bs-theme="dark"] .markdown-content code {
    background-color: #3d4349;
}

[data-bs-theme="dark"] .markdown-content pre {
    background-color: #2d3238;
}

[data-bs-theme="dark"] .markdown-content h2 {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2d3238 !important;
}

[data-bs-theme="dark"] pre.bg-light {
    background-color: #2d3238 !important;
}

/* Dark mode toggle button */
#darkModeToggle {
    border: none;
    background: transparent;
}

#darkModeToggle:hover {
    opacity: 0.8;
}

#darkModeToggle:focus {
    box-shadow: none;
}
