/* CSS for Step 2 Coding Animation - Readability Focused */

.editor-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #09090E;
    /* Ensure base bg matches */
    display: flex;
    flex-direction: column;
}

/* Layer 1: Effects (Background) */
.code-effect-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

/* Scanline Effect */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Or specific scan height */
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(139, 92, 246, 0.05) 50%,
            transparent 100%);
    transform: translateY(-100%);
    animation: scanMove 4s linear infinite;
    z-index: 2;
}

@keyframes scanMove {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

/* Syntax Highlight Shimmer (Gradient Sweep) */
/* We apply this to a mask or overlay, but easiest is a subtle gradient moving across */
.shimmer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(115deg,
            transparent 0%,
            transparent 40%,
            rgba(255, 255, 255, 0.03) 45%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.03) 55%,
            transparent 60%,
            transparent 100%);
    transform: translateX(-100%);
    animation: shimmerSwipe 6s ease-in-out infinite;
    z-index: 3;
}

@keyframes shimmerSwipe {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0%);
    }
}


/* Layer 2: Text (Foreground) */
.code-text-layer {
    position: relative;
    z-index: 10;
    padding: 24px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #A1A1AA;
    line-height: 1.6;
    height: 100%;
    overflow-y: auto;

    /* Flex Column for Layout */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Specific Line Styles */
.code-line {
    display: flex;
    gap: 16px;
    min-height: 1.5em;
    /* Fixed height for consistency */
    align-items: flex-start;
    white-space: pre;
    /* Preserve coding whitespace */
    opacity: 0.9;
    /* Slight opacity to blend with effects if needed, but 1.0 is safer for contrast */
}

/* Syntax Highlighting Colors - High Contrast */
.tok-kw {
    color: #c084fc;
    font-weight: bold;
}

/* Purple 400 */
.tok-func {
    color: #60a5fa;
}

/* Blue 400 */
.tok-str {
    color: #4ade80;
}

/* Green 400 */
.tok-num {
    color: #f472b6;
}

/* Pink 400 */
.tok-comment {
    color: #52525b;
    font-style: italic;
}

/* Zinc 600 */
.tok-punc {
    color: #cbd5e1;
}

/* Slate 300 */
.tok-ln {
    color: #3f3f46;
    min-width: 24px;
    text-align: right;
    user-select: none;
    margin-right: 12px;
}

/* Cursor Blink */
.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: #A855F7;
    /* Purple cursor */
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Scrollbar styling for code window */
.code-text-layer::-webkit-scrollbar {
    width: 6px;
}

.code-text-layer::-webkit-scrollbar-track {
    background: #09090E;
}

.code-text-layer::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 3px;
}

.code-text-layer::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Coding Animation Mobile Fix */
@media (max-width: 768px) {
    .editor-content-wrapper {
        overflow: hidden;
    }

    .code-text-layer {
        padding: 12px;
        font-size: 0.7rem;
    }

    .code-line {
        gap: 8px;
    }
}
