/* ============================================
   UI Layout Puzzle — Complete Stylesheet
   ============================================ */

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

/* --- CSS Custom Properties (Light Mode - Default) --- */
:root {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-header: rgba(255, 255, 255, 0.75);
    --bg-layout: #f8f9fc;
    --bg-component: #ffffff;
    --bg-component-hover: #f8f9ff;

    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-muted: #8a8aaa;
    --text-inverse: #ffffff;

    --accent: #6c63ff;
    --accent-hover: #5a52e0;
    --accent-light: rgba(108, 99, 255, 0.12);
    --accent-glow: rgba(108, 99, 255, 0.3);
    --success: #51cf66;
    --warning: #ffa94d;
    --danger: #ff6b6b;
    --info: #00d2ff;

    --border: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(108, 99, 255, 0.15);

    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    --grid-color: rgba(108, 99, 255, 0.06);
    --grid-line: rgba(108, 99, 255, 0.08);
    --snap-color: rgba(108, 99, 255, 0.15);
}

/* --- Dark Mode --- */
[data-theme="dark"] {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(25, 25, 55, 0.85);
    --bg-card-hover: rgba(35, 35, 65, 0.95);
    --bg-header: rgba(10, 10, 30, 0.85);
    --bg-layout: #0d0d20;
    --bg-component: rgba(25, 25, 55, 0.9);
    --bg-component-hover: rgba(35, 35, 65, 0.95);

    --text-primary: #e0e0ff;
    --text-secondary: #a0a0cc;
    --text-muted: #6a6a8a;
    --text-inverse: #0a0a1a;

    --accent: #7c73ff;
    --accent-hover: #8a82ff;
    --accent-light: rgba(124, 115, 255, 0.15);
    --accent-glow: rgba(124, 115, 255, 0.4);
    --success: #69db7c;
    --warning: #ffc078;
    --danger: #ff8787;
    --info: #66d9e8;

    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.03);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(124, 115, 255, 0.25);

    --glass-bg: rgba(20, 20, 50, 0.6);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    --grid-color: rgba(124, 115, 255, 0.04);
    --grid-line: rgba(124, 115, 255, 0.07);
    --snap-color: rgba(124, 115, 255, 0.12);
}

/* --- Base Styles --- */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* --- App Layout --- */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background var(--transition), border var(--transition);
}

.header-left { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.game-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    line-height: 1;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.header-center { flex: 1; display: flex; justify-content: center; padding: 0 20px; }

.level-selector-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.selector-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    font-weight: 600;
}

.level-selector {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.level-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    white-space: nowrap;
}

.level-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.level-btn.active {
    background: var(--accent);
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow);
}

.level-btn .level-icon { font-size: 14px; }
.level-btn .level-name { font-size: 12px; }

