
:root {
    --primary-color: #4a90e2;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 900px;
    width: 100%;
}

header { text-align: center; margin-bottom: 30px; }

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

/* 画板样式：黑底白字，为了匹配 MNIST */
canvas {
    background-color: #000;
    border-radius: 8px;
    cursor: crosshair;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    transition: all 0.2s;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: #357abd; }

.btn-secondary { background-color: #e74c3c; color: white; }
.btn-outline { border: 2px solid var(--primary-color); background: transparent; color: var(--primary-color); }
.btn-outline:hover { background: var(--primary-color); color: white; }

.output-box {
    margin-top: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

#result-num {
    font-size: 80px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.analysis-section {
    margin-top: 40px;
    text-align: center;
}
.chart-img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
