/* ZX Framework Home Page Styles */

:root {
    --zx-primary: #00d9ff;
    --zx-primary-dark: #00a8cc;
    --zx-primary-light: #33e0ff;
    --zx-secondary: #ff6b35;
    --zx-accent: #ffd23f;
    --zx-dark: #0a0a0a;
    --zx-dark-light: #141414;
    --zx-gray: #6b7280;
    --zx-gray-light: #9ca3af;
    --zx-white: #ffffff;
    --zx-bg: #000000;
    --zx-bg-light: #0a0a0a;
    --zx-card-bg: #111111;
    --zx-border: #262626;
    --zx-code-bg: #0a0a0a;
    --zx-text-muted: #737373;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--zx-bg);
    color: var(--zx-white);
    line-height: 1.7;
    overflow-x: hidden;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    background: var(--zx-bg);
    overflow: hidden;
    border-bottom: 1px solid var(--zx-border);
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-content {
    max-width: 1000px;
    width: 100%;
    text-align: left;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
    padding-left: 2rem;
}

@media (max-width: 768px) {
    .hero-content {
        text-align: center;
        padding-left: 0;
    }
}

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

.hero-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: transparent;
    border: 1px solid var(--zx-border);
    border-radius: 4px;
    color: var(--zx-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    animation: fadeIn 1s ease-out 0.2s both;
}

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

.hero-title-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-title-main {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 900;
    color: var(--zx-white);
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.hero-title-accent {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 300;
    color: var(--zx-primary);
    line-height: 1;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .hero-title-wrapper {
        justify-content: center;
    }
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: var(--zx-white);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--zx-text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.25s both;
}

@media (max-width: 768px) {
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-stats {
    display: flex;
    gap: 4rem;
    justify-content: flex-start;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    padding-top: 2rem;
    border-top: 1px solid var(--zx-border);
}

@media (max-width: 768px) {
    .hero-stats {
        justify-content: center;
        gap: 2rem;
    }
}

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

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--zx-primary);
    display: block;
    font-variant-numeric: tabular-nums;
}

.hero-stat-label {
    font-size: 0.8125rem;
    color: var(--zx-text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (max-width: 768px) {
    .hero-cta {
        justify-content: center;
    }
}

.hero-decoration {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0.1;
    z-index: 0;
}

.hero-decoration-line {
    width: 2px;
    height: 100px;
    background: var(--zx-primary);
    transform-origin: center;
}

.hero-decoration-line:nth-child(1) {
    animation: linePulse 3s ease-in-out infinite;
}

.hero-decoration-line:nth-child(2) {
    animation: linePulse 3s ease-in-out infinite 0.3s;
    height: 150px;
}

.hero-decoration-line:nth-child(3) {
    animation: linePulse 3s ease-in-out infinite 0.6s;
    height: 80px;
}

@keyframes linePulse {
    0%, 100% { opacity: 0.1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(1.2); }
}

@media (max-width: 1024px) {
    .hero-decoration {
        display: none;
    }
    .hero {
        min-height: 90vh;
        padding: 1rem;
        padding-top: 8rem;
    }
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--zx-primary);
    color: var(--zx-bg);
    box-shadow: none;
    border: 1px solid var(--zx-primary);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--zx-primary-dark);
    border-color: var(--zx-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--zx-white);
    border: 1px solid var(--zx-border);
}

.btn-secondary:hover {
    background: var(--zx-card-bg);
    border-color: var(--zx-primary);
    color: var(--zx-primary);
    transform: translateY(-1px);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 2rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--zx-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--zx-white);
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--zx-gray-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-github {
    color: var(--zx-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: transparent;
    border: 1px solid var(--zx-border);
    transition: all 0.3s ease;
}

.nav-github:hover {
    background: var(--zx-card-bg);
    border-color: var(--zx-primary);
    color: var(--zx-primary);
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features-header {
    margin-bottom: 6rem;
}

.section-title {
    text-align: left;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--zx-white);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .section-title {
        text-align: center;
    }
}

.section-subtitle {
    text-align: left;
    font-size: 1.125rem;
    color: var(--zx-text-muted);
    margin-bottom: 0;
    max-width: 600px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .section-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.features-grid .feature-card {
    animation: fadeInUp 0.6s ease-out both;
}

.features-grid .feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.features-grid .feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.features-grid .feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.features-grid .feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

.features-grid .feature-card:nth-child(5) {
    animation-delay: 0.5s;
}

.features-grid .feature-card:nth-child(6) {
    animation-delay: 0.6s;
}

.features-grid .feature-card:nth-child(7) {
    animation-delay: 0.7s;
}

.feature-card {
    background: var(--zx-card-bg);
    border: 1px solid var(--zx-border);
    border-radius: 0;
    padding: 1.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-left: 2px solid transparent;
    transform: translateY(0);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--zx-primary);
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.feature-card:hover {
    border-left-color: var(--zx-primary);
    background: var(--zx-bg-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.15), 0 0 0 1px rgba(0, 217, 255, 0.1);
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(0, 217, 255, 0.05) 100%);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: var(--zx-primary);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2) 0%, rgba(0, 217, 255, 0.1) 100%);
    border-color: var(--zx-primary);
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 4px 16px rgba(0, 217, 255, 0.3);
    color: var(--zx-primary-light);
}

