@font-face {
    font-family: "Computer Modern";
    src: url('computer-modern.otf');
}

body {
    font-family: Computer Modern;
    background-color: #f5f5f5;
    margin: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.container {
    display: flex;
    gap: 2rem;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    align-items: flex-start;
    flex-wrap: wrap; /* allows wrapping on small screens */
}

.canvas-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 300px; /* grows, shrinks, base width */
}

.canvas-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
}

canvas {
    border: 2px solid #333;
    background: white;
    cursor: crosshair;
    image-rendering: pixelated;
    width: 300px;
    height: 300px;
    border-radius: 8px;
}

.button-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #999;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background-color: #e0e0e0;
    border-color: #666;
}

.predictions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1 1 200px; /* grows, shrinks, base width */
    min-width: 200px;
}

.prediction-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    background-color: #fafafa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.prediction-item p {
    margin: 0;
    font-size: 0.95rem;
}

.prediction-item img {
    width: 24px;
    height: 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .classifier-container {
        flex-direction: column;
        align-items: center;
    }

    .canvas-section, .predictions {
        flex: 1 1 100%;
        max-width: 400px;
    }

    canvas {
        width: 250px;
        height: 250px;
    }
}