/* Rubik visualizer styles */
.rubik-container {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #e2e8f0;
    background: #0f172a;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #1e293b;
}

.rubik-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rubik-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

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

.rubik-canvas-container {
    background: #020617;
    border-radius: 8px;
    position: relative;
    aspect-ratio: 1;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #1e293b;
    overflow: hidden;
}

.rubik-canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    outline: none;
}

.rubik-panel {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rubik-btn {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rubik-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.rubik-btn-secondary {
    background: #334155;
}

.rubik-btn-secondary:hover {
    background: #475569;
}

.rubik-btn-accent {
    background: #059669;
}

.rubik-btn-accent:hover {
    background: #047857;
}

.rubik-controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rubik-moves-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.rubik-move-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.rubik-move-btn:hover {
    background: #334155;
    color: white;
}

.rubik-status-box {
    background: #020617;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid #1e293b;
    max-height: 150px;
    overflow-y: auto;
}

.status-solved {
    color: #10b981;
}

.status-scrambled {
    color: #f59e0b;
}

.rubik-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.rubik-step-item {
    padding: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid #64748b;
    font-size: 0.85rem;
}

.rubik-step-item.active {
    background: rgba(37, 99, 235, 0.1);
    border-left-color: #2563eb;
}

.rubik-step-item.solved {
    border-left-color: #10b981;
}

.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #38bdf8;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CSS Drawn Visual Cube Nets */
.visual-net-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.visual-net {
    display: grid;
    grid-template-columns: repeat(4, 30px);
    grid-template-rows: repeat(3, 30px);
    gap: 2px;
    background: #020617;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #1e293b;
}

.vn-cell {
    width: 30px;
    height: 30px;
    border-radius: 3px;
    border: 1px solid #000;
}

.vn-empty {
    border: none;
    background: transparent;
}

.vn-u { background: #ffffff; }
.vn-d { background: #ffd700; }
.vn-f { background: #009b48; }
.vn-b { background: #0045ad; }
.vn-l { background: #ff5800; }
.vn-r { background: #b71234; }
.vn-k { background: #334155; } /* Highlighted/Target piece */
.vn-grey { background: #475569; } /* Unrelated/ignored piece */

