
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Warm Neutral Palette */
    --bg-deep: #0f0e0d;
    --bg-main: #171615;
    --bg-card: #1f1d1b;
    --bg-elevated: #282523;
    --bg-hover: #322f2b;
    
    /* Accent */
    --accent: #e8a54b;
    --accent-soft: #d4944a;
    --accent-muted: rgba(232, 165, 75, 0.15);
    
    /* Text */
    --text-primary: #f5f0e8;
    --text-secondary: #a39e94;
    --text-muted: #6b665d;
    
    /* Cube Face Colors - Vibrant */
    --face-white: #ffffff;
    --face-yellow: #ffcc00;
    --face-red: #ff3333;
    --face-orange: #ff8c00;
    --face-blue: #0066ff;
    --face-green: #00cc44;
    
    /* Functional */
    --success: #4aab6b;
    --error: #c94a4a;
    
    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    
    /* Typography */
    --font-sans: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 200ms;
    
    /* Mobile safe areas */
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Base Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* Subtle texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

::selection {
    background: var(--accent);
    color: var(--bg-deep);
}

/* layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-main);
    border-bottom: 1px solid var(--bg-elevated);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon .icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

/* Lucide icon styles */
.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.mobile-nav-icon {
    width: 22px;
    height: 22px;
}

.logo h1 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Navigation - Desktop */
.nav-tabs {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-1);
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.nav-tab {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.867rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease-out);
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-tab.active {
    color: var(--bg-deep);
    background: var(--accent);
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    gap: var(--space-5);
    padding: var(--space-5);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 3D VIEWPORT */

.cube-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 450px;
}

#cube-container {
    width: 100%;
    height: 100%;
    min-height: 450px;
    background: 
        radial-gradient(ellipse at center, #0d1b2a 0%, #0a0a15 50%, #000005 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(100, 150, 255, 0.15);
    position: relative;
    touch-action: none;
    overflow: hidden;
}

/* Stars effect */
#cube-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(100,150,255,0.9), transparent),
        radial-gradient(1px 1px at 200px 150px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 250px 20px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 300px 100px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 350px 60px, rgba(255,200,100,0.8), transparent),
        radial-gradient(1px 1px at 400px 200px, rgba(255,255,255,0.5), transparent);
    background-repeat: repeat;
    background-size: 450px 250px;
    pointer-events: none;
    animation: twinkle 4s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes twinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Corner accent */
#cube-container::after {
    content: '';
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(100, 150, 255, 0.4);
    border-bottom: 2px solid rgba(100, 150, 255, 0.4);
    pointer-events: none;
    z-index: 1;
}

.viewport-info {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(13, 27, 42, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 100px;
    font-size: 0.733rem;
    color: rgba(200, 220, 255, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.2);
    animation: badgeFadeOut 4s ease-out forwards;
}

@keyframes badgeFadeOut {
    0%, 70% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); pointer-events: none; }
}

/*  SIDEBAR */

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

.panel {
    display: none;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-elevated);
    overflow: hidden;
}

.panel.active {
    display: block;
    animation: panelIn 0.3s var(--ease-out);
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: var(--space-4);
    border-bottom: 1px solid var(--bg-elevated);
}

.control-section {
    padding: var(--space-4);
    border-bottom: 1px solid var(--bg-elevated);
}

.control-section:last-child {
    border-bottom: none;
}

.control-section h3 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

/* MOVE BUTTONS */

.move-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.move-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
}

