/* public/css/features.css - CSS riêng cho trang features */

/* Features Hero Section */
.features-hero {
    padding: 140px 0 80px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.features-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb i {
    font-size: 10px;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 50px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-primary);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    color: white;
}

.stat-info {
    flex: 1;
} 

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Feature Categories */
.feature-categories {
    padding: var(--section-padding);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-btn i {
    font-size: var(--font-size-lg);
}

.tab-content {
    position: relative;
    min-height: 500px;
}

.tab-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.tab-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    position: relative;
}

/* Feature Showcase */
.feature-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.showcase-visual {
    position: relative;
}

.showcase-content h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: 20px;
    color: var(--text-primary);
}

.showcase-content p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.feature-list i {
    color: var(--primary-color);
    font-size: var(--font-size-sm);
}

/* AI Demo */
.ai-demo {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
}

.chat-interface {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.chat-header i {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
}

.chat-header span {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.message.user {
    align-self: flex-end;
    background: var(--gradient-primary);
    color: white;
}

.message.ai {
    align-self: flex-start;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.code-block {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    font-family: monospace;
    font-size: 12px;
}

.code-line {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* Vision Demo */
.vision-demo {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
}

.screen-capture {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.capture-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.capture-header span {
    font-weight: 600;
    color: var(--text-primary);
}

.accuracy {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.capture-area {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    overflow: hidden;
}

.detection-box {
    position: absolute;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    background: rgba(0, 212, 255, 0.1);
    padding: 8px;
    font-size: var(--font-size-xs);
    color: white;
    animation: detection-pulse 2s infinite;
}

.login-btn {
    top: 50px;
    left: 50px;
    width: 130px;
    height: 40px;
}

.email-field {
    top: 120px;
    left: 80px;
    width: 200px;
    height: 30px;
}

@keyframes detection-pulse {
    0%, 100% { 
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
    }
    50% { 
        border-color: var(--primary-light);
        box-shadow: 0 0 0 10px rgba(0, 212, 255, 0);
    }
}

.label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.confidence {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.scanning-line {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    animation: scanning 3s linear infinite;
}

@keyframes scanning {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Automation Demo */
.automation-demo {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
}

.workflow-builder {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.workflow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.workflow-header span {
    font-weight: 600;
    color: var(--text-primary);
}

.running-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.running-status i {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.workflow-steps {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-primary);
    transition: var(--transition-normal);
}

.step.completed {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.step.active {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    animation: active-step 2s infinite;
}

.step.pending {
    background: var(--bg-secondary);
    border-color: var(--border-secondary);
    opacity: 0.7;
}

@keyframes active-step {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(0, 212, 255, 0); }
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    color: white;
}

.step.completed .step-icon {
    background: #22c55e;
}

.step.active .step-icon {
    background: var(--primary-color);
}

.step.pending .step-icon {
    background: var(--text-muted);
}

.step span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Performance Demo */
.performance-demo {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
}

.performance-monitor {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.monitor-header span {
    font-weight: 600;
    color: var(--text-primary);
}

.threads-count {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.performance-metrics {
    flex: 1;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 16px;
}

.metric-label {
    width: 60px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.metric-bar {
    flex: 1;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.metric-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
    animation: metric-pulse 2s infinite;
}

@keyframes metric-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.metric-value {
    width: 60px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
}

/* Security Demo */
.security-demo {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
}

.security-dashboard {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.security-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.security-header span {
    font-weight: 600;
    color: var(--text-primary);
}

.security-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.security-status.secure {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid #22c55e;
}

.security-features {
    flex: 1;
    padding: 40px 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.security-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-primary);
    transition: var(--transition-normal);
}

.security-item.active {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.security-item i {
    font-size: var(--font-size-xl);
    color: #22c55e;
}

.security-item span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    text-align: center;
}

/* All Features Grid */
.all-features {
    padding: var(--section-padding);
}

.features-grid {
    margin-top: 50px;
    margin-bottom: 50px;
}

.feature-item {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-primary);
    transition: var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.05), transparent);
    transition: var(--transition-slow);
}

.feature-item:hover::before {
    left: 100%;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-item .feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    color: white;
    position: relative;
    z-index: 1;
}

.feature-icon.ai {
    background: var(--gradient-primary);
}

.feature-icon.vision {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.feature-icon.automation {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.feature-icon.performance {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.feature-icon.security {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.feature-item h3 {
    font-size: var(--font-size-lg);
    margin-bottom: 12px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.feature-item p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.feature-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.tag {
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Feature Comparison */
.feature-comparison {
    padding: var(--section-padding);
}

.comparison-table {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-primary);
    margin-top: 50px;
    box-shadow: var(--shadow-lg);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-primary);
}

.header-item {
    padding: 30px 20px;
    text-align: center;
    position: relative;
    border-right: 1px solid var(--border-primary);
}

.header-item:last-child {
    border-right: none;
}

.header-item.featured {
    background: rgba(0, 212, 255, 0.05);
    border-left: 1px solid var(--primary-color);
    border-right: 1px solid var(--primary-color);
}

.header-item h3 {
    font-size: var(--font-size-lg);
    margin-bottom: 8px;
    color: var(--text-primary);
}

.price {
    display: block;
    font-size: var(--font-size-base);
    color: var(--primary-color);
    font-weight: 600;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.table-body {
    display: flex;
    flex-direction: column;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid var(--border-primary);
    transition: var(--transition-fast);
}

.table-row:hover {
    background: rgba(0, 212, 255, 0.02);
}

.table-row:last-child {
    border-bottom: none;
}

.feature-name {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    font-weight: 500;
    color: var(--text-primary);
    border-right: 1px solid var(--border-primary);
}

.feature-name i {
    color: var(--primary-color);
    font-size: var(--font-size-sm);
}

.feature-support {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-right: 1px solid var(--border-primary);
}

.feature-support:last-child {
    border-right: none;
}

.feature-support i {
    font-size: var(--font-size-lg);
}

.text-success {
    color: #22c55e;
}

.text-muted {
    color: var(--text-muted);
}

.support-level {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.support-level {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* CTA Section */
.cta {
    padding: var(--section-padding);
    text-align: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: 20px;
    color: var(--text-primary);
}

.cta-content p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .features-hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .feature-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .showcase-visual {
        order: -1;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .comparison-table {
        overflow-x: auto;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 250px 80px 80px 80px;
        min-width: 490px;
    }
    
    .header-item,
    .feature-name,
    .feature-support {
        padding: 15px 10px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        flex-wrap: wrap;
    }
    
    .chat-interface,
    .screen-capture,
    .workflow-builder,
    .performance-monitor,
    .security-dashboard {
        height: 300px;
    }
    
    .chat-messages {
        padding: 15px;
        gap: 12px;
    }
    
    .message {
        font-size: var(--font-size-xs);
        padding: 10px 12px;
    }
    
    .performance-metrics {
        padding: 20px 15px;
        gap: 20px;
    }
    
    .security-features {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 15px;
    }
    
    .workflow-steps {
        padding: 20px 15px;
        gap: 15px;
    }
    
    .step {
        padding: 12px;
    }
    
    .step-icon {
        width: 35px;
        height: 35px;
    }
}

/* Loading animations */
.feature-item,
.stat-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.feature-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.feature-item:nth-child(even) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .detection-box,
    .metric-fill,
    .scanning-line,
    .running-status i {
        animation: none;
    }
    
    .tab-panel {
        transition: none;
    }
}

/* Print styles */
@media print {
    .features-hero::before,
    .cta::before {
        display: none;
    }
    
    .category-tabs {
        display: none;
    }
    
    .tab-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .comparison-table {
        break-inside: avoid;
    }
}