.code-editor-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    perspective: 1000px;
    overflow: visible;
    animation: float 6s ease-in-out infinite;
}

.code-window {
    position: relative;
    background: #151718;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1;
    width: 100%;
    transition: all 0.3s ease-in-out;
}

.code-window {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='grad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%232dc653'/%3E%3Cstop offset='50%25' style='stop-color:%23a358e8'/%3E%3Cstop offset='100%25' style='stop-color:%231e96fc'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 4L22 19H2z' fill='url(%23grad)'/%3E%3C/svg%3E") 12 12, pointer;
}

.code-window:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        0 0 15px rgba(45, 198, 83, 0.3),
        0 0 25px rgba(163, 88, 232, 0.2),
        0 0 35px rgba(30, 150, 252, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-window::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.code-window {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.code-window:hover .code-body::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.code-window:hover .code-body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Animated gradient border */
.code-window::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, 
        #2dc653,
        #1e96fc,
        #a358e8,
        #2dc653
    );
    border-radius: 9px;
    z-index: -1;
    animation: borderGlow 4s linear infinite;
    background-size: 400% 400%;
    opacity: 0.5;
}

/* Animated cursor */
.code-line:last-child::after {
    content: '|';
    position: absolute;
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    color: #4fc9f0;
}

/* Moving highlight effect */
.code-window::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: skewX(-25deg);
    animation: shimmer 4s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    75% {
        transform: translateY(10px) rotate(-1deg);
    }
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes shimmer {
    0% {
        transform: translateX(-150%) skewX(-25deg);
    }
    100% {
        transform: translateX(300%) skewX(-25deg);
    }
}

.code-window-header {
    background: #1e1f20;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-icons svg {
    width: 16px;
    height: 16px;
    margin-left: 10px;
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #6e7681;
}

.header-icons svg:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(45, 198, 83, 0.5));
}

.dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.dots span:nth-child(1) { 
    background: #2dc653;
    box-shadow: 0 0 6px rgba(45, 198, 83, 0.4);
}
.dots span:nth-child(2) { 
    background: #a358e8;
    box-shadow: 0 0 6px rgba(163, 88, 232, 0.4);
}
.dots span:nth-child(3) { 
    background: #1e96fc;
    box-shadow: 0 0 6px rgba(30, 150, 252, 0.4);
}

.code-body {
    padding: 15px;
    position: relative;
    background: #151718;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    transition: all 0.3s ease-out;
}

.code-window:hover .code-body {
    font-size: 16px;
    transform: scale(1.05);
    overflow: hidden;
}

/* Modern vibrant code highlighting */
.code-variable { 
    color: #00ffff; 
    text-shadow: 0 0 2px rgba(0, 255, 255, 0.3);
}
.code-function { 
    color: #ff61d8; 
    text-shadow: 0 0 2px rgba(255, 97, 216, 0.3);
}
.code-string { 
    color: #7fff00; 
    text-shadow: 0 0 2px rgba(127, 255, 0, 0.3);
}
.code-operator { 
    color: #ff3d3d; 
    text-shadow: 0 0 2px rgba(255, 61, 61, 0.3);
}
.code-keyword { 
    color: #ff9100; 
    text-shadow: 0 0 2px rgba(255, 145, 0, 0.3);
}
.code-value { 
    color: #00ff95; 
    text-shadow: 0 0 2px rgba(0, 255, 149, 0.3);
}

@keyframes codeLineHover {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.code-line {
    width: 96%;
    position: relative;
    margin: 4px 0;
    padding: 2px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: transparent;
    background-size: 200% 200%;
}

.code-line-inner {
    display: inline-block;
    padding-left: 20px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover effect on code lines */
.code-line:hover {
    background: linear-gradient(90deg, 
        rgba(45, 198, 83, 0.15),
        rgba(163, 88, 232, 0.15) 33%,
        rgba(30, 150, 252, 0.15) 66%,
        rgba(45, 198, 83, 0.15) 100%
    );
    background-size: 300% 100%;
    animation: codeLineHover 3s ease infinite;
    border-radius: 6px;
    transform: translateX(12px) scale(1.02);
    box-shadow: 
        -2px 0 0 0 #2dc653,
        2px 0 0 0 #1e96fc,
        0 0 20px rgba(163, 88, 232, 0.2);
}

.code-line:hover .code-line-inner {
    transform: translateX(4px);
}

.code-line:hover .code-variable { 
    color: #00ffff; 
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}
.code-line:hover .code-function { 
    color: #ff61d8; 
    text-shadow: 0 0 8px rgba(255, 97, 216, 0.5);
}
.code-line:hover .code-string { 
    color: #7fff00; 
    text-shadow: 0 0 8px rgba(127, 255, 0, 0.5);
}
.code-line:hover .code-operator { 
    color: #ff3d3d; 
    text-shadow: 0 0 8px rgba(255, 61, 61, 0.5);
}
.code-line:hover .code-keyword { 
    color: #ff9100; 
    text-shadow: 0 0 8px rgba(255, 145, 0, 0.5);
}
.code-line:hover .code-value { 
    color: #00ff95; 
    text-shadow: 0 0 8px rgba(0, 255, 149, 0.5);
}

/* Line numbers */
.code-line::before {
    content: attr(data-line);
    position: absolute;
    left: 0;
    color: #636e7b;
    font-size: 0.85em;
    padding-right: 8px;
    user-select: none;
}

/* Additional ambient glow effect */
.code-editor-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle at center,
        rgba(79, 201, 240, 0.1) 0%,
        transparent 70%
    );
    z-index: -1;
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

/* Base font for the section if not set on body */
.dev-hero-section {
    font-family: 'Manrope', sans-serif;
}

.dev-hero-section {
    /* background-color: #0c0a09; */
    color: #f5f5f5;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}


/* Background glow effect */
.dev-hero-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 199, 128, 0.15) 0%, rgba(12, 10, 9, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.tagline {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.tagline svg {
     margin-right: 0.5rem;
     color: #ffc107;
}

.dev-hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.curly-braces {
    color: #a78bfa;
}

.dev-hero-section .lead {
    color: #a1a1aa;
    max-width: 80%;
    margin-bottom: 2.5rem;
}

.btn-custom-light {
    background-color: #f4f4f5;
    color: #0c0a09;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-custom-light:hover {
    background-color: #e4e4e7;
    color: #0c0a09;
}

.btn-custom-dark {
    background-color: transparent;
    color: #f4f4f5;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    font-weight: bold;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-custom-dark:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: #f4f4f5;
}

/* --- Code editor styles --- */
.code-editor-wrapper {
    position: relative;
    z-index: 2;
}

.code-window {
    background-color: rgba(30, 28, 27, 0.7);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.code-window-header {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.header-icons {
     display: flex;
     gap: 0.75rem;
     color: #a1a1aa;
}

.header-icons svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.code-body {
    padding: 1.5rem;
}

.code-body pre, .css-snippet pre {
    margin: 0;
    background: transparent !important;
    padding: 0 !important;
}

.code-body code, .css-snippet code {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Syntax highlighting colors */
.code-keyword { color: #f97583; }
.code-function { color: #d2a8ff; }
.code-variable { color: #79c0ff; }
.code-string { color: #a5d6ff; }
.code-comment { color: #8b949e; }
.code-operator { color: #f97583; }
.code-property { color: #7ee787; }
.code-value { color: #ffab70; }
.code-purple { color: #c991e1; } /* For 'code' in the css snippet */

/* --- Floating CSS snippet and lock icon --- */
.floating-element {
    position: absolute;
    z-index: 3;
    background: rgba(40, 38, 37, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.css-snippet {
    bottom: -50px;
    right: 30px;
    padding: 1rem;
    border-radius: 0.5rem;
    transform: translateX(10%);
}

@keyframes lockGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(36, 233, 85, 0.5));
        transform: scale(1) rotate(0deg);
    }
    33% {
        filter: drop-shadow(0 0 15px rgba(163, 88, 232, 0.6));
        transform: scale(1.05) rotate(2deg);
    }
    66% {
        filter: drop-shadow(0 0 20px rgba(20, 134, 234, 0.927));
        transform: scale(1.1) rotate(-2deg);
    }
    100% {
        filter: drop-shadow(0 0 10px rgba(45, 198, 83, 0.5));
        transform: scale(1) rotate(0deg);
    }
}

.lock-icon {
    bottom: -60px;
    left: -20px;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(40, 38, 37, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 20px rgba(45, 198, 83, 0.2),
        0 0 40px rgba(163, 88, 232, 0.1),
        0 0 60px rgba(30, 150, 252, 0.1);
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

.lock-icon:hover {
    transform: translateY(-5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 0 25px rgba(45, 198, 83, 0.3),
        0 0 50px rgba(163, 88, 232, 0.2),
        0 0 75px rgba(30, 150, 252, 0.2);
}

.lock-icon svg {
    animation: lockGlow 4s ease-in-out infinite;
    color: transparent;
    stroke: url(#lockGradient);
    transition: all 0.3s ease;
}


/* --- Responsive adjustments --- */
@media (max-width: 992px) {
    .dev-hero-section {
        padding: 4rem 0;
        text-align: center;
    }

    .tagline {
        margin-left: auto;
        margin-right: auto;
    }
    
    .dev-hero-section h1 {
        font-size: 3rem;
    }
   
    .dev-hero-section .lead {
         max-width: 100%;
    }

    .d-flex.gap-3 {
        justify-content: center;
    }

    .code-editor-wrapper {
        margin-top: 4rem;
    }
}