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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #2563eb;
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

header .subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 25px;
    opacity: 0.95;
}

header .tagline {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 30px;
}

.buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: white;
    color: #2563eb;
}

.btn-primary:hover {
    background: #f0f7ff;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* Sections */
section {
    padding: 60px 0;
}

section:nth-child(even) {
    background-color: #f8f9fa;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: #1a1a1a;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 30px 0 15px;
    color: #1a1a1a;
}

.section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid - 2x2 layout */
.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.card h4 {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #2563eb;
}

.card p {
    color: #555;
    line-height: 1.6;
}

/* Process Flow */
.process-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.process-step {
    flex: 1;
    min-width: 200px;
    padding: 25px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.process-step .number {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-weight: 500;
    margin-bottom: 12px;
}

.process-arrow {
    font-size: 1.5rem;
    color: #666;
}

/* Results */
.results-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.95rem;
    color: #666;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: 500;
    color: #1a1a1a;
}

tr:last-child td {
    border-bottom: none;
}

/* Code Block */
.architecture-diagram {
    background: white;
    padding: 30px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin: 30px 0;
    text-align: center;
}

.architecture-diagram pre {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 15px 0;
    line-height: 1.5;
    text-align: left;
}

.architecture-diagram code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #333;
}

/* Highlight box */
.highlight-box {
    background: #f0f7ff;
    border-left: 3px solid #2563eb;
    padding: 20px;
    border-radius: 4px;
    margin: 25px 0;
}

.highlight-box strong {
    color: #2563eb;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer a {
    color: #3b82f6;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    margin: 0 12px;
}

/* Demo Section */
.demo-selector {
    margin: 30px 0;
    text-align: center;
}

.demo-selector label {
    font-size: 1.1rem;
    font-weight: 500;
    margin-right: 15px;
    color: #333;
}

.demo-selector select {
    padding: 12px 24px;
    padding-right: 45px;
    font-size: 1.1rem;
    border: 2px solid #2563eb;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%232563eb" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>'),
        linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    background-repeat: no-repeat;
    background-position: right 15px center, center;
    background-size: 20px, 100%;
}

.demo-selector select:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #1d4ed8;
}

.demo-selector select:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.demo-selector select:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.demo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 30px;
}

.demo-section {
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.demo-section h4 {
    background: #f8f9fa;
    padding: 15px 20px;
    margin: 0;
    color: #2563eb;
    font-size: 1.05rem;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
}

.code-block {
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
    color: #333;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 400px;
    white-space: pre;
}

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

.code-block::-webkit-scrollbar-track {
    background: #e0e0e0;
}

.code-block::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .grid-2x2 {
        grid-template-columns: 1fr;
    }

    .demo-content {
        grid-template-columns: 1fr;
    }

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

    .process-flow {
        flex-direction: column;
    }

    .process-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .results-container {
        grid-template-columns: 1fr;
    }
}