/* Base Styles and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core Colors */
    --color-bg-dark: #0f172a;
    --color-bg-light: #1e293b;
    --color-text: #f8fafc;
    --color-text-muted: rgba(248, 250, 252, 0.7);
    
    /* Gradient Colors */
    --color-blue: #60a5fa;
    --color-indigo: #818cf8;
    --color-purple: #a78bfa;
    --color-violet: #c084fc;
    --color-fuchsia: #e879f9;
    --color-pink: #f472b6;
    
    /* Component Colors */
    --color-component-0: var(--color-blue);
    --color-component-1: var(--color-indigo);
    --color-component-2: var(--color-purple);
    --color-component-3: var(--color-violet);
    --color-component-4: var(--color-fuchsia);
    --color-component-5: var(--color-pink);
    
    /* UI Elements */
    --color-ui-primary: var(--color-blue);
    --color-ui-secondary: var(--color-bg-light);
    
    /* Animation Timing */
    --transition-fast: 300ms;
    --transition-medium: 500ms;
    --transition-slow: 800ms;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    overflow: hidden;
}

.walkthrough {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, var(--color-bg-dark), var(--color-bg-light));
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--color-bg-dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-blue);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.toggle {
    position: relative;
}

.toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-bg {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
    border-radius: 1rem;
    background-color: var(--color-bg-light);
    transition: var(--transition-fast);
}

.toggle-switch {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: white;
    transition: var(--transition-fast);
}

input:checked + .toggle-bg {
    background: linear-gradient(to right, var(--color-blue), var(--color-purple));
}

input:checked + .toggle-bg .toggle-switch {
    transform: translateX(1.5rem);
    background: white;
}

.buttons {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.btn-primary {
    background-color: var(--color-blue);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #4c8ee0;
}

.btn-secondary {
    background-color: var(--color-bg-light);
    color: var(--color-text);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #2c3e50;
}

/* Main Content */
.main-content {
    position: relative;
    flex: 1;
    overflow: hidden;
}

/* Background Elements */
.background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    opacity: 0.05;
}

.grid-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid white;
    pointer-events: none;
}

.glow-effect {
    position: absolute;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(4rem);
}

.glow-1 {
    top: 50%;
    left: 16.66%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--color-blue) 0%, transparent 70%);
}

.glow-2 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--color-purple) 0%, transparent 70%);
}

.glow-3 {
    top: 50%;
    left: 83.33%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--color-pink) 0%, transparent 70%);
}

/* Progress Bar */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.25rem;
    background-color: var(--color-bg-light);
    z-index: 5;
}

.progress-fill {
    height: 100%;
    width: 16.66%; /* Initial width - 1/6 for step 1 */
    background: linear-gradient(to right, var(--color-blue), var(--color-purple), var(--color-pink));
    transition: width var(--transition-medium) ease-out;
}

/* Process Flow Visualization */
.process-flow {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flow-paths {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.path {
    fill: none;
    stroke-width: 8;
    transition: stroke var(--transition-medium);
}

.path-background {
    stroke: rgba(100, 116, 139, 0.2);
}

.path-1, 
.path-2, 
.path-3, 
.path-4, 
.path-5 {
    stroke: url(#pathGradient);
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    transition: stroke-dashoffset var(--transition-medium);
    filter: drop-shadow(0 0 8px rgba(165, 180, 252, 0.3));
}

.particle {
    opacity: 0;
    transition: opacity var(--transition-fast);
    filter: drop-shadow(0 0 5px currentColor);
}

.particle-1 { fill: var(--color-component-0); }
.particle-2 { fill: var(--color-component-1); }
.particle-3 { fill: var(--color-component-2); }
.particle-4 { fill: var(--color-component-3); }
.particle-5 { fill: var(--color-component-4); }

/* Components Container */
.components-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: 83.33%;
    max-width: 1200px;
    height: 100%;
    align-items: center;
    position: relative;
    z-index: 2;
}

.component {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
    opacity: 0.4;
}

.component-icon {
    position: relative;
    margin-bottom: 1rem;
}

.icon-glow {
    position: absolute;
    inset: -0.25rem;
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.icon-container {
    position: relative;
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-bg-dark);
    border: 1px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.component-0 .icon-container { border-color: var(--color-component-0); }
.component-1 .icon-container { border-color: var(--color-component-1); }
.component-2 .icon-container { border-color: var(--color-component-2); }
.component-3 .icon-container { border-color: var(--color-component-3); }
.component-4 .icon-container { border-color: var(--color-component-4); }
.component-5 .icon-container { border-color: var(--color-component-5); }

.component-0 .icon-glow { background: radial-gradient(circle, var(--color-component-0) 0%, transparent 70%); }
.component-1 .icon-glow { background: radial-gradient(circle, var(--color-component-1) 0%, transparent 70%); }
.component-2 .icon-glow { background: radial-gradient(circle, var(--color-component-2) 0%, transparent 70%); }
.component-3 .icon-glow { background: radial-gradient(circle, var(--color-component-3) 0%, transparent 70%); }
.component-4 .icon-glow { background: radial-gradient(circle, var(--color-component-4) 0%, transparent 70%); }
.component-5 .icon-glow { background: radial-gradient(circle, var(--color-component-5) 0%, transparent 70%); }

.component-0 svg { stroke: var(--color-component-0); }
.component-1 svg { stroke: var(--color-component-1); }
.component-2 svg { stroke: var(--color-component-2); }
.component-3 svg { stroke: var(--color-component-3); }
.component-4 svg { stroke: var(--color-component-4); }
.component-5 svg { stroke: var(--color-component-5); }

.component-label {
    font-size: 1.125rem;
    font-weight: 500;
}

/* Active Component State */
.component.active {
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
}

.component.active .icon-glow {
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.component.completed {
    opacity: 0.8;
}

/* Step Information */
.step-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, var(--color-bg-dark), transparent);
    z-index: 5;
}

.step-content {
    max-width: 64rem;
    margin: 0 auto;
}

.step-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--color-blue);
}

.step-description {
    font-size: 1.25rem;
    opacity: 0.8;
}

/* Watermark */
.watermark {
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
}

.watermark p {
    font-size: 0.675rem;
    color: var(--color-bg-light);
    opacity: 0.3;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .controls {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .buttons {
        width: 100%;
    }
    
    .btn {
        flex: 1;
    }
    
    .components-container {
        width: 100%;
        padding: 0 1rem;
    }
    
    .icon-container {
        width: 4rem;
        height: 4rem;
    }
    
    .component-label {
        font-size: 0.875rem;
    }
    
    .step-title {
        font-size: 1.25rem;
    }
    
    .step-description {
        font-size: 1rem;
    }
}