.move-btn {
    padding: var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid transparent;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.867rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.move-btn:hover, .move-btn:active {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.move-btn.prime {
    color: var(--text-secondary);
    background: var(--bg-main);
}

/* ACTION BUTTONS */

.action-buttons {
    display: flex;
    gap: var(--space-2);
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.867rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--duration) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.action-btn:hover {
    background: var(--bg-hover);
}

.action-btn.scramble {
    background: var(--accent);
    color: var(--bg-deep);
}

.action-btn.solve {
    background: var(--accent);
    color: var(--bg-deep);
    font-weight: 600;
}

.action-btn.reset-solver {
    margin-top: var(--space-2);
    background: transparent;
    border: 1px solid var(--bg-elevated);
}

.btn-icon {
    font-size: 1rem;
}

/* ============================================
   MOVE HISTORY
   ============================================ */

.move-history {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    padding: var(--space-3);
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    min-height: 50px;
    max-height: 80px;
    overflow-y: auto;
    margin-bottom: var(--space-3);
}

.move-history .placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.history-move {
    padding: var(--space-1) var(--space-2);
    background: var(--accent-muted);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.733rem;
    font-weight: 600;
}

/* History Actions (Undo/Redo) */
.history-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.action-btn.history-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--bg-hover);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    transition: all 0.2s var(--ease-out);
}

.action-btn.history-btn .btn-icon {
    font-size: 1rem;
}

.action-btn.history-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.action-btn.history-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.action-btn.history-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   COLOR PICKER
   ============================================ */

.color-picker {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    background: var(--swatch-color);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-card);
}

/* ============================================
   SOLVER - ENHANCED DESIGN
   ============================================ */

/* Glassmorphism Solver Panel */
.solver-panel {
    background: linear-gradient(135deg, 
        rgba(31, 29, 27, 0.98) 0%, 
        rgba(40, 37, 35, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(232, 165, 75, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.solver-panel .panel-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
}

.title-icon {
    font-size: 1.1rem;
}

/* Solving Phases Progress */
.solve-phases {
    display: flex;
    gap: 4px;
    padding: var(--space-3) var(--space-4);
    background: rgba(23, 22, 21, 0.6);
    border-bottom: 1px solid var(--bg-elevated);
}

.phase-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--space-2) var(--space-1);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    transition: all 0.3s var(--ease-out);
    opacity: 0.5;
}

.phase-step:hover {
    opacity: 0.7;
}

.phase-step.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    color: var(--bg-deep);
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(232, 165, 75, 0.3);
}

