/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
}

.lang-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: #f5576c;
}

.btn-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #f5576c;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3748;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    border-radius: 15px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #2d3748;
}

.feature-card p {
    color: #4a5568;
    line-height: 1.6;
}

/* Advanced Features Section */
.advanced-features {
    padding: 80px 0;
    background: #f8fafc;
}

.advanced-features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3748;
}

.advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.advanced-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.advanced-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.advanced-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.advanced-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2d3748;
}

.advanced-card p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 15px;
}

.code-example {
    background: #2d3748;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    word-break: break-all;
    border-left: 4px solid #667eea;
}

.code-example code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Demo Section */
.demo-section {
    padding: 80px 0;
    background: white;
}

.demo-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3748;
}

.demo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.demo-video {
    position: relative;
}

.video-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-placeholder:hover {
    transform: scale(1.02);
}

.play-button {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.video-placeholder p {
    font-size: 1.1rem;
    margin: 0;
}

.demo-features h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2d3748;
}

.demo-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.demo-feature:last-child {
    border-bottom: none;
}

.demo-icon {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

.demo-feature span:last-child {
    color: #4a5568;
    line-height: 1.5;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.step {
    text-align: center;
    padding: 30px;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.step p {
    opacity: 0.9;
    line-height: 1.6;
}

/* Examples Section */
.examples-section {
    padding: 80px 0;
    background: #f1f5f9;
}

.examples-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3748;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.example-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.example-card h3 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.example-html, .example-xpath {
    margin-bottom: 15px;
}

.example-html span, .example-xpath span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    display: block;
    margin-bottom: 8px;
}

.code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre;
}

.xpath-result {
    background: #1a365d;
    border-left: 4px solid #4299e1;
}

.example-desc {
    color: #4a5568;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

/* Download Section */
.download {
    padding: 80px 0;
    background: white;
    text-align: center;
}

.download h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.download p {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.download .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.download .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.download .btn-secondary {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
}

.download .btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Footer */
footer {
    background: #2d3748;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-top: 20px;
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .code-example {
        font-size: 10px;
        padding: 10px;
    }
}

/* Loading animation for language switch */
.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}