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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
}

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

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: #8892b0;
}

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

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

.cube-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
}

#cube-container {
    width: 100%;
    height: 400px;
    position: relative;
}

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

.cube-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.cube-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.input-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
}

.input-section h3 {
    margin-bottom: 15px;
    color: #00d4ff;
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.color-btn {
    padding: 10px 15px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.color-btn.active {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.hint {
    color: #8892b0;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.input-mode {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.input-mode label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.net-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    max-width: 300px;
}

.net-sticker {
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.net-sticker:hover {
    border-color: #00d4ff;
}

.action-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.solve-button {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00d4ff, #7b2cbf);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.solve-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

button.secondary {
    padding: 15px 30px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.solution-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
}

.solution-panel h3 {
    margin-bottom: 15px;
    color: #00d4ff;
}

.solution-info {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    color: #8892b0;
}

.move-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.move {
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    font-family: monospace;
    font-size: 1rem;
}

.move.current {
    background: #00d4ff;
    color: #1a1a2e;
}

.playback-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.playback-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.playback-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#speed-slider {
    width: 100%;
    margin-top: 10px;
}

.error-panel {
    background: rgba(255, 68, 68, 0.2);
    border: 2px solid #ff4444;
    border-radius: 12px;
    padding: 20px;
    color: #ff8888;
}
