/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF2D20;
    --primary-dark: #E02414;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --code-bg: #F3F4F6;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Banner */
.banner {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.banner p {
    margin: 0;
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 2.5rem;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.github-link:hover {
    color: var(--primary-color);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.5rem 3rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    width: 200px;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-shortcut {
    position: absolute;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--code-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    padding: 6rem 0 8rem;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #fef2f2 0%, #fff 30%, #f0f9ff 100%);
    opacity: 0.8;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 45, 32, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 45, 32, 0.03) 0%, transparent 50%);
    animation: patternFloat 20s ease-in-out infinite;
}

@keyframes patternFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.75rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.text-highlight {
    color: var(--primary-color);
    background: linear-gradient(135deg, #FF2D20 0%, #ff4d3d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.75;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 45, 32, 0.25);
}

.btn-primary:hover {
    background: #d92415;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 45, 32, 0.35);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.code-snippet {
    background: var(--code-bg);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-color);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    margin-bottom: 3rem;
}

.code-snippet code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 2s steps(50) 1.3s forwards, blink 0.75s step-end infinite;
    border-right: 2px solid var(--primary-color);
    width: 0;
}

.code-prompt {
    color: var(--primary-color);
    margin-right: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.3s ease-out 1.3s forwards;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    padding-top: 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #FF2D20 0%, #ff4d3d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-media {
    position: relative;
}

.video-container {
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    aspect-ratio: 16 / 9;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.code-text {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: var(--primary-color);
    font-family: 'Monaco', monospace;
    font-size: 1.5rem;
}

.play-button {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-button:hover {
    transform: scale(1.1);
}

/* Ecosystem Section */
.ecosystem {
    padding: 6rem 0;
    background: var(--bg-white);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.section-icon {
    color: var(--primary-color);
}

.section-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ecosystem-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.ecosystem-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 3rem;
    line-height: 1.75;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 3rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Package Cards */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.package-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.package-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(255, 45, 32, 0.1);
    transform: translateY(-2px);
}

.package-icon {
    flex-shrink: 0;
}

.package-icon img {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
}

.package-info {
    flex: 1;
}

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

.package-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.package-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.package-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer */
.footer {
    background: var(--bg-light);
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo svg {
    width: 48px;
    height: 48px;
}

.footer-tagline {
    font-size: 1.125rem;
    color: var(--primary-color);
    line-height: 1.6;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-legal {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

.footer-logo-large {
    position: absolute;
    bottom: -2rem;
    right: -2rem;
    z-index: 0;
    opacity: 0.03;
}

.footer-logo-large h2 {
    font-size: 15rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .packages-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

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

    .search-box {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .ecosystem-title {
        font-size: 2rem;
    }

    .packages-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-logo-large h2 {
        font-size: 8rem;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-button {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0 3rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .ecosystem {
        padding: 3rem 0;
    }

    .ecosystem-title {
        font-size: 1.5rem;
    }

    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-logo-large {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-right-color: var(--primary-color);
    }
    51%, 100% {
        border-right-color: transparent;
    }
}

.hero-content,
.ecosystem {
    animation: fadeIn 0.8s ease-out;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .banner,
    .footer {
        display: none;
    }
}