* {
    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(380px, 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);
    text-decoration: none;
    color: inherit;
    display: block;
}


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

.project-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

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

.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.main {
    background: #dc2626;
}

.project-license {
    background: #6b7280;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

/* Sponsors Section - Simplified */
.sponsors-section {
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.sponsors-section h3 {
    margin-bottom: 2.5rem;
    color: #333;
    border-bottom: 2px solid #0F63EE;
    padding-bottom: 0.5rem;
    text-align: center;
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.sponsor-item {
    display: inline-block;
}

.sponsor-item:hover {
    transform: scale(1.05);
    opacity: 1;
}

.sponsor-item img {
    max-width: 180px;
    height: auto;
    display: block;
    filter: grayscale(0);
    transition: filter 0.3s ease;
}

.sponsor-item:hover img {
    filter: grayscale(0) drop-shadow(0 4px 8px rgba(15, 99, 238, 0.2));
}

.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;
}

/* Tablet styles (601px to 1024px) */
@media (max-width: 1024px) and (min-width: 601px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    /* Tablet navigation - horizontal with wrap */
    .header-content nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }

    h1 {
        font-size: 1.75rem;
    }

    .logo {
        height: 35px;
    }

    /* Tablet button styles - smaller but not full width */
    .github-link,
    .playground-link {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .language-switcher {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .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.2rem;
    }

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

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Mobile styles (up to 600px) */
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Mobile navigation - 3+1 grid layout */
    .header-content nav {
        display: grid !important; /* Override inline style */
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem !important;
        width: 100%;
    }

    /* Position each button using nth-child */
    .header-content nav a:nth-child(1) { grid-column: 1; }  /* Language */
    .header-content nav a:nth-child(2) { grid-column: 2; }  /* Documentation */
    .header-content nav a:nth-child(3) { grid-column: 3; }  /* GitHub */
    .header-content nav a:nth-child(4) {
        grid-column: 1 / -1;  /* Playground - full width */
    }

    h1 {
        font-size: 1.5rem;
    }

    .logo {
        height: 30px;
    }

    /* Compact styling for Documentation and GitHub buttons */
    .github-link {
        width: 100%;
        padding: 0.5rem 0.4rem;
        font-size: 0.85rem;
        min-height: 42px;
        text-align: center;
        border: 2px solid white;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;  /* Prevent text wrapping */
    }

    /* Language switcher - keep original styling, no border */
    .language-switcher {
        width: 100%;
        font-size: 0.8rem;
        padding: 0.5rem 0.3rem;
        min-height: 42px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        /* Inherits original styling - no border added */
    }

    /* Playground button - larger and prominent */
    .playground-link {
        width: 100%;
        padding: 0.7rem 1rem !important;
        font-size: 1rem !important;
        min-height: 48px !important;
        font-weight: 600;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    main {
        padding: 1.5rem;
        border-radius: 8px;
    }

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

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

    .hero p {
        font-size: 1.05rem;
        line-height: 1.6;
        padding: 0 0.5rem;
    }

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

    .feature {
        padding: 1.25rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-name {
        font-size: 0.9rem;
    }

    /* Sponsor logo responsive sizing */
    .sponsor-item img {
        max-width: 140px;
    }
}

/* Small mobile styles (up to 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    main {
        padding: 1rem;
    }

    .header-content nav {
        gap: 0.3rem !important;
    }

    h1 {
        font-size: 1.3rem;
    }

    .logo {
        height: 28px;
    }

    /* Even more compact for small screens */
    .language-switcher {
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
        min-height: 40px;
    }

    .github-link {
        padding: 0.45rem 0.3rem;
        font-size: 0.8rem;
        min-height: 40px;
    }

    .playground-link {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.95rem !important;
        min-height: 44px !important;
    }

    .hero {
        padding: 1.5rem 0 0.75rem 0;
        margin-bottom: 1rem;
    }

    .hero h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 0.75rem;
    }

    .feature {
        padding: 1rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .project-card {
        padding: 1.25rem;
    }

    /* Sponsor logo small screen sizing */
    .sponsor-item img {
        max-width: 120px;
    }
}

/* ========================================
   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 hover state */

.project-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08),
        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);
}

/* Project cards entrance animation */
.project-card {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: transform, opacity;
}

.project-card.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    /* Quick transitions for hover after animation completes */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Sponsor items entrance animation */
.sponsor-item {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: transform, opacity;
}

.sponsor-item.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    /* Quick transitions for hover after animation completes */
    transition: transform 0.3s ease, filter 0.3s ease;
}


/* 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%;
    }
}
