/* 
   WDECK ASSEMBLY & MASTER GUIDE - Redesigned Premium CSS
   Design System: Ultra-Premium Studio Cyber Glassmorphism / Dark UI
   Aligned with MASTER.md guidelines.
*/

:root {
    --sidebar-width: 310px;
    --top-nav-height: 80px;
    --card-glow-purple: rgba(156, 92, 255, 0.2);
    --card-glow-blue: rgba(59, 130, 246, 0.2);
    --bg-glass-panel: rgba(8, 8, 12, 0.7);
    --bg-glass-active: rgba(156, 92, 255, 0.12);
}

/* --- Ambient Background Blob Layout --- */
body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-main);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.ambient-glow {
    position: fixed;
    top: 20%;
    left: 20%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(156, 92, 255, 0.06), transparent 70%);
    pointer-events: none;
    z-index: -2;
}

.glow-top-right {
    position: fixed;
    top: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05), transparent 70%);
    pointer-events: none;
    z-index: -2;
}

/* Offset fixed header */
.stepper-main {
    margin-left: calc(var(--sidebar-width) + 32px);
    margin-top: calc(var(--top-nav-height) + 24px);
    padding: 0 48px 140px 48px;
    min-height: calc(100vh - var(--top-nav-height) - 48px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Navigation Bar --- */


/* Exit button styled with red translucent neon look */
.btn-exit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    text-decoration: none;
    padding: 8px 18px !important;
    border-radius: 100px;
    font-weight: 800;
    font-size: 13px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: pointer;
}

.btn-exit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5) !important;
    filter: brightness(1.1);
}

/* --- Floating Sidebar (Stepper Nav) --- */
.stepper-nav {
    position: fixed;
    left: 24px;
    top: calc(var(--top-nav-height) + 24px);
    bottom: 24px;
    width: var(--sidebar-width);
    background: var(--bg-glass-panel);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(156, 92, 255, 0.15);
    border-radius: var(--radius);
    z-index: 995;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 30px rgba(156, 92, 255, 0.03);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stepper-nav-header {
    padding: 24px 20px 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, transparent 100%);
}

.stepper-nav-header div {
    font-size: 11px;
    font-weight: 900;
    color: white;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.progress-container {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    margin-top: 14px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px var(--color-primary);
}

.nav-sections {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.step-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 8px;
}

.step-list::-webkit-scrollbar {
    width: 4px;
}

.step-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
}

.step-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* --- Stepper Nav Step Item --- */
.sidebar-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
}

.sidebar-step-item:hover {
    background: rgba(255, 255, 255, 0.02);
    color: white;
}

.sidebar-step-item.active {
    background: linear-gradient(90deg, rgba(156, 92, 255, 0.12) 0%, rgba(59, 130, 246, 0.03) 100%);
    color: white;
    border-color: rgba(156, 92, 255, 0.15);
    box-shadow: inset 0 0 8px rgba(156, 92, 255, 0.05);
}

.sidebar-step-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--color-primary);
}

.sidebar-step-item .step-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.sidebar-step-item.active .step-circle {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 12px rgba(156, 92, 255, 0.45);
    transform: scale(1.08);
}

.sidebar-step-item .step-icon {
    font-size: 13px;
    width: 18px;
    text-align: center;
    opacity: 0.4;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.sidebar-step-item.active .step-icon {
    opacity: 1;
    color: var(--accent-hover);
}

.sidebar-step-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.25s ease;
}

.sidebar-step-item:hover span {
    transform: translateX(2px);
}

