body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#start-training {
    background-color: #2ecc71;
    color: white;
}

#start-training:hover {
    background-color: #27ae60;
}

#stop-training {
    background-color: #e74c3c;
    color: white;
}

#stop-training:hover {
    background-color: #c0392b;
}

button:disabled {
    background-color: #95a5a6 !important;
    cursor: not-allowed;
}

#status {
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-family: monospace;
}

#game-container {
    width: 400px;
    height: 400px;
    border: 2px solid #bdc3c7;
    position: relative;
    background-color: #f9f9f9;
    margin: 0 auto;
}

.snake-segment {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #3498db;
    border: 1px solid #2980b9;
    border-radius: 3px;
    transition: all 0.1s;
}

.snake-head {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #e74c3c;
    border: 1px solid #c0392b;
    border-radius: 4px;
    z-index: 2;
}

.food {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #2ecc71;
    border-radius: 50%;
    z-index: 1;
    animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(0.9); }
    to { transform: scale(1.1); }
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    background-color: #ecf0f1;
    padding: 10px;
    border-radius: 5px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    font-size: 12px;
    color: #7f8c8d;
}

#model-summary {
    background-color: #34495e;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 14px;
}

.snake-head, .snake-segment, .food {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 2px;
    transition: all 0.1s ease-out;
}

.snake-head {
    background-color: #4CAF50;
    z-index: 10;
    border-radius: 4px;
}

.snake-segment {
    background-color: #8BC34A;
    z-index: 5;
}

.food {
    background-color: #F44336;
    z-index: 5;
    border-radius: 50%;
}