/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d50f25;
    --secondary-color: #b00d1f;
    --accent-color: #f97316;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* Header and Navigation */
header {
    background-color: var(--bg-dark);
    color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: white;
}

.tagline {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}

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

.nav-menu a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

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

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #fce7e9;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.features h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Getting Started Section */
.getting-started {
    padding: 5rem 0;
}

.getting-started h2 {
    font-size: 2.25rem;
    margin-bottom: 3rem;
    text-align: center;
}

.quick-start, .prerequisites, .server-types {
    margin-bottom: 3rem;
}

.quick-start h3, .prerequisites h3, .server-types h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.code-block {
    background-color: var(--bg-dark);
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    color: #e5e7eb;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.prerequisites ul {
    list-style: none;
    padding-left: 0;
}

.prerequisites li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-light);
}

.prerequisites li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: var(--shadow);
    border-radius: 0.5rem;
    overflow: hidden;
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th, td {
    padding: 1rem;
    text-align: left;
}

tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

tbody tr:hover {
    background-color: #fee;
}

/* Architecture Section */
.architecture {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.architecture h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.architecture > .container > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

.architecture-diagram {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.component {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.component:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.component.bastion {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-color: var(--primary-color);
}

.component h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.component p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.component .ip {
    font-weight: 600;
    color: var(--text-color);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
}

.architecture-note {
    background-color: #fff5f5;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.architecture-note p {
    color: var(--text-color);
    margin: 0;
}

/* Components Section */
.components {
    padding: 5rem 0;
}

.components h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

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

.component-detail {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.component-detail:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.component-detail h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.component-detail ul {
    list-style: none;
    padding-left: 0;
}

.component-detail li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.component-detail li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Why Choose Section */
.why-choose {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.why-choose h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

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

.comparison-item {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.comparison-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.comparison-item h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.comparison-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Use Cases Section */
.use-cases {
    padding: 5rem 0;
}

.use-cases h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

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

.use-case-card {
    background: linear-gradient(135deg, #fff 0%, var(--bg-light) 100%);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.use-case-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.use-case-card p {
    color: var(--text-light);
    line-height: 1.6;
}

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

.cta-section h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #fce7e9;
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    color: #e5e7eb;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section .author-link {
    margin-top: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        width: 100%;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .features h2,
    .getting-started h2,
    .architecture h2,
    .components h2,
    .why-choose h2,
    .use-cases h2,
    .cta-section h2 {
        font-size: 1.75rem;
    }

    .feature-grid,
    .architecture-diagram,
    .component-list,
    .comparison,
    .use-case-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

    .features,
    .getting-started,
    .architecture,
    .components,
    .why-choose,
    .use-cases,
    .cta-section {
        padding: 3rem 0;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    table {
        font-size: 0.75rem;
    }
}