.phase-step.complete {
    background: linear-gradient(135deg, var(--success) 0%, #3d9b5e 100%);
    color: white;
    opacity: 1;
}

.phase-icon {
    font-size: 1rem;
}

.phase-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Solver Instructions */
.solver-instructions {
    padding: var(--space-4);
    background: linear-gradient(135deg, 
        rgba(232, 165, 75, 0.08) 0%, 
        rgba(232, 165, 75, 0.04) 100%);
    border-bottom: 1px solid var(--bg-elevated);
}

.instructions-text {
    font-size: 0.867rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.instructions-text strong {
    color: var(--accent);
    font-weight: 600;
}

/* Enhanced Color Picker with Counts */
.color-picker-enhanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.color-swatch-enhanced {
    aspect-ratio: 1;
    min-height: 48px;
    border-radius: var(--radius-md);
    border: 3px solid transparent;
    background: var(--swatch-color);
    cursor: pointer;
    position: relative;
    transition: all 0.2s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.color-swatch-enhanced:hover {
    transform: scale(1.08);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.color-swatch-enhanced::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: calc(var(--radius-md) + 3px);
    border: 2px solid var(--accent);
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.2s var(--ease-out);
}

.color-swatch-enhanced.active::before {
    opacity: 1;
    transform: scale(1);
}

.color-swatch-enhanced.active {
    border-color: var(--text-primary);
}

.swatch-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bg-deep);
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
    opacity: 0.9;
}

.color-swatch-enhanced[data-color="W"] .swatch-count,
.color-swatch-enhanced[data-color="Y"] .swatch-count {
    color: #333;
}

.color-swatch-enhanced.complete {
    box-shadow: 
        0 0 0 2px var(--success),
        0 4px 12px rgba(74, 171, 107, 0.4);
}

.color-swatch-enhanced.overflow {
    box-shadow: 
        0 0 0 2px var(--error),
        0 4px 12px rgba(201, 74, 74, 0.4);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Status Section */
.status-section {
    padding: var(--space-3) var(--space-4);
}

.solver-status-container {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.status-indicator.painting {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.status-indicator.ready {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.solving {
    background: var(--accent);
    animation: pulse 0.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.solver-status {
    font-size: 0.867rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Paint Progress Bar */
.paint-progress {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 100px;
    overflow: hidden;
}

.paint-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%);
    border-radius: 100px;
    width: 0%;
    transition: width 0.3s var(--ease-out);
}

/* Solver Actions */
.solver-actions {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.action-buttons-row {
    display: flex;
    gap: var(--space-3);
}

.action-btn.undo-paint {
    flex: 0 0 52px;
    height: 52px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-hover);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s var(--ease-out);
}

.action-btn.undo-paint:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}

.action-btn.undo-paint:active {
    transform: scale(0.95);
}

.action-btn.primary-solve {
    flex: 1;
    height: 52px;
    background: linear-gradient(135deg, var(--accent) 0%, #d4943f 100%);
    color: var(--bg-deep);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 
        0 4px 16px rgba(232, 165, 75, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.action-btn.primary-solve .btn-icon {
    font-size: 1.1rem;
}

.action-btn.primary-solve:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(232, 165, 75, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.action-btn.primary-solve:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(232, 165, 75, 0.3);
}

.action-btn.reset-solver {
    height: 44px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-hover);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: all 0.2s var(--ease-out);
}

.action-btn.reset-solver .btn-icon {
    font-size: 1rem;
}

.action-btn.reset-solver:hover {
    background: rgba(201, 74, 74, 0.15);
    border-color: var(--error);
    color: var(--error);
}

.action-btn.reset-solver:active {
    background: rgba(201, 74, 74, 0.25);
}

/* Solution Display */
.solution-display {
    padding: var(--space-4);
    background: linear-gradient(180deg, var(--bg-main) 0%, rgba(23, 22, 21, 0.8) 100%);
    border-top: 1px solid var(--bg-elevated);
}

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.solution-header h3 {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}

.move-count {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent);
    background: var(--accent-muted);
    padding: 2px 8px;
    border-radius: 100px;
}

/* Phase-grouped Solution Container */
.solution-phases-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    max-height: 200px;
    overflow-y: auto;
}

.solution-phase {
    padding: var(--space-3);
    background: rgba(23, 22, 21, 0.8);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
    transition: all 0.3s ease;
}

.solution-phase.active {
    border-left-color: var(--success);
    background: rgba(74, 171, 107, 0.1);
}

.solution-phase.complete {
    opacity: 0.6;
    border-left-color: var(--text-muted);
}

.phase-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.phase-header .phase-icon {
    font-size: 0.9rem;
}

.phase-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.03em;
}

.phase-move-count {
    margin-left: auto;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.phase-moves {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.solution-moves {
    padding: var(--space-3);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.867rem;
    line-height: 2;
}

.solution-moves .placeholder {
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.solution-move {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    background: var(--bg-elevated);
    border-radius: 4px;
    transition: all 0.2s var(--ease-out);
    cursor: default;
}

.solution-move:hover {
    background: var(--bg-hover);
}

.solution-move.current {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    color: var(--bg-deep);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(232, 165, 75, 0.4);
}

.solution-move.done {
    background: var(--success);
    color: white;
    opacity: 0.7;
}

.success-message {
    color: var(--success);
    font-weight: 600;
}

.error-message {
    color: var(--error);
}

/* Solution Controls */
.solution-controls {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.action-btn.play-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--success) 0%, #3d9b5e 100%);
    color: white;
}

.action-btn.step-btn {
    flex: 1;
    background: var(--bg-elevated);
}

/* ============================================
   TUTORIAL
   ============================================ */

.progress-container {
    padding: var(--space-4);
    border-bottom: 1px solid var(--bg-elevated);
}

.progress-bar {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 100px;
    transition: width 0.4s var(--ease-out);
}

.progress-text {
    font-size: 0.733rem;
    color: var(--text-muted);
}

.tutorial-steps {
    max-height: 320px;
    overflow-y: auto;
}

.tutorial-step {
    padding: var(--space-4);
    border-bottom: 1px solid var(--bg-elevated);
    cursor: pointer;
    opacity: 0.5;
    transition: all var(--duration) var(--ease-out);
}

.tutorial-step:last-child {
    border-bottom: none;
}

.tutorial-step:hover {
    opacity: 0.7;
    background: var(--bg-hover);
}

.tutorial-step.active {
    opacity: 1;
    background: var(--accent-muted);
}

.step-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.step-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--bg-deep);
    border-radius: 6px;
    font-size: 0.733rem;
    font-weight: 700;
}

.step-header h3 {
    font-size: 0.933rem;
    font-weight: 600;
}

.step-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.demo-btn {
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 0.733rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--duration);
}

.demo-btn:hover {
    background: var(--accent);
    color: var(--bg-deep);
}

.tutorial-nav {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--bg-main);
}

.nav-btn {
    flex: 1;
    padding: var(--space-3);
    background: var(--bg-elevated);
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.867rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--duration);
}

