* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

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

h1 {
    font-size: 2.5em;
    background: linear-gradient(90deg, #00ff88, #00aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.status {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.1em;
}

#training-status {
    padding: 5px 15px;
    border-radius: 20px;
    background: #ff4444;
}

#training-status.active {
    background: #00ff88;
    color: #000;
}

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

.canvas-container {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
}

#world-canvas {
    display: block;
    background: #0a0e27;
}

.energy-bar {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #00ff88;
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ffaa00, #00ff88);
    width: 50%;
    transition: width 0.3s;
}

#energy-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    text-shadow: 0 0 5px #000;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.control-group h3 {
    margin-bottom: 15px;
    color: #00ff88;
}

.btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #00ff88;
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    background: #00cc6a;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.btn-danger {
    background: #ff4444;
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #cc0000;
}

.btn-success {
    background: #00aaff;
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background: #0088cc;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat:last-child {
    border-bottom: none;
}

.stat label {
    color: #aaa;
}

.stat span {
    color: #00ff88;
    font-weight: bold;
}

#models-list {
    max-height: 200px;
    overflow-y: auto;
}

.model-item {
    padding: 10px;
    margin-bottom: 5px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-item button {
    padding: 5px 10px;
    background: #00aaff;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
}