.phase-header {
    font-size: 9px;
    font-weight: 900;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 20px 16px 6px 16px;
    opacity: 0.95;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

.phase-header:first-child {
    padding-top: 8px;
}

/* --- Steps Content Area --- */
.step-content {
    display: none;
    width: 100%;
    max-width: 1180px;
    gap: 64px;
    align-items: center;
    animation: stepSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-content.active {
    display: flex !important;
}

/* Hero / Centered welcome & complete screens */
.step-content.hero.active,
.step-content.success-section.active {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    min-height: 60vh;
    gap: 20px;
}

.step-content.hero.active .step-text,
.step-content.success-section.active .step-text {
    flex: none;
    width: 100%;
    max-width: 800px;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.step-text {
    flex: 0.95;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-content .step-text h2 {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 40%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.15;
    margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(156, 92, 255, 0.15);
}

.step-text p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.75;
}

.step-tag {
    display: inline-block;
    padding: 5px 14px;
    background: linear-gradient(135deg, rgba(156, 92, 255, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(156, 92, 255, 0.25);
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-hover);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    width: fit-content;
    box-shadow: 0 0 15px rgba(156, 92, 255, 0.05);
}

/* Centered layouts handle widths differently */
.step-content.active .step-text:only-child {
    flex: 1;
    max-width: 100%;
}

/* --- Visual Frames (Media) --- */
.step-visual {
    flex: 2.1;
    position: relative;
}

.video-container {
    background: #060608;
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-container::after {
    content: "\f110";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 24px;
    color: var(--color-primary);
    animation: fa-spin 1.5s infinite linear;
    position: absolute;
    z-index: 1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.video-container.loaded::after {
    opacity: 0;
    pointer-events: none;
}

.video-container video,
.video-container img,
.step-visual img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease;
    position: relative;
    z-index: 2;
}

.video-container.loaded video,
.video-container.loaded img,
.step-visual.loaded img {
    opacity: 1;
}

.step-visual img {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-visual:hover img,
.step-visual:hover .video-container {
    border-color: rgba(156, 92, 255, 0.3);
    box-shadow: 0 30px 60px rgba(156, 92, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* --- Floating Bottom Controls Capsule --- */
.stepper-controls {
    position: fixed;
    bottom: 32px;
    left: calc(50% + var(--sidebar-width) / 2 + 12px);
    transform: translateX(-50%);
    background: rgba(6, 6, 9, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(156, 92, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-counter-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
    letter-spacing: 0.05em;
}

.stepper-controls button {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 13px;
    border: none;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stepper-controls button#prev-step {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.stepper-controls button#prev-step:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stepper-controls button#next-step {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(156, 92, 255, 0.2);
}

.stepper-controls button#next-step:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(156, 92, 255, 0.4);
    filter: brightness(1.1);
}

.stepper-controls button:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* --- BOM Section Redesign --- */
.bom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
    width: 100%;
}

.bom-card {
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 28px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bom-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(156, 92, 255, 0.3);
    box-shadow: 0 15px 30px rgba(156, 92, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
}

.bom-card i {
    font-size: 28px;
    color: var(--accent-hover);
    margin-bottom: 16px;
    display: block;
    text-shadow: 0 0 15px rgba(156, 92, 255, 0.3);
}

.bom-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: white;
}

.bom-card ul {
    list-style: none;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bom-card li {
    font-size: 13.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bom-card li::before {
    content: '•';
    color: var(--accent-hover);
    font-weight: bold;
}

/* --- Parts & Tools Grid Redesign --- */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 24px;
    width: 100%;
}

.part-card {
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px 20px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    backdrop-filter: blur(15px);
}

.part-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(156, 92, 255, 0.08), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.part-card:hover::before {
    opacity: 1;
}

.part-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(156, 92, 255, 0.35);
    box-shadow: 0 20px 40px rgba(156, 92, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-6px);
}

.part-image {
    width: 100%;
    height: 140px;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.part-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.part-card:hover .part-image img {
    transform: scale(1.06);
}

.part-image i {
    transition: transform 0.3s ease;
}

.part-card:hover .part-image i {
    transform: scale(1.1);
}

.part-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.part-info h3 {
    font-size: 16px;
    font-weight: 800;
    color: white;
}

.part-info p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.part-quantity {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-hover);
    font-weight: 800;
    margin-top: 4px;
    width: fit-content;
    align-self: center;
}

.part-link {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 800;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.part-link:hover {
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.35);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* --- Interactive Checklist Redesign --- */
.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(10, 10, 15, 0.55);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(156, 92, 255, 0.12);
    width: 100%;
    margin-top: 12px;
    backdrop-filter: blur(15px);
}

.checklist-container::-webkit-scrollbar {
    width: 4px;
}

.checklist-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
}

.connection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.connection-item:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(156, 92, 255, 0.2);
    box-shadow: 0 5px 15px rgba(156, 92, 255, 0.05);
}

.connection-item .checkbox-inner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.connection-item .checkbox-inner i {
    font-size: 9px;
    color: white;
    display: none;
}

.connection-item.completed {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.25) !important;
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.05);
}

.connection-item.completed .checkbox-inner {
    background: #22c55e;
    border-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.connection-item.completed .checkbox-inner i {
    display: block;
}

.connection-item.completed .path-to {
    color: #22c55e !important;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

.connection-item.completed span {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: line-through;
}

.connection-item .pin {
    font-weight: 700;
}

.connection-item .path-to {
    opacity: 0.8;
    margin: 0 6px;
}

.clear-btn {
    font-size: 11px;
    color: var(--text-muted);
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

.clear-btn:hover {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    background: rgba(239, 68, 68, 0.05);
}

/* Connection colors for side indicators */
.connection-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--item-color);
}

.path-red {
    --item-color: #ff4d4d;
}

.path-black {
    --item-color: #55555d;
}

.path-orange {
    --item-color: #f97316;
}

.path-yellow {
    --item-color: #eab308;
}

.path-turquoise {
    --item-color: #06b6d4;
}

.path-green {
    --item-color: #22c55e;
}

.path-pink {
    --item-color: #ec4899;
}

.path-brown {
    --item-color: #a0522d;
}

.path-gray {
    --item-color: #94a3b8;
}

.path-blue {
    --item-color: #3b82f6;
}

.path-purple {
    --item-color: #a855f7;
}

.connection-item[class*="path-"] .esp-pin {
    color: var(--item-color);
}

/* --- Animation --- */
@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.footer {
    margin-left: calc(var(--sidebar-width) + 32px);
    transition: margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Responsive Design Shifts --- */
@media (max-width: 1100px) {
    .stepper-main {
        margin-left: 0;
        padding: 24px 24px 140px 24px;
    }

    .stepper-nav {
        transform: translateX(-110%);
        top: var(--top-nav-height);
        left: 0;
        bottom: 0;
        height: calc(100vh - var(--top-nav-height));
        border-radius: 0;
        border: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        width: var(--sidebar-width);
    }

    .stepper-nav.open {
        transform: translateX(0);
    }

    .stepper-menu-toggle {
        display: flex !important;
    }

    .step-content.active {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .step-text h2 {
        font-size: 32px;
    }

    .step-text {
        align-items: center;
    }

    .footer {
        margin-left: 0;
    }
}

.stepper-menu-toggle {
    position: fixed;
    left: 20px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 8px 24px rgba(156, 92, 255, 0.3);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.stepper-menu-toggle:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 30px rgba(156, 92, 255, 0.5);
}

#back-to-top {
    display: none !important;
}

/* --- Lightbox Modal for Zooming Images --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(4, 4, 6, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.lightbox.open {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: zoom-out;
}

.lightbox.open .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: var(--text-muted);
    font-size: 40px;
    font-weight: 300;
    transition: 0.2s;
    cursor: pointer;
    user-select: none;
}

.lightbox-close:hover {
    color: white;
    transform: scale(1.1);
}

.zoomable-image {
    cursor: zoom-in;
    transition: transform 0.3s ease !important;
}

.zoomable-image:hover {
    transform: scale(1.02);
}

/* --- Interactive Wiring SVG Integration --- */
#wiring-svg {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 20px;
    display: block;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    background: #040406;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 1 !important;
}

#wiring-svg g {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#wiring-svg g.wire-layer {
    opacity: 0.15;
}

#wiring-svg g.wire-layer.completed {
    opacity: 1.0 !important;
}

#wiring-svg g.wire-layer.highlighted {
    opacity: 1.0 !important;
    filter: drop-shadow(0 0 10px var(--hover-color, #9c5cff)) drop-shadow(0 0 2px var(--hover-color, #9c5cff)) !important;
}

#wiring-svg g.wire-layer.dimmed {
    opacity: 0.05 !important;
}

/* --- Step Content Custom overrides moved from inline style --- */
.step-content.hero {
    width: 100%;
    min-height: 80vh;
    padding: 100px 40px;
    text-align: center;
    color: white;
}

#step-01 .step-text {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#step-01 .badge {
    margin-bottom: 20px;
    display: inline-block;
}

#step-01 .hero-subtitle {
    max-width: 650px;
    margin: 0 auto 30px auto;
    font-size: 20px;
    color: #B3B3B3;
}

.step-content.success-section {
    max-width: 900px;
    padding: 0;
}

#step-20 .step-text {
    text-align: center;
    align-items: center;
    width: 100%;
    display: flex;
    flex-direction: column;
}

