/* Coding Problems Styles */
.coding-problem-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.coding-problem-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Search filters container */
.search-filters-container {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

@media (max-width: 768px) {
    .search-filters-container {
        padding: 0.75rem;
    }
}

.difficulty-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.code-editor {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.problem-description {
    line-height: 1.6;
}

.problem-description h5, .problem-description h6 {
    color: #495057;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.problem-description pre {
    font-size: 0.875rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.submission-status {
    font-weight: 600;
}

.test-case-item {
    background-color: #f8f9fa;
    border-radius: 8px;
}

.test-case-item:hover {
    background-color: #e9ecef;
}

.badge-lg {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .code-editor {
        font-size: 12px;
    }
    
    .problem-description pre {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

/* Admin specific styles */
.admin-coding-problems .table th {
    background-color: #f8f9fa;
    border-top: none;
}

.admin-coding-problems .badge {
    font-size: 0.75rem;
}

.admin-coding-problems .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Syntax highlighting for code blocks */
.code-block {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    overflow-x: auto;
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Error states */
.submission-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.submission-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.submission-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Problem show page specific styles */
.problem-show-container {
    min-height: calc(100vh - 200px);
    padding-bottom: 100px;
}

.problem-description h5,
.problem-description h6,
.problem-description p,
.problem-description pre,
.problem-description strong {
    color: #333 !important;
}

.code-editor-container {
    overflow-y: auto;
    max-height: 80vh;
}

.bottom-spacing {
    height: 150px;
}