:root {
    --primary-color: #8a5cf6;
    --secondary-color: #6d28d9;
    --accent-color: #4c1d95;
    --text-color: #f9fafb;
    --light-text-color: #d1d5db;
    --muted-text-color: #9ca3af;
    --heading-color: #f9fafb;
    --background-color: #0b0c1e;
    --card-background: #131525;
    --dark-card-background: #0f1019;
    --border-color: #2d2d3a;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --glow-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
    --transition: all 0.3s ease;
    --radius: 8px;
    --gradient-bg: linear-gradient(135deg, #4c1d95 0%, #2e1065 100%);
    --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: radial-gradient(circle at 50% 10%, rgba(90, 50, 130, 0.15) 0%, rgba(0, 0, 0, 0) 60%);
    min-height: 100vh;
}

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

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Button Styles */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
}

.btn i {
    margin-right: 8px;
}

.btn span {
    vertical-align: middle;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4);
    color: white;
}

.btn-secondary {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(139, 92, 246, 0.2);
    color: var(--text-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-github {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: var(--radius);
}

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

.btn-github i {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 8px;
}

/* Section Styles */

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title:after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    margin-bottom: 60px;
    text-align: center;
    color: var(--muted-text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Header Styles */

header {
    background-color: rgba(11, 12, 30, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.logo a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: blur(8px);
    opacity: 0.5;
    z-index: -1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--light-text-color);
    font-weight: 500;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Styles */

#hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 80px 0;
    background: radial-gradient(circle at 50% 50%, rgba(90, 50, 130, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
}

.hero-content {
    flex: 1;
    padding-right: 30px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 700;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--light-text-color);
    font-weight: 600;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--muted-text-color);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image:after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(60px);
    z-index: -1;
}

.hero-image img {
    max-width: 90%;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Hero section button animation */

.hero-buttons .btn-primary {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
    }

    50% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6);
    }

    100% {
        box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
    }
}

/* Features Styles */

#features {
    background-color: var(--dark-card-background);
    position: relative;
    overflow: hidden;
}

#features:before {
    content: "";
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--dark-card-background));
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: var(--card-background);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--border-color);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--muted-text-color);
}

/* Architecture Styles */

#architecture {
    background-color: var(--background-color);
}

.architecture-grid {
    display: block;
    margin: 40px 0 30px;
}

.architecture-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-color);
    text-align: center;
}

.architecture-flow h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-color);
    text-align: center;
}

.flow-list {
    counter-reset: flow-counter;
    max-width: 800px;
    margin: 0 auto;
    list-style-type: decimal;
    padding-left: 20px;
}

.flow-list li {
    position: relative;
    margin-bottom: 15px;
    color: var(--light-text-color);
}

.flow-list li span {
    display: inline;
}

/* Mermaid Diagram Styling */

.mermaid-container {
    background-color: var(--card-background);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-align: center;
}

.mermaid {
    margin: 0 auto;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* Override Mermaid styles */

.flow-description {
    margin-top: 30px;
}

/* Configuration Styles */

#configuration {
    background-color: var(--dark-card-background);
}

.config-section {
    background-color: var(--card-background);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.config-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.config-tab {
    cursor: pointer;
    padding: 8px 16px;
    background: rgba(138, 92, 246, 0.1);
    border-radius: var(--radius);
    color: var(--light-text-color);
    border: 1px solid transparent;
    white-space: nowrap;
}

.config-tab.active {
    background: rgba(138, 92, 246, 0.2);
    border-color: var(--primary-color);
    color: var(--text-color);
}

.config-tab:hover {
    background: rgba(138, 92, 246, 0.15);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.server-group {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    position: relative;
}

.server-group .server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.server-group .server-title {
    font-weight: 500;
    color: var(--light-text-color);
    font-size: 1rem;
}

.config-io-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.config-io-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
}

.config-io-buttons .btn i {
    font-size: 1rem;
}

.config-io-buttons label.btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Documentation Styles */

#documentation {
    background-color: var(--dark-card-background);
}

.github-link-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding: 15px;
}

.github-link-container .btn-github {
    font-size: 1.2rem;
    padding: 15px 30px;
}

/* Footer Styles */

#footer {
    background-color: var(--dark-card-background);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-about h3,.footer-links h3,.footer-github h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-about p {
    color: var(--muted-text-color);
    max-width: 400px;
}

.footer-links ul,.footer-github ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,.footer-github a {
    color: var(--muted-text-color);
}

.footer-links a:hover,.footer-github a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--muted-text-color);
}

.footer-bottom a {
    color: var(--light-text-color);
}

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

/* Animations */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Consolidated Media Queries */

@media (max-width: 992px) {
    /* Desktop/tablet layout adjustments */

    #hero {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .hero-content p {
        max-width: 90%;
    }

    .hero-buttons {
        margin-top: 30px;
    }

    .architecture-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    /* Mobile layout adjustments */

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--card-background);
        flex-direction: column;
        padding: 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 100;
    }

    .nav-links.active {
        max-height: 300px;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Form and UI adjustments */

    .tab {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    /* Small mobile adjustments */

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .feature-card {
        padding: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Messages and Notifications */

/* Code Blocks */

.code-block {
    position: relative;
    background-color: var(--dark-card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Prevent nested code blocks appearance */
.code-block code {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    display: block;
    box-shadow: none;
    border-radius: 0;
}

/* Highlight.js customizations */

.code-block .copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.code-block .copy-btn:active {
    transform: scale(0.95);
}

/* Important Note Section */

.important-note {
    margin: 25px 0;
    padding: 20px;
    border-radius: var(--radius);
    background-color: rgba(138, 92, 246, 0.1);
    border-left: 4px solid var(--primary-color);
}

.important-note h4 {
    display: flex;
    align-items: center;
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 16px;
}

.important-note h4 i {
    margin-right: 8px;
    font-size: 18px;
}

.important-note p {
    margin-bottom: 12px;
    font-size: 14px;
}

.important-note p:last-child {
    margin-bottom: 0;
}

.small-code {
    font-size: 14px;
    padding: 10px;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .tabs-navigation {
        flex-wrap: wrap;
    }

    .code-toggle-buttons {
        flex-wrap: wrap;
    }
}

/* Code toggle styles */

.code-toggle {
    margin-bottom: 1.5rem;
}

.code-toggle-header {
    display: flex;
    gap: 5px;
    margin-bottom: 0.5rem;
}

.code-toggle-button {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    background-color: rgba(138, 92, 246, 0.1);
    color: var(--light-text-color);
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.code-toggle-button:hover {
    background-color: rgba(138, 92, 246, 0.2);
}

.code-toggle-button.active {
    background-color: rgba(138, 92, 246, 0.25);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.code-toggle-content {
    display: none;
    margin: 0;
}

.code-toggle-content.active {
    display: block;
}

.code-toggle pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Examples Tabs Styling */

.examples-tabs {
    margin-top: 30px;
}

.tabs-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab-btn {
    background-color: rgba(138, 92, 246, 0.1);
    color: var(--light-text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.tab-btn:hover {
    background-color: rgba(138, 92, 246, 0.2);
    border-color: var(--border-color);
}

.tab-btn.active {
    background-color: rgba(138, 92, 246, 0.25);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* Usage Guide Styles */

.usage-steps {
    margin-top: 40px;
    margin-bottom: 40px;
}

.step-container {
    margin-bottom: 60px;
    background-color: var(--card-background);
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
}

.step-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.5rem;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 30px;
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(138, 92, 246, 0.4);
}

.agent-selection {
    margin-top: 30px;
}

.agent-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.yaml-code {
    position: relative;
    background-color: var(--dark-card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px 15px 15px;
    margin: 15px 0;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Prevent nested code blocks appearance in yaml-code */
.yaml-code code {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    display: block;
    box-shadow: none;
    border-radius: 0;
}

.yaml-code .copy-btn,.code-block .copy-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 4px;
    color: var(--muted-text-color);
    padding: 5px 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
}

.yaml-code .copy-btn:hover,.code-block .copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.yaml-code .copy-btn:active,.code-block .copy-btn:active {
    transform: scale(0.95);
}

.yaml-code code {
    display: block;
    color: var(--light-text-color);
    line-height: 1.6;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
}

/* Ensure consistent font for highlighted code */

.agent-response {
    background-color: rgba(29, 32, 45, 0.6);
    color: var(--light-text-color);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border: 1px solid var(--border-color);
    position: relative;
    padding: 15px 15px 15px 40px;
}

.agent-response:before {
    content: "A:";
    position: absolute;
    left: 15px;
    color: var(--primary-color);
    font-weight: bold;
}

.agent-response p {
    margin-top: 0;
    margin-bottom: 10px;
}

.agent-response p:last-child {
    margin-bottom: 0;
}

.agent-response ul {
    margin-top: 5px;
    margin-bottom: 15px;
    padding-left: 20px;
}

.agent-response li {
    margin-bottom: 5px;
}

/* Configuration Templates */

.configuration-templates {
    margin-top: 1.5rem;
    height: auto;
    position: relative;
}

.configuration-templates .yaml-code {
    min-height: 600px;
    height: auto;
    max-height: none;
    overflow-y: visible;
}

.configuration-templates .tab-content {
    display: none;
    height: auto;
}

.configuration-templates .tab-content.active {
    display: block;
}

/* Override for section padding */

section {
    padding: 5rem 0;
}

/* Override for h3 margins */

h3 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* Override for step-container */

.step-container {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
}

/* Override for agent-selection */

.agent-selection {
    margin-bottom: 2.5rem;
}

/* Responsive adjustments */

@media (max-width: 768px) {
    .step-container {
        padding: 25px 20px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .yaml-code {
        padding: 15px;
        font-size: 12px;
    }
}