.nav-btn:hover:not(:disabled) {
    background: var(--accent);
    color: var(--bg-deep);
}

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

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 14, 13, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    padding: var(--space-4);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    max-width: 360px;
    width: 100%;
    border: 1px solid var(--bg-elevated);
}

.modal-content h2 {
    font-size: 1.1rem;
    margin-bottom: var(--space-4);
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.shortcut {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    font-size: 0.867rem;
}

.shortcut kbd {
    padding: var(--space-1) var(--space-2);
    background: var(--bg-elevated);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.733rem;
    color: var(--accent);
}

.close-modal {
    width: 100%;
    padding: var(--space-3);
    background: var(--accent);
    border: none;
    color: var(--bg-deep);
    font-family: var(--font-sans);
    font-size: 0.867rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

/* Help Button */
.help-btn {
    position: fixed;
    bottom: var(--space-5);
    right: var(--space-5);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--duration);
    z-index: 99;
}

.help-btn:hover {
    background: var(--accent);
    color: var(--bg-deep);
    border-color: var(--accent);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: var(--space-5);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
    max-width: 90vw;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    font-size: 0.867rem;
    color: var(--text-primary);
    pointer-events: auto;
    animation: toastIn 0.3s var(--ease-out), toastOut 0.3s var(--ease-out) 2.7s forwards;
}

.toast.error {
    border-color: var(--error);
    background: rgba(201, 74, 74, 0.15);
}

.toast.success {
    border-color: var(--success);
    background: rgba(74, 171, 107, 0.15);
}

.toast.warning {
    border-color: var(--accent);
    background: var(--accent-muted);
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: var(--space-1);
    opacity: 0.6;
    transition: opacity var(--duration);
}

.toast-close:hover {
    opacity: 1;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-main);
    border-top: 1px solid var(--bg-elevated);
    padding: var(--space-2) var(--space-3);
    padding-bottom: calc(var(--space-2) + var(--safe-bottom));
    z-index: 100;
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: color var(--duration);
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn.active {
    color: var(--accent);
}

.mobile-nav-icon {
    font-size: 1.25rem;
}

.mobile-nav-label {
    font-size: 0.667rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-4);
    }
    
    .sidebar {
        width: 100%;
    }
    
    .cube-viewport {
        min-height: 45vh;
        max-height: 50vh;
    }
    
    #cube-container {
        min-height: 45vh;
        max-height: 50vh;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
    
    .header {
        padding: var(--space-2) var(--space-3);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: var(--bg-card);
        border-bottom: none;
        height: 48px;
        display: flex;
        align-items: center;
    }
    
    .logo h1 {
        font-size: 0.9rem;
    }
    
    /* Hide desktop nav on mobile */
    .nav-tabs {
        display: none;
    }
    
    /* Show mobile nav */
    .mobile-nav {
        display: flex;
        justify-content: space-around;
    }
    
    /* Main content with fixed cube viewport */
    .main-content {
        flex-direction: column;
        padding: 0;
        padding-top: 48px; /* Exact header height */
        padding-bottom: calc(70px + var(--safe-bottom)); /* Space for mobile nav */
        gap: 0;
        min-height: 100vh;
    }
    
    /* FIXED CUBE VIEWPORT - Always visible on mobile */
    .cube-viewport {
        position: fixed;
        top: 48px; /* Exactly below header */
        left: 0;
        right: 0;
        height: 240px; /* Fixed height for consistent layout */
        min-height: unset;
        max-height: unset;
        z-index: 40;
        border-radius: 0;
        overflow: hidden;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    }
    
    #cube-container {
        height: 100%;
        min-height: unset;
        max-height: unset;
        border-radius: 0;
    }
    
    /* Better touch viewport info */
    .viewport-info {
        bottom: var(--space-2);
    }
    
    .info-badge {
        font-size: 0.65rem;
        padding: var(--space-1) var(--space-2);
    }
    
    /* SCROLLABLE SIDEBAR - Directly below viewport */
    .sidebar {
        width: 100%;
        margin-top: 288px; /* header (48px) + viewport (240px) = 288px */
        min-height: auto;
        padding-bottom: var(--space-4);
    }
    
    .panel {
        border-radius: 0;
        border-top: 1px solid var(--bg-elevated);
    }
    
    .panel-title {
        padding: var(--space-3);
        font-size: 0.75rem;
        position: sticky;
        top: 0;
        background: var(--bg-card);
        z-index: 5;
    }
    
    .control-section {
        padding: var(--space-3);
    }
    
    .control-section h3 {
        font-size: 0.65rem;
        margin-bottom: var(--space-2);
    }
    
    /* Larger touch targets for move buttons */
    .move-row {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-2);
    }
    
    .move-btn {
        padding: var(--space-3);
        font-size: 0.9rem;
        min-height: 44px;
        border-radius: var(--radius-md);
    }
    
    /* Larger action buttons */
    .action-btn {
        padding: var(--space-3);
        font-size: 0.85rem;
        min-height: 48px;
        border-radius: var(--radius-md);
    }
    
    .action-buttons {
        gap: var(--space-3);
    }
    
    /* Larger color swatches for touch */
    .color-swatch {
        width: 44px;
        height: 44px;
        border-radius: var(--radius-md);
    }
    
    .color-picker {
        gap: var(--space-2);
        justify-content: space-between;
    }
    
    /* Enhanced color picker - 6 columns on mobile (1 row) */
    .color-picker-enhanced {
        grid-template-columns: repeat(6, 1fr);
        gap: var(--space-2);
    }
    
    .color-swatch-enhanced {
        min-height: 40px;
    }
    
    .swatch-count {
        font-size: 0.65rem;
    }
    
    /* Compact tutorial on mobile */
    .tutorial-steps {
        max-height: 220px;
    }
    
    .tutorial-step {
        padding: var(--space-3);
    }
    
    .tutorial-nav {
        padding: var(--space-3);
    }
    
    .nav-btn {
        min-height: 44px;
    }
    
    /* Hide help on mobile (use modal instead) */
    .help-btn {
        display: none;
    }
    
    /* Solver improvements */
    .solver-instructions {
        padding: var(--space-3);
    }
    
    .instructions-text {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    .color-counts {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
    
    .color-count {
        padding: var(--space-2);
        font-size: 0.75rem;
    }
    
    .count-swatch {
        width: 14px;
        height: 14px;
    }
    
    .solver-status {
        font-size: 0.8rem;
        padding: var(--space-2);
    }
    
    .solution-display {
        padding: var(--space-3);
    }
    
    .solution-moves {
        max-height: 100px;
        font-size: 0.8rem;
    }
    
    .solution-move {
        padding: 3px 6px;
        margin: 1px;
        font-size: 0.75rem;
    }
    
    /* Move history compact */
    .move-history {
        max-height: 60px;
        min-height: 40px;
        padding: var(--space-2);
    }
    
    .history-move {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE
   ============================================ */

@media (max-width: 375px) {
    .cube-viewport {
        min-height: 38vh;
        max-height: 42vh;
    }
    
    #cube-container {
        min-height: 38vh;
        max-height: 42vh;
    }
    
    .color-swatch {
        width: 40px;
        height: 40px;
    }
    
    .color-picker {
        gap: var(--space-1);
    }
    
    .move-btn {
        padding: var(--space-2);
        font-size: 0.85rem;
        min-height: 40px;
    }
    
    .action-btn {
        padding: var(--space-2);
        font-size: 0.8rem;
        min-height: 44px;
    }
    
    .color-counts {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .main-content {
        flex-direction: row;
        padding: var(--space-2);
        gap: var(--space-2);
    }
    
    .cube-viewport {
        min-height: 90%;
        max-height: 95%;
        flex: 1;
    }
    
    #cube-container {
        min-height: 90%;
        max-height: 95%;
    }
    
    .sidebar {
        width: 300px;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .mobile-nav {
        display: none;
    }
    
    .nav-tabs {
        display: flex;
    }
    
    .panel-title {
        display: none;
    }
    
    .control-section {
        padding: var(--space-2);
    }
}

/* ============================================
   TOUCH ENHANCEMENTS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .move-btn:hover,
    .action-btn:hover,
    .nav-btn:hover,
    .color-swatch:hover {
        transform: none;
    }
    
    /* Add active states instead */
    .move-btn:active {
        transform: scale(0.95);
        background: var(--accent-muted);
    }
    
    .action-btn:active {
        transform: scale(0.97);
        opacity: 0.8;
    }
    
    .color-swatch:active {
        transform: scale(0.95);
    }
    
    .mobile-nav-btn:active {
        transform: scale(0.95);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-soft);
}

/* Hide scrollbar on mobile for cleaner look */
@media (max-width: 640px) {
    ::-webkit-scrollbar {
        width: 3px;
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
    width: auto;
    max-width: 90vw;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 100px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    animation: toastIn 0.3s var(--ease-out);
    backdrop-filter: blur(12px);
    white-space: nowrap;
}

@keyframes toastIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.toast.error {
    border-color: rgba(201, 74, 74, 0.4);
    background: linear-gradient(135deg, 
        rgba(31, 29, 27, 0.98) 0%, 
        rgba(201, 74, 74, 0.1) 100%);
}

.toast.warning {
    border-color: rgba(232, 165, 75, 0.4);
    background: linear-gradient(135deg, 
        rgba(31, 29, 27, 0.98) 0%, 
        rgba(232, 165, 75, 0.1) 100%);
}

.toast.success {
    border-color: rgba(74, 171, 107, 0.4);
    background: linear-gradient(135deg, 
        rgba(31, 29, 27, 0.98) 0%, 
        rgba(74, 171, 107, 0.1) 100%);
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.3;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: var(--space-1);
    margin-left: var(--space-2);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Mobile toast styles */
@media (max-width: 768px) {
    .toast-container {
        top: calc(var(--space-3) + 44px); /* Below header */
        left: var(--space-3);
        right: var(--space-3);
        transform: none;
        max-width: none;
        width: auto;
    }
    
    .toast {
        border-radius: var(--radius-md);
        padding: var(--space-3);
        gap: var(--space-2);
        white-space: normal;
        flex-wrap: nowrap;
    }
    
    .toast-icon {
        font-size: 1rem;
    }
    
    .toast-message {
        font-size: 0.85rem;
        flex: 1;
        min-width: 0;
    }
    
    .toast-close {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
        margin-left: auto;
    }
}

/* ============================================
   SOUND TOGGLE & HELP BUTTONS
   ============================================ */

.sound-btn,
.help-btn {
    position: fixed;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--bg-elevated);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Sound button - desktop neutral style */
.sound-btn {
    bottom: var(--space-5);
    right: var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--bg-hover);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sound-btn:hover {
    transform: scale(1.08);
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

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

/* Sound button - muted state (neutral) */
.sound-btn.muted {
    color: var(--text-muted);
    opacity: 0.7;
}

.sound-btn.muted:hover {
    opacity: 1;
    color: var(--accent);
}

/* Sound button icons */
.sound-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.sound-btn:hover .sound-icon {
    transform: scale(1.1);
}

.sound-btn.muted .sound-on {
    display: none !important;
}

.sound-btn.muted .sound-off {
    display: block !important;
}

.sound-btn:not(.muted) .sound-on {
    display: block !important;
}

.sound-btn:not(.muted) .sound-off {
    display: none !important;
}

/* Help button */
.help-btn {
    bottom: var(--space-5);
    right: calc(var(--space-5) + 52px);
    font-weight: 600;
    font-family: var(--font-sans);
}

.help-btn:hover {
    background: var(--bg-elevated);
    color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
}

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

/* Desktop positioning */
@media (min-width: 769px) {
    .sound-btn {
        bottom: var(--space-5);
        right: var(--space-5);
    }
    
    .help-btn {
        bottom: var(--space-5);
        right: calc(var(--space-5) + 52px);
    }
}

/* Mobile - sound button in header (icon only), hide help button */
@media (max-width: 768px) {
    /* Hide keyboard shortcuts button on mobile */
    .help-btn {
        display: none !important;
    }
    
    /* Position sound button in header area (top right) - icon only */
    .sound-btn {
        position: fixed;
        top: var(--space-3);
        right: var(--space-3);
        bottom: auto;
        width: 36px;
        height: 36px;
        z-index: 150;
        /* Remove circle - transparent background */
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--text-secondary);
    }
    
    .sound-btn:hover,
    .sound-btn:active {
        background: transparent;
        border: none;
        box-shadow: none;
        transform: scale(1.15);
        color: var(--accent);
    }
    
    .sound-btn.muted {
        color: var(--text-muted);
        opacity: 0.6;
    }
    
    .sound-btn.muted:hover {
        opacity: 1;
        color: var(--text-secondary);
    }
    
    .sound-icon {
        width: 22px;
        height: 22px;
    }
}

/* ============================================
   HEADER CREDIT
   ============================================ */

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.logo-text h1 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.credit {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.credit a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.credit a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Hide credit on very small screens to save space */
@media (max-width: 360px) {
    .credit {
        display: none;
    }
}


/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 14, 13, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
}

.loader-text {
    text-align: center;
    animation: fadeInUp 0.5s var(--ease-out);
}

.loader-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    letter-spacing: -0.02em;
}

.loader-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 3D Cube Loader Animation */
.rubiks-loader {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 2s infinite linear;
}

.cube-face {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid #1a1a1a;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
    opacity: 0.9;
}

.face-u { transform: rotateX(90deg) translateZ(30px); background: var(--face-white); }
.face-d { transform: rotateX(-90deg) translateZ(30px); background: var(--face-yellow); }
.face-f { transform: translateZ(30px); background: var(--face-green); }
.face-b { transform: rotateY(180deg) translateZ(30px); background: var(--face-blue); }
.face-r { transform: rotateY(90deg) translateZ(30px); background: var(--face-red); }
.face-l { transform: rotateY(-90deg) translateZ(30px); background: var(--face-orange); }

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