#step-20 .badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
}

#step-20 h2 {
    font-size: 56px;
    margin: 20px 0;
}

#step-20 p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px;
}

#step-20 .btn-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

#step-20 .btn-primary {
    padding: 15px 40px;
    text-decoration: none;
}

/* --- Custom Confirm Modal --- */
.confirm-modal-card {
    background: linear-gradient(135deg, rgba(16, 16, 24, 0.85) 0%, rgba(8, 8, 12, 0.95) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(156, 92, 255, 0.2);
    border-radius: 24px;
    padding: 36px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(156, 92, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .confirm-modal-card {
    transform: scale(1);
}

.confirm-modal-card h3 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
}

.confirm-modal-card p {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.confirm-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.confirm-modal-buttons button {
    padding: 12px 28px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 100px;
    border: none;
    transition: all 0.25s ease;
}

.confirm-danger-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35) !important;
}

.confirm-danger-btn:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5) !important;
    transform: translateY(-2px);
}

/* Important callouts in steps */
.step-text .alert-box, 
.step-text div[style*="background: rgba(239, 68, 68, 0.1)"] {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.02) 100%) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    border-left: 4px solid #ef4444 !important;
    border-radius: 12px;
    padding: 16px 20px !important;
    margin-top: 24px !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.step-text .alert-box p,
