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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

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

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

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

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.cube-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#cubeCanvas {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    background: #f8f9fa;
    display: block;
    cursor: grab;
}

#cubeCanvas:active {
    cursor: grabbing;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

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

.section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.section h2 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 1.5em;
}

.move-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.move-btn {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
}

.move-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.move-btn:active {
    transform: scale(0.95);
}

.solution-box, .history-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
}

.solution-box {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
}

.history-box {
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.placeholder {
    color: #999;
    font-style: italic;
}

.solution-stats {
    margin-top: 10px;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 5px;
    font-size: 14px;
    color: #0066cc;
    display: none;
}

.solution-stats.show {
    display: block;
}

.history-entry {
    padding: 5px;
    border-bottom: 1px solid #dee2e6;
}

.history-entry:last-child {
    border-bottom: none;
}

footer {
    text-align: center;
    color: white;
    padding: 20px;
    opacity: 0.9;
}

.solution-box::-webkit-scrollbar,
.history-box::-webkit-scrollbar {
    width: 8px;
}

.solution-box::-webkit-scrollbar-track,
.history-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.solution-box::-webkit-scrollbar-thumb,
.history-box::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.solution-box::-webkit-scrollbar-thumb:hover,
.history-box::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}
