Files
evolution/src/apps/SnakeAI/SnakeAI.css
Peter Stockings 0c53496e9b Initial commit
2026-01-10 09:13:28 +11:00

476 lines
9.0 KiB
CSS

.snake-ai-layout {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 2rem;
height: 100%;
padding: 1rem;
}
.left-panel,
.right-panel {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
/* Canvas */
.snake-canvas-container {
display: flex;
flex-direction: column;
gap: 1rem;
align-items: center;
}
/* Snake Grid */
.snake-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
width: 100%;
max-width: 700px;
}
.snake-grid-cell {
position: relative;
background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
border-radius: 8px;
border: 2px solid #3a3a4e;
padding: 0.5rem;
transition: all 0.3s ease;
}
.snake-grid-cell:hover {
transform: scale(1.05);
border-color: #4ecdc4;
box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
z-index: 10;
}
.snake-grid-cell.best {
border-color: #4ecdc4;
background: linear-gradient(135deg, rgba(78, 205, 196, 0.15) 0%, #1a1a2e 100%);
box-shadow: 0 0 20px rgba(78, 205, 196, 0.2);
}
.snake-grid-label {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
font-size: 0.85rem;
font-weight: 600;
color: #4ecdc4;
}
.snake-grid-cell.best .snake-grid-label {
color: #4ecdc4;
text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}
.fitness-badge {
background: #3a3a4e;
padding: 0.2rem 0.5rem;
border-radius: 12px;
font-size: 0.75rem;
color: #fff;
}
.snake-grid-cell.best .fitness-badge {
background: linear-gradient(135deg, #4ecdc4 0%, #44a59d 100%);
}
.snake-grid-cell canvas {
width: 100%;
height: auto;
}
.canvas-info {
display: flex;
gap: 2rem;
padding: 0.75rem 1.5rem;
background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
border-radius: 8px;
border: 1px solid #3a3a4e;
}
.info-item {
display: flex;
gap: 0.5rem;
align-items: baseline;
}
.info-item .label {
color: #888;
font-size: 0.9rem;
}
.info-item .value {
color: #4ecdc4;
font-weight: 600;
font-size: 1.1rem;
}
/* Controls */
.controls-panel {
background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
padding: 1.5rem;
border-radius: 12px;
border: 1px solid #3a3a4e;
}
.controls-panel h3 {
margin: 0 0 1.5rem 0;
color: #fff;
font-size: 1.2rem;
}
.control-group {
margin-bottom: 1.5rem;
}
.control-group:last-child {
margin-bottom: 0;
}
.button-group {
display: flex;
gap: 0.75rem;
}
.btn {
flex: 1;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
font-family: inherit;
}
.btn-play {
background: linear-gradient(135deg, #4ecdc4 0%, #44a59d 100%);
color: #fff;
}
.btn-play:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}
.btn-pause {
background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
color: #fff;
}
.btn-pause:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}
.btn-reset {
background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
color: #fff;
}
.btn-reset:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}
.control-group label {
display: block;
margin-bottom: 0.5rem;
color: #ccc;
font-size: 0.95rem;
}
.control-group label strong {
color: #4ecdc4;
}
input[type='range'] {
width: 100%;
height: 6px;
border-radius: 3px;
background: #3a3a4e;
outline: none;
-webkit-appearance: none;
}
input[type='range']::-webkit-slider-thumb {
appearance: none;
-webkit-appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
background: linear-gradient(135deg, #4ecdc4 0%, #44a59d 100%);
cursor: pointer;
box-shadow: 0 2px 8px rgba(78, 205, 196, 0.4);
transition: all 0.2s ease;
}
input[type='range']::-webkit-slider-thumb:hover {
transform: scale(1.2);
}
input[type='range']::-moz-range-thumb {
width: 18px;
height: 18px;
border-radius: 50%;
background: linear-gradient(135deg, #4ecdc4 0%, #44a59d 100%);
cursor: pointer;
border: none;
box-shadow: 0 2px 8px rgba(78, 205, 196, 0.4);
}
.slider-labels {
display: flex;
justify-content: space-between;
margin-top: 0.25rem;
font-size: 0.8rem;
color: #888;
}
.control-info {
background: #1a1a2e;
padding: 1rem;
border-radius: 8px;
border: 1px solid #3a3a4e;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.info-label {
color: #888;
font-size: 0.9rem;
}
.info-value {
color: #4ecdc4;
font-weight: 600;
font-size: 1.1rem;
}
/* Stats */
.stats-panel {
background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
padding: 1.5rem;
border-radius: 12px;
border: 1px solid #3a3a4e;
}
.stats-panel h3 {
margin: 0 0 1.5rem 0;
color: #fff;
font-size: 1.2rem;
}
.stat-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
margin-bottom: 1.5rem;
}
.stat-item {
background: #1a1a2e;
padding: 1rem;
border-radius: 8px;
border: 1px solid #3a3a4e;
text-align: center;
}
.stat-item.highlight {
border-color: #4ecdc4;
background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, #1a1a2e 100%);
}
.stat-label {
color: #888;
font-size: 0.85rem;
margin-bottom: 0.5rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.stat-value {
color: #4ecdc4;
font-size: 1.8rem;
font-weight: 700;
}
.progress-indicator {
background: #1a1a2e;
padding: 1rem;
border-radius: 8px;
border: 1px solid #3a3a4e;
}
.progress-label {
color: #ccc;
font-size: 0.9rem;
margin-bottom: 0.5rem;
}
.progress-bar {
width: 100%;
height: 8px;
background: #3a3a4e;
border-radius: 4px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #4ecdc4 0%, #44a59d 100%);
transition: width 0.3s ease;
box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}
/* Tips */
.tips-panel {
background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
padding: 1.5rem;
border-radius: 12px;
border: 1px solid #3a3a4e;
max-height: 600px;
overflow-y: auto;
}
.tips-panel h3 {
margin: 0 0 1.5rem 0;
color: #fff;
font-size: 1.2rem;
}
.tip-section {
margin-bottom: 1.5rem;
}
.tip-section:last-child {
margin-bottom: 0;
}
.tip-section h4 {
color: #4ecdc4;
font-size: 1rem;
margin: 0 0 0.75rem 0;
}
.tip-section p {
color: #ccc;
line-height: 1.6;
margin: 0 0 0.75rem 0;
}
.tip-section ul,
.tip-section ol {
color: #ccc;
line-height: 1.8;
margin: 0;
padding-left: 1.5rem;
}
.tip-section li {
margin-bottom: 0.5rem;
}
.tip-section strong {
color: #4ecdc4;
font-weight: 600;
}
/* Scrollbar styling for tips panel */
.tips-panel::-webkit-scrollbar {
width: 8px;
}
.tips-panel::-webkit-scrollbar-track {
background: #1a1a2e;
border-radius: 4px;
}
.tips-panel::-webkit-scrollbar-thumb {
background: #3a3a4e;
border-radius: 4px;
}
.tips-panel::-webkit-scrollbar-thumb:hover {
background: #4a4a5e;
}
/* Responsive */
@media (max-width: 1200px) {
.snake-ai-layout {
grid-template-columns: 1fr;
}
.stat-grid {
grid-template-columns: repeat(3, 1fr);
}
}
/* Best Snake Display */
.best-snake-panel {
background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
padding: 1.5rem;
border-radius: 12px;
border: 2px solid #4ecdc4;
box-shadow: 0 0 20px rgba(78, 205, 196, 0.15);
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
.best-header {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-bottom: 0.5rem;
}
.best-header h3 {
margin: 0;
color: #4ecdc4;
font-size: 1.4rem;
text-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}
.best-stats {
display: flex;
gap: 0.75rem;
align-items: baseline;
background: rgba(78, 205, 196, 0.1);
padding: 0.5rem 1rem;
border-radius: 20px;
border: 1px solid rgba(78, 205, 196, 0.3);
}
.best-stats .label {
color: #ccc;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.best-stats .value {
color: #fff;
font-weight: 700;
font-size: 1.2rem;
}
.best-canvas-wrapper {
padding: 1rem;
background: #151525;
border-radius: 12px;
border: 1px solid #3a3a4e;
}