/* Features page specific styles */

/* Features Hero */
.features-hero {
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        var(--secondary) 100%);
    color: white;
    padding: 4rem 0;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Feature Highlights */
.feature-highlights {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.highlight-icon {
    font-size: 1.2rem;
}

.highlight-text {
    font-weight: 500;
}

/* Demo Container */
.demo-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.1);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

.demo-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
}

.demo-tabs {
    display: flex;
}

.demo-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

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

.demo-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.demo-content {
    position: relative;
}

.demo-panel {
    display: none;
    padding: 0;
}

.demo-panel.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.code-editor {
    background: var(--code-bg);
    padding: 1.5rem;
    border-right: 1px solid var(--border);
}

.code-editor pre {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-editor code {
    color: var(--code-text);
    font-family: var(--font-mono);
}

.demo-output {
    background: #1e293b;
    color: #e2e8f0;
}

.output-header {
    background: #334155;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid #475569;
}

.output-content {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.output-line {
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.performance-note,
.syntax-note,
.features-note {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.performance-note {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.syntax-note {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.features-note {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* Feature Categories */
.feature-categories {
    background: var(--surface);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: 2px solid var(--border);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Features Grid */
.features-grid {
    padding: 4rem 0;
    background: var(--background);
}

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

/* Feature Card */
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.feature-card.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgb(59 130 246 / 0.15);
    transform: translateY(-2px);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Feature Details */
.feature-details {
    background: var(--background);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Feature Example */
.feature-example {
    background: var(--code-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.feature-example pre {
    margin: 0;
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
}

.feature-example code {
    color: var(--code-text);
    font-family: var(--font-mono);
}

/* Performance Section */
.performance-section {
    background: linear-gradient(135deg, 
        var(--surface) 0%, 
        var(--background) 100%);
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-description {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.benchmark-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.benchmark-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgb(59 130 246 / 0.15);
}

.benchmark-card h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.benchmark-chart {
    display: grid;
    gap: 1rem;
}

.benchmark-bar {
    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: center;
    gap: 1rem;
}

.benchmark-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.benchmark-fill {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 2rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1rem;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.benchmark-fill.memory {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.benchmark-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Features CTA */
.features-cta {
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        var(--secondary) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.cta-buttons .btn-primary {
    background: white;
    color: var(--primary);
}

.cta-buttons .btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.cta-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .feature-highlights {
        gap: 1rem;
    }
    
    .highlight-item {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .demo-panel.active {
        grid-template-columns: 1fr;
    }
    
    .code-editor {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .category-nav {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .features-grid .container {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }
    
    .benchmark-bar {
        grid-template-columns: 60px 1fr;
        gap: 0.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}
