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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #0F63EE 0%, #1e40af 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    width: auto;
    height: 40px;
    filter: brightness(0) invert(1);
}

.github-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid white;
    border-radius: 5px;
    transition: all 0.3s;
}

.github-link:hover {
    background: white;
    color: #0F63EE;
}

.playground-link {
    color: #0F63EE;
    background: white;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border: 2px solid white;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.playground-link:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
}

.language-switcher {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 18px;
    transition: all 0.3s;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.language-switcher:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

main {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero {
    text-align: center;
    padding: 4rem 0 2rem 0;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: #333;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.3rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background: #f8f9fa;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: #333;
}

.api-section {
    margin-bottom: 3rem;
}

.api-section h3 {
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #0F63EE;
    padding-bottom: 0.5rem;
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.api-endpoint {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #0F63EE;
}

.api-method {
    font-weight: bold;
    color: #0F63EE;
    font-size: 0.9rem;
}

.api-path {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-name {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.project-type {
    background: #0F63EE;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.project-type.frontend {
    background: #059669;
}

.project-type.backend {
    background: #d97706;
}

.project-type.demo {
    background: #7c3aed;
}

.project-description {
    color: #666;
    line-height: 1.5;
}

.quick-start {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.quick-start h3 {
    margin-bottom: 1rem;
    color: #333;
}

pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'Courier New', monospace;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.tech-badge {
    background: #0F63EE;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.example-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.example-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.example-item h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.markdown-example {
    background: #f8f9fa;
    border-radius: 5px;
    overflow: hidden;
}

.markdown-example pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    margin: 0;
    border-radius: 0;
    overflow-x: auto;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
}

.markdown-example code {
    font-family: 'Courier New', monospace;
}

footer {
    text-align: center;
    color: white;
    padding: 2rem 0;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .hero {
        padding: 3rem 0 1.5rem 0;
        margin-bottom: 1.5rem;
    }

    .hero h2 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    .hero p {
        max-width: 600px;
        font-size: 1.25rem;
    }

    .features {
        max-width: 900px;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .hero {
        padding: 2.5rem 0 1rem 0;
        margin-bottom: 2rem;
    }

    .hero h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        letter-spacing: -0.01em;
    }

    .hero p {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .features {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 1.5rem;
    }

    .feature {
        padding: 1.25rem;
    }
}

/* ========================================
   ANIMATION ENHANCEMENTS
   ======================================== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Enhanced background with animated gradient */
body {
    background: linear-gradient(135deg, #0F63EE 0%, #1e40af 50%, #0F63EE 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Floating background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: floatPattern 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes floatPattern {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(360deg); }
}

/* Page load animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.slide-in-from-top {
    opacity: 0;
    transform: translateY(-50px);
    animation: slideInFromTop 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Enhanced header animations */
header {
    will-change: transform;
}

/* Logo animation */
.logo {
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: rotate(360deg) scale(1.1);
}

/* Typewriter effect for hero title */
.typewriter {
    border-right: 2px solid #333;
    white-space: nowrap;
    animation: blinkCursor 1s infinite step-end;
    display: inline-block; /* Make element width adapt to content */
    min-width: 1px; /* Ensure cursor shows even when content is empty */
}

.typewriter.typing-complete {
    animation: none;
    border-right: none;
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: #333; }
}

/* Enhanced feature icons */
.feature-icon {
    transition: transform 0.3s ease;
    will-change: transform;
}

.feature:hover .feature-icon {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-15px,0);
    }
    70% {
        transform: translate3d(0,-7px,0);
    }
    90% {
        transform: translate3d(0,-2px,0);
    }
}

/* Enhanced project cards */
.project-card {
    will-change: transform, box-shadow;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(15, 99, 238, 0.1);
}

/* Glow effect for special buttons */
.playground-link {
    position: relative;
    overflow: hidden;
}

.playground-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.playground-link:hover::before {
    left: 100%;
}

/* Language switcher animation */
.language-switcher {
    position: relative;
    transition: all 0.3s ease;
}

.language-switcher:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Ripple effect for buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Scale reveal for cards */
.scale-reveal {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-reveal.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Code block reveal */
.code-reveal {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.code-reveal.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter {
    animation: countUp 0.8s ease forwards;
}

/* Pulse effect for important elements */
.pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(15, 99, 238, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(15, 99, 238, 0.6);
    }
}

/* Loading skeleton for dynamic content */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Playground CTA Button Styles */
.playground-cta {
    display: inline-block;
    background: linear-gradient(135deg, #0F63EE 0%, #A665F6 100%);
    background-size: 200% 200%;
    color: white;
    padding: 1.5rem 4rem;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(15, 99, 238, 0.4);
    transform: translateY(0) scale(1);
    transition: all 0.3s ease;
    animation: pulse-glow 2s infinite, gradientShift 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.playground-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(15, 99, 238, 0.6);
    background-position: 100% 0;
    animation-play-state: paused;
}

.playground-cta:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 8px 25px rgba(15, 99, 238, 0.5);
}

.playground-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.playground-cta:hover::before {
    left: 100%;
}

/* Enhanced pulse animation for playground button */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}