.level-diff {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.level-diff.easy { background: rgba(81, 207, 102, 0.15); color: var(--success); }
.level-diff.medium { background: rgba(255, 169, 77, 0.15); color: var(--warning); }
.level-diff.hard { background: rgba(255, 107, 107, 0.15); color: var(--danger); }
.level-btn.active .level-diff.easy { background: rgba(255,255,255,0.2); color: #fff; }
.level-btn.active .level-diff.medium { background: rgba(255,255,255,0.2); color: #fff; }
.level-btn.active .level-diff.hard { background: rgba(255,255,255,0.2); color: #fff; }

.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.toggle-group {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
}

.toggle-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.toggle-btn.active {
    background: var(--accent);
    color: var(--text-inverse);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.game-main {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    gap: 20px;
    padding: 20px 28px;
    flex: 1;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   SIDEBAR
   ============================================ */
.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}

.level-info {
    text-align: center;
}

.level-badge {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
}

.level-info h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.level-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.level-meta {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.diff-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    background: var(--accent-light);
    color: var(--accent);
}

.comp-count {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    background: var(--border-light);
    color: var(--text-muted);
}

.instructions h3, .legend h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.instructions ol {
    padding-left: 18px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.legend-item:hover {
    background: var(--accent-light);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.btn-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1px dashed var(--accent);
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-hint:hover {
    background: var(--accent);
    color: var(--text-inverse);
    border-style: solid;
}

/* ============================================
   GAME AREA (Main)
   ============================================ */
.game-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-label {
    font-size: 13px;
    font-weight: 600;
}

.preview-mode {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 500;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

.btn-reset {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    transition: all var(--transition);
}

.btn-reset:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* --- Preview Container --- */
.preview-container {
    position: relative;
    background: var(--bg-layout);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-height: 500px;
    overflow: hidden;
    transition: all var(--transition);
    padding: 0;
}

.preview-container.mobile {
    max-width: 375px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    min-height: 600px;
}

/* --- Grid Overlay --- */
.grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 20px 20px;
}

.grid-overlay.visible {
    opacity: 1;
}

/* --- Layout Area --- */
.layout-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    min-height: 468px;
    position: relative;
    z-index: 2;
}

.layout-area.sortable-chosen {
    cursor: grabbing;
}

/* --- Component Cards --- */
.layout-component {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-component);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: grab;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.layout-component:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    background: var(--bg-component-hover);
    transform: translateY(-1px);
}

.layout-component.sortable-ghost {
    opacity: 0.4;
    background: var(--accent-light);
    border-style: dashed;
}

.layout-component.sortable-drag {
    opacity: 0.9;
    box-shadow: var(--shadow-xl);
    transform: scale(1.02);
    z-index: 1000;
}

.layout-component .comp-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    color: var(--text-muted);
    cursor: grab;
    flex-shrink: 0;
}

.layout-component .comp-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 18px;
    flex-shrink: 0;
}

.layout-component .comp-info {
    flex: 1;
    min-width: 0;
}

.layout-component .comp-label {
    font-size: 13px;
    font-weight: 600;
    display: block;
}

.layout-component .comp-desc {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.layout-component .comp-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
    flex-shrink: 0;
    background: var(--border-light);
    color: var(--text-muted);
}

/* Component color variants - icon background set via JS inline style */

/* --- Action Bar --- */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #5a52e0);
    color: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   SCORE PANEL
   ============================================ */
.score-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.score-card {
    text-align: center;
}

.score-card h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    text-align: left;
}

.total-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.score-number {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.score-item { }

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.score-header span:first-child {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.score-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.bar-track {
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--accent), var(--info));
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grade-display {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.grade-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grade-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
    max-width: 320px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.warning { border-left: 3px solid var(--warning); }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   SWEETALERT CUSTOM
   ============================================ */
.swal2-popup {
    font-family: var(--font) !important;
    background: var(--bg-card) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-xl), var(--shadow-glow) !important;
    color: var(--text-primary) !important;
    padding: 32px !important;
}

.swal2-title {
    color: var(--text-primary) !important;
    font-size: 24px !important;
    font-weight: 800 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--accent), #5a52e0) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    padding: 12px 32px !important;
    box-shadow: var(--shadow-glow) !important;
}

.swal2-cancel {
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
}

.score-breakdown {
    text-align: left;
    padding: 16px 0;
}

.score-breakdown .score-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.score-breakdown .score-item span:first-child {
    width: 120px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.score-breakdown .score-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.score-breakdown .score-bar div {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--accent), var(--info));
    transition: width 0.6s ease;
}

.score-breakdown .score-item span:last-child {
    width: 40px;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
}

.feedback-list {
    text-align: left;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.feedback-list p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ============================================
   CONFETTI
   ============================================ */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall 3s ease-in-out forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .game-main {
        grid-template-columns: 200px 1fr 200px;
        gap: 16px;
        padding: 16px 20px;
    }
}

@media (max-width: 992px) {
    .game-main {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .game-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        order: 2;
    }

    .game-area { order: 1; }
    .score-panel { order: 3; }

    .game-sidebar .card { margin-bottom: 0; }

    .header-center { display: none; }
}

@media (max-width: 640px) {
    .game-header {
        padding: 10px 16px;
    }

    .game-main {
        padding: 12px 16px;
    }

    .game-sidebar {
        grid-template-columns: 1fr;
    }

    .level-selector {
        flex-wrap: wrap;
    }

    .layout-component {
        padding: 10px 14px;
    }

    .preview-container.mobile {
        max-width: 100%;
        border-radius: var(--radius-md);
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   UTILITY
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   DARK MODE NEON GLOW
   ============================================ */
[data-theme="dark"] .layout-component:hover {
    box-shadow: 0 0 20px rgba(124, 115, 255, 0.15), 0 0 40px rgba(124, 115, 255, 0.05);
}

[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, var(--accent), #6a62ff);
    box-shadow: 0 0 20px rgba(124, 115, 255, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 0 30px rgba(124, 115, 255, 0.5);
}

[data-theme="dark"] .card {
    background: rgba(20, 20, 50, 0.7);
    border: 1px solid rgba(124, 115, 255, 0.1);
}

[data-theme="dark"] .card:hover {
    border-color: rgba(124, 115, 255, 0.2);
    box-shadow: 0 8px 32px rgba(124, 115, 255, 0.1);
}

[data-theme="dark"] .level-btn.active {
    box-shadow: 0 0 20px rgba(124, 115, 255, 0.3);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.layout-component {
    animation: fadeIn 0.3s ease forwards;
}

.layout-component:nth-child(1) { animation-delay: 0.05s; }
.layout-component:nth-child(2) { animation-delay: 0.1s; }
.layout-component:nth-child(3) { animation-delay: 0.15s; }
.layout-component:nth-child(4) { animation-delay: 0.2s; }
.layout-component:nth-child(5) { animation-delay: 0.25s; }
.layout-component:nth-child(6) { animation-delay: 0.3s; }
.layout-component:nth-child(7) { animation-delay: 0.35s; }

/* --- Loading Skeleton --- */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