.step-text div[style*="background: rgba(239, 68, 68, 0.1)"] p {
    color: #f87171 !important;
    font-size: 13.5px !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* --- High-Tech Visual Cards --- */
.visual-card {
    background: rgba(10, 10, 15, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(156, 92, 255, 0.15);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 30px rgba(156, 92, 255, 0.02);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-card:hover {
    border-color: rgba(156, 92, 255, 0.3);
    box-shadow: 0 30px 60px rgba(156, 92, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.visual-card-icon {
    font-size: 36px;
    color: var(--accent-hover);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(156, 92, 255, 0.4);
}

.visual-card h4 {
    font-size: 18px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}

.visual-card-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.visual-card-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(156, 92, 255, 0.08);
    border: 1px solid rgba(156, 92, 255, 0.2);
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-hover);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* --- Directional Step Transitions --- */
.step-content {
    transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1), transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Exit Left (Next step: slides out to left) */
.step-content.step-exit-left {
    display: flex !important;
    opacity: 0;
    transform: translateX(-24px);
    pointer-events: none;
}

/* Enter Right (Next step: slides in from right) */
.step-content.step-enter-right {
    opacity: 0;
    transform: translateX(24px);
}

/* Exit Right (Previous step: slides out to right) */
.step-content.step-exit-right {
    display: flex !important;
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
}

/* Enter Left (Previous step: slides in from left) */
.step-content.step-enter-left {
    opacity: 0;
    transform: translateX(-24px);
}

/* Active / Normal State */
.step-content.step-enter-active {
    opacity: 1;
    transform: translateX(0);
}


/* ==============================
   Wiring Diagram SVG Styles
   ============================== */
.s0 {
                            fill: #db0000
                        }

                        .s1 {
                            fill: #001533
                        }

                        .s2 {
                            fill: #ff8800
                        }

                        .s3 {
                            fill: #f5d400
                        }

                        .s4 {
                            fill: #00abc2
                        }

                        .s5 {
                            fill: #71bd00
                        }

                        .s6 {
                            fill: #df50f2
                        }

                        .s7 {
                            fill: #808080
                        }

                        .s8 {
                            fill: #762c04
                        }

                        .s9 {
                            fill: #7100ad
                        }

                        .s10 {
                            fill: #0031a3
                        }

                        .s11 {
                            fill: #9e9e9e
                        }

                        .s12 {
                            opacity: 0;
                            fill: none;
                            stroke: #db0000;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s13 {
                            fill: none;
                            stroke: #db0000;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s14 {
                            opacity: 0;
                            fill: none;
                            stroke: #001533;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s15 {
                            fill: none;
                            stroke: #001533;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s16 {
                            opacity: 0;
                            fill: none;
                            stroke: #ff8800;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s17 {
                            fill: none;
                            stroke: #ff8800;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s18 {
                            opacity: 0;
                            fill: none;
                            stroke: #f5d400;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s19 {
                            fill: none;
                            stroke: #f5d400;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s20 {
                            opacity: 0;
                            fill: none;
                            stroke: #00abc2;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s21 {
                            fill: none;
                            stroke: #00abc2;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s22 {
                            opacity: 0;
                            fill: none;
                            stroke: #71bd00;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s23 {
                            fill: none;
                            stroke: #71bd00;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s24 {
                            opacity: 0;
                            fill: none;
                            stroke: #71bd00;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5
                        }

                        .s25 {
                            fill: none;
                            stroke: #71bd00;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5
                        }

                        .s26 {
                            opacity: 0;
                            fill: none;
                            stroke: #df50f2;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s27 {
                            fill: none;
                            stroke: #df50f2;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s28 {
                            opacity: 0;
                            fill: none;
                            stroke: #df50f2;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5
                        }

                        .s29 {
                            fill: none;
                            stroke: #df50f2;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5
                        }

                        .s30 {
                            opacity: 0;
                            fill: none;
                            stroke: #762c04;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s31 {
                            fill: none;
                            stroke: #762c04;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s32 {
                            opacity: 0;
                            fill: none;
                            stroke: #9e9e9e;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s33 {
                            fill: none;
                            stroke: #9e9e9e;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s34 {
                            opacity: 0;
                            fill: none;
                            stroke: #0031a3;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s35 {
                            fill: none;
                            stroke: #0031a3;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s36 {
                            opacity: 0;
                            fill: none;
                            stroke: #7100ad;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 7.5;
                            stroke-dasharray: NaN
                        }

                        .s37 {
                            fill: none;
                            stroke: #7100ad;
                            stroke-linecap: round;
                            stroke-miterlimit: 10;
                            stroke-width: 3.5;
                            stroke-dasharray: NaN
                        }

                        .s38 {
                            fill: none;
                            stroke: #44a6c6;
                            stroke-miterlimit: 10;
                            stroke-width: 2;
                            stroke-dasharray: NaN
                        }

                        .s39 {
                            opacity: .3;
                            fill: #f0f7ff;
                            stroke: #7aa3bd;
                            stroke-miterlimit: 10;
                            stroke-width: 1;
                            stroke-dasharray: NaN
                        }
/* End Wiring Diagram SVG Styles */