.feature-card:hover .feature-icon svg {
    transform: scale(1.1);
}

.feature-card:hover .feature-icon::before {
    width: 100px;
    height: 100px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--zx-white);
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-title {
    color: var(--zx-primary-light);
}

.feature-description {
    color: var(--zx-text-muted);
    line-height: 1.6;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-description {
    color: var(--zx-gray-light);
}

/* Code Example Section */
.code-section {
    padding: 6rem 2rem;
    background: var(--zx-bg);
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--zx-border);
    border-bottom: 1px solid var(--zx-border);
}

@media (max-width: 768px) {
    .code-section {
        padding: 4rem 1rem;
        overflow-x: hidden;
    }
}

.code-header {
    margin-bottom: 4rem;
}

.code-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.code-example {
    background: var(--zx-code-bg);
    border: 1px solid var(--zx-border);
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    overflow: hidden;
    position: relative;
}

.code-example-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--zx-card-bg);
    border-bottom: 1px solid var(--zx-border);
}

.code-example-dots {
    display: flex;
    gap: 0.375rem;
}

.code-example-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--zx-text-muted);
}

.code-example-dots span:nth-child(1) {
    background: var(--zx-secondary);
}

.code-example-dots span:nth-child(2) {
    background: var(--zx-accent);
}

.code-example-dots span:nth-child(3) {
    background: var(--zx-primary);
}

.code-example-title {
    font-size: 0.8125rem;
    color: var(--zx-text-muted);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-example pre {
    margin: 0;
    padding: 2rem 1.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--zx-gray-light);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    touch-action: pan-x;
}

.code-example code {
    color: var(--zx-white);
}

.code-example .keyword {
    color: #c792ea;
}

.code-example .string {
    color: #c3e88d;
}

.code-example .function {
    color: #82aaff;
}

.code-example .comment {
    color: #546e7a;
}

/* Performance Section */
.performance {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.performance-header {
    margin-bottom: 6rem;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.performance-card {
    text-align: left;
    padding: 2.5rem;
    background: var(--zx-card-bg);
    border: 1px solid var(--zx-border);
    border-radius: 0;
    transition: all 0.3s ease;
    border-top: 2px solid transparent;
}

.performance-card:hover {
    border-top-color: var(--zx-primary);
    background: var(--zx-bg-light);
}

@media (max-width: 768px) {
    .performance-card {
        text-align: center;
    }
}

.performance-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--zx-primary);
    margin-bottom: 0.75rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.performance-label {
    font-size: 0.9375rem;
    color: var(--zx-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Footer */
.footer {
    padding: 2rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid var(--zx-border);
    margin-top: 0;
    color: var(--zx-text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--zx-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 90vh;
        padding: 1rem;
        padding-top: 8rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .nav {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .features-grid,
    .performance-grid {
        grid-template-columns: 1fr;
    }
    
    .code-example pre {
        padding: 1.5rem 1rem;
        font-size: 0.7rem;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .code-example-header {
        padding: 0.875rem 1rem;
    }
}

/* Custom scrollbar styling */
.code-example pre {
    scrollbar-width: thin;
    scrollbar-color: var(--zx-primary) var(--zx-code-bg);
}

.code-example pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-example pre::-webkit-scrollbar-track {
    background: var(--zx-code-bg);
}

.code-example pre::-webkit-scrollbar-thumb {
    background: var(--zx-border);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.code-example pre::-webkit-scrollbar-thumb:hover {
    background: var(--zx-primary);
}

/* Additional responsive font size for very small screens */
@media (max-width: 480px) {
    .code-example pre {
        font-size: 0.65rem;
        padding: 1rem 0.75rem;
    }
}

/* Scroll animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out both;
}

