/* General Layout */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Course Cards */
.course-card {
    transition: transform 0.2s;
    margin-bottom: 1.5rem;
}

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

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

/* Section Styling */
.section-list {
    margin-left: 1.5rem;
}

.section-item {
    border-left: 2px solid #e2e8f0;
    padding-left: 1rem;
    margin: 1rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Problem Cards */
.problem-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.problem-identifier {
    font-weight: 600;
    color: #2d3748;
}

.problem-text {
    margin: 0.5rem 0;
    white-space: pre-wrap;
}

.problem-metadata {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #718096;
}

/* Rating Badges */
.rating-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.rating-difficulty {
    background-color: #fed7d7;
    color: #9b2c2c;
}

.rating-banger {
    background-color: #c6f6d5;
    color: #276749;
}

/* Comparison Interface */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.comparison-card {
    border: 2px solid transparent;
    transition: all 0.2s;
}

.comparison-card:hover {
    border-color: #4299e1;
}

.comparison-card.selected {
    border-color: #48bb78;
    background-color: #f0fff4;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.form-error {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Progress Bars */
.progress-container {
    width: 100%;
    background-color: #edf2f7;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 0.5rem;
    background-color: #4299e1;
    transition: width 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #4299e1;
    color: white;
}

.btn-primary:hover {
    background-color: #3182ce;
}

.btn-secondary {
    background-color: #718096;
    color: white;
}

.btn-secondary:hover {
    background-color: #4a5568;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #c6f6d5;
    color: #276749;
}

.alert-error {
    background-color: #fed7d7;
    color: #9b2c2c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }

    .section-list {
        margin-left: 0.5rem;
    }
}

/* Add this to your main.css */

.tikz-image {
    text-align: center;
    margin: 1.5rem 0;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    position: relative;
    min-height: 100px;
    transition: all 0.3s ease;
}

.tikz-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: opacity 0.5s ease;
}

/* Add a subtle shadow effect on hover */
.tikz-image:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Add a small icon to indicate TikZ diagrams */
.tikz-diagram-wrapper {
    position: relative;
    margin: 1rem auto; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.tikz-diagram {
    max-width: 500px;
    width: 100%;
    height: auto;
    transition: width 0.2s ease, max-width 0.2s ease;
}

.tikz-controls-mini {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    gap: 2px;
    opacity: 0.2;
    transition: opacity 0.2s ease;
}

.tikz-diagram-wrapper:hover .tikz-controls-mini {
    opacity: 1;
}

.tikz-controls-mini button {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #ccc;
    background: white;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tikz-controls-mini button:hover {
    background: #f0f0f0;
}

/* Enumerate list styling with depth-based numbering */
/* First level: letters (a, b, c) */
.latex-enumerate {
    list-style-type: lower-alpha;
}

/* Second level: roman numerals (i, ii, iii) */
.latex-enumerate .latex-enumerate {
    list-style-type: lower-roman;
}

/* Third level: roman numerals in parentheses ((i), (ii), (iii)) */
.latex-enumerate .latex-enumerate .latex-enumerate {
    list-style-type: none; /* Remove default marker */
    counter-reset: item;
}

.latex-enumerate .latex-enumerate .latex-enumerate li {
    counter-increment: item;
}

.latex-enumerate .latex-enumerate .latex-enumerate li::before {
    content: "(" counter(item, lower-roman) ") ";
    margin-right: 0.5em;
}

/* Fourth level and beyond: back to numbers */
.latex-enumerate .latex-enumerate .latex-enumerate .latex-enumerate {
    list-style-type: decimal;
}