:root {
    --bg-color: #0f172a;
    --card-color: rgba(30, 41, 59, 0.5);
    --primary-text: #f1f5f9;
    --secondary-text: #94a3b8;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text);
    overflow-x: hidden;
}

/* Background and Page Structure */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}
.blob1 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    top: -150px;
    left: -150px;
    animation: move 20s infinite alternate;
}
.blob2 {
    width: 300px;
    height: 300px;
    background: var(--accent-blue);
    bottom: -100px;
    right: -100px;
    animation: move 25s infinite alternate-reverse;
}
.blob3 {
    width: 250px;
    height: 250px;
    background: var(--accent-pink);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: move 15s infinite alternate;
}
@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(200px, 100px) scale(1.2);
    }
}
.page-container {
    position: relative;
    z-index: 1;
}

/* Header & Nav */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 1rem 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}
nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}
nav a {
    text-decoration: none;
    color: var(--primary-text);
    font-weight: 600;
    transition: color 0.3s ease;
}
nav a:hover {
    color: var(--accent-pink);
}

/* === NEW HERO SECTION STYLES === */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Text on left, editor on right */
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.hero-content {
    text-align: left;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.gradient-text {
    background: linear-gradient(
        90deg,
        var(--accent-purple),
        var(--accent-pink),
        var(--accent-blue)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 5s linear infinite;
}
@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.hero-content p {
    font-size: 1.1rem;
    color: var(--secondary-text);
    margin-bottom: 2.5rem;
    max-width: 500px;
}
.cta-button {
    background: linear-gradient(
        90deg,
        var(--accent-purple),
        var(--accent-pink)
    );
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Code Editor (now in Hero) */
.code-editor-wrapper {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}
.editor-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #334155;
}
.editor-dots {
    display: flex;
    gap: 0.5rem;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red {
    background-color: #ef4444;
}
.dot.yellow {
    background-color: #f59e0b;
}
.dot.green {
    background-color: #22c55e;
}
.editor-title {
    color: var(--secondary-text);
    margin: 0 auto;
    font-family: "Courier New", Courier, monospace;
}
.editor-body {
    flex-grow: 1;
}
.editor-body pre {
    padding: 1.5rem;
    font-family: "Courier New", Courier, monospace;
    font-size: 1.1rem;
    line-height: 1.7;
    height: 100%;
    white-space: pre-wrap;
}
.code-line-number {
    display: inline-block;
    width: 2em;
    text-align: right;
    margin-right: 1em;
    color: var(--secondary-text);
    user-select: none;
}
.code-keyword {
    color: #569cd6;
}
.code-function {
    color: #dcdcaa;
}
.code-string {
    color: #ce9178;
}
.code-number {
    color: #b5cea8;
}
.code-type {
    color: #4ec9b0;
}
.code-comment {
    color: #6a9955;
}

/* Typewriter Cursor Styling */
#animated-code::after {
    content: "▋";
    display: inline-block;
    color: var(--accent-pink);
    animation: blink 1s step-end infinite;
}
#animated-code.typing-done::after {
    content: "";
}
@keyframes blink {
    from,
    to {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Section Styling */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}
.features-section {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.feature-card p {
    color: var(--secondary-text);
    line-height: 1.6;
}

/* Dynamic Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(60px) rotate(3deg);
    transition:
        opacity 1s ease-out,
        transform 1s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0) rotate(0);
}
.anim-delay-1 {
    transition-delay: 200ms;
}
.anim-delay-2 {
    transition-delay: 400ms;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text);
}

.why-wats-section {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.why-wats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.why-wats-text h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-text);
}

.why-wats-text p {
    color: var(--secondary-text);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.why-wats-code {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.code-example-block {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.code-label {
    padding: 0.5rem 1rem;
    background-color: #334155;
    color: var(--secondary-text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.code-example-block pre {
    padding: 1.5rem;
    font-family: var(--font-mono);
}

/* Add some syntax highlighting colors for the new example */
.code-variable {
    color: #8be9fd;
}
.code-comment {
    color: #6272a4;
}

@media (max-width: 950px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        text-align: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .why-wats-container {
        grid-template-columns: 1fr;
    }

    #code-editor-wrapper {
        display: none;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
}
