:root {
    --md-primary-bg-color: #ffffff;
    --md-primary-fg-color: #182027;
    --md-typeset-a-color: #66adff;
}

[data-md-color-scheme=default] {
    --md-typeset-a-color: #0067df;

    .md-nav--primary .md-nav__title[for=__drawer] {
        background-color: #ffffff !important;
        color: #ffffff !important;
    }

    .md-nav__source {
        background-color: #ffffff !important;
        color: #182027 !important;
    }

    .report-issue-link {
        color: #182027 !important;
    }

    .md-nav__item--section:after {
        background-color: #182027 !important;
    }

    .md-nav__item--section > .md-nav__link[for] {
        color: #182027 !important;
    }
}

[data-md-color-scheme=slate] {
    --md-typeset-a-color: #66adff;

    body& {
        background-color: #182027 !important;
    }

    .md-header {
        background-color: #182027;
        color: #ffffff;
    }

    .md-nav--primary .md-nav__title[for=__drawer] {
        background-color: #182027 !important;
        color: #182027 !important;
    }

    .md-nav__source {
        background-color: #182027 !important;
        color: #ffffff !important;
    }

    .report-issue-link {
        color: #ffffff !important;
    }

    .md-nav__item--section:after {
        background-color: #ffffff !important;
    }

    .md-nav__item--section > .md-nav__link[for] {
        color: #ffffff !important;
    }
}

.md-header {
    --md-primary-bg-color: #182027;
    --md-primary-fg-color: #ffffff;

}

.md-header .md-header__title .md-header__topic:first-child {
    display: none;
}

.md-header__button:hover {
    opacity: 1 !important;
}

a[href^="https://"]:not(.md-source):not(.skip-link-icon)::after {
    content: "↗";
    font-size: 1em;
}

@media screen and (min-width: 60em) {
    .md-search__form {
        background-color: #ffffff;
        color: #182027 !important;
        border: 1px solid #182027;

    }

    .md-search__form:hover {
        background-color: #ffffff;
        border-color: #66adff;
    }

    [data-md-color-scheme=slate] .md-search__form {
        background-color: #182027;
        color: #ffffff !important;
        border: 1px solid #ffffff;
    }

    [data-md-color-scheme=slate] .md-search__form:hover {
        background-color: #182027;
        border-color: #66adff;
    }

    [data-md-color-scheme=slate] .md-search__icon {
        color: #ffffff !important;
    }

    .md-search__icon {
        color: #182027 !important;
    }
}

@media (min-width: 1220px) {
    .md-sidebar--primary .md-nav__title {
        display: none;
    }

    .md-nav__item--section {
        position: relative;
    }

    .md-nav__item--section:after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        display: block;
        height: 1px;
        width: 25%;
    }
}

.report-issue-link {
    margin-block: 0.8rem;
    font-size: 0.7rem;
    line-height: 1;
    display: flex;
    align-items: center;

}

.report-issue-link svg {
    margin-top: -0.1rem;
    width: 0.7rem;
    height: 0.7rem;
}

/* Terminal styling enhancements for mkdocs-termynal plugin */
.termynal {
    border-radius: 6px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    margin: 1.5em 0 !important;
}

/* Adjust tab content padding for terminals */
.tabbed-content pre {
    margin-top: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Copy Markdown Button - styled like content actions */
.md-content__actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.125rem;
    z-index: 1;
}

.copy-markdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: auto;
    height: 1.25rem;
    margin-left: 0.125rem;
    padding: 0.25rem 0.5rem;
    color: var(--md-default-fg-color--lighter);
    cursor: pointer;
    transition: color 0.25s ease;
    text-decoration: none;
    border-radius: 4px;
    background: rgba(0,0,0,0.05);
}

.copy-markdown-btn svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: currentColor;
}

.copy-markdown-btn:hover {
    color: var(--md-default-fg-color);
    background: rgba(0,0,0,0.1);
}

.copy-btn-text {
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

[data-md-color-scheme=slate] .copy-markdown-btn {
    background: rgba(255,255,255,0.1);
}

[data-md-color-scheme=slate] .copy-markdown-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Position content actions properly */
.md-content__inner {
    position: relative;
}

/* Mobile responsiveness */
@media screen and (max-width: 44.9375em) {
    .md-content__actions {
        top: 0.25rem;
        right: 0.25rem;
    }
}

/* Video styling for vibe coding demos */
video {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}

/* Enhanced terminal styling with restart button */
.termynal {
    position: relative;
}

.termynal-restart {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.termynal-restart:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}