:root {
    --color-white: #ffffff;
    --color-nav: rgba(0, 0, 0, 0.5);
    --color-black: #000;
    --color-border: #ebeaeb;
    --color-body: #fff;
    --card-bg: var(--color-white);
    --card-bg-support: #eee;
    --box-shadow: 0 0 30px 25px rgba(72, 76, 108, .1);
    --box-shadow-two: 0 0.5em 1em -0.125em rgba(10, 10, 10, .1), 0 0 0 1px rgba(10, 10, 10, .02);
    --box-shadow-three: 0 10px 30px rgba(0, 0, 0, 0.1);
    --color-logo: var(--color-black);
    --post-author-bg: #f6f6f6f6;
    --color-section-bg: #f6f6f6f6;
    --color-white-smoke: #f6f6f6f6;
    --color-table: var(--color-black);
    --table-thead-bg: var(--ghost-accent-color);
    --color-banner-bg: #f6f6f6f6;
    --table-body-bg: rgb(252, 252, 252);
    --table-body-bg-even: white;
    --color-light: #f6f6f6f6;
    --color-light-dark: #1A1A1A;
    --color-light-gray: #f6f6f6f6;
    --color-border-bottom: #f6f6f6f6;
    --bg-black: #101B3B;
    --bg-code-wrapper: #f6f6f6f6;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --color-primary: #4ea8f1;
    --color-primary-bg: var(--color-primary);
    --color-heading: #091e42;
    --color-text: #6d6e71;
    --color-code-bg: #242933;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-body);
    color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5,
h6,
h7,
h8 {
    color: #1A1A1A;
}

nav.navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1020;
    padding: 20px 0;
}

/* make navbar smaller on desktop */
@media (min-width: 1199.98px) {
    nav.navbar>.container-fluid {
        width: 70%;
        font-size: 18px;
    }
}
.navbar-nav {
    align-items: center;
}

.nav-logo {
    margin: auto 20px;
}

/* fix bootstrap dropdown to hover */
/* .dropdown:hover>.dropdown-menu {
    display: block;
} */

.dropdown-menu-right {
    left: auto;
    right: 0;
}

/* tutorial styling */
.example {
    border: 1px solid lightgrey;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.example h4 {
    text-align: center;
    margin: 10px 0px 30px 0px;
}

.example h1 {
    text-align: center;
}

@media (min-width: 576px) {
    .main {
        margin: 20px;
    }
}


.main {
    color: var(--color-text);
    margin: 0;
    /* box-shadow: var(--box-shadow-two); */
    /* border-radius: 25px;
    margin-bottom: 30px;
    margin-top: 10px; */
    padding: 30px;
}


.main {
    max-width: 100%;
}

.tutorial {
    max-width: 70ch;
    padding: 20px;
    margin: 20px auto;
}


h1,
.tutorial h2,
.tutorial h3 {
    text-align: center;
}

.title {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    grid-gap: 10px;
}

.title h1 {
    grid-column: 2;
}

.title a {
    align-self: start;
    text-decoration: none;
    padding: 5px;
    max-width: 12ch;
    text-align: center;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.app h1,
.app h2,
.app h3 {
    text-align: center;
}

.tutorial h2 {
    margin-top: 30px;
}

.tutorial p,
.tutorial ol {
    color: #6d6e71;
    line-height: calc(1ex / 0.32);
}

.tutorial img.big {
    margin-left: calc(min(calc((min(100ch, 100vw) - 80ch) / 2 * -1), -20px));
    max-width: calc(min(100ch, calc(100vw - 20px)));
    width: 100vw;
}

.info:before {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-exclamation-diamond' viewBox='0 0 16 16'%3E%3Cpath d='M6.95.435c.58-.58 1.52-.58 2.1 0l6.515 6.516c.58.58.58 1.519 0 2.098L9.05 15.565c-.58.58-1.519.58-2.098 0L.435 9.05a1.482 1.482 0 0 1 0-2.098L6.95.435zm1.4.7a.495.495 0 0 0-.7 0L1.134 7.65a.495.495 0 0 0 0 .7l6.516 6.516a.495.495 0 0 0 .7 0l6.516-6.516a.495.495 0 0 0 0-.7L8.35 1.134z'/%3E%3Cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E");
    display: inline;
}

.info p {
    margin: 0;
    display: inline;
}

.info {
    background: aliceblue;
    padding: 15px;
    border-radius: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
}

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

div.player-link {
    font-size: smaller;
    text-align: right;
    margin: 5px;
    padding: none;
}

div.player-link a {
    text-decoration: none;
}

div.player-link a:before {
    content: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg class='iconify iconify--twemoji' width='18px' height='18px' aria-hidden='true' role='img' version='1.1' viewBox='0 0 36 36' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M36 32a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h28a4 4 0 0 1 4 4v28z' fill='%234ea8f1'/%3E%3Cpath d='M8 7l22 11L8 29z' fill='%23FFF'/%3E%3C/svg%3E");
    margin-right: 0.5ch;
    pointer-events: all;
    text-align: center;
    vertical-align: middle;
}

/* PRODUCT previews */
.row.product {
    margin: 20px 0;
    box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, .1), 0 0 0 1px rgba(10, 10, 10, .02);
    border-radius: 15px;
    padding: 10px;
}

@media screen and (max-width: 1199.98px) {
    .row.product {
        flex-direction: column;
    }
    
    .row.product .thumbnail {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 100%;
    }
    
    .row.product .description{
        width: 100%;
    }
    .row.product .price-wrap{
        width: 100%;
    }
    .row.product .description h3 {
        text-align: center; 
    }
}

.row.product .img-thumbnail {
    border-radius: 15px;
    border: none;
}

.product h3>a {
    text-decoration: none;
}

.product .price {
    font-size: 28px;
}

.product .price::before {
    content: "$";
}

.product .price-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-preview {
    text-decoration: none;
    
    & .price-wrap {
        color: var(--color-text);
    }
    & .product:hover {
        background-color: #e9ecef;
    }
}

/* details fix */
details summary {
    cursor: pointer;
}

details summary>* {
    display: inline;
}

.tutorial details summary {
    cursor: pointer;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;

}

.tutorial details.heading summary {
    text-align: center;
    font-size: xx-large;
}

/* PRODUCT */
img.img-responsive {
    max-width: 100%;
}

/* .tutorial hr, .tutorial p, .tutorial h1, .tutorial h2, .tutorial h3, .tutorial h4 {
    max-width: 70ch;
    margin-left: auto !important;
    margin-right: auto !important;
}
.tutorial>*{
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100ch;
} */

/* hover images */
a[data-hover] {
    color: #b9792b;
    text-decoration: none;
}

.hover {
    max-width: 800px;
    display: none;
    position: absolute;
    border: 2px solid lightgrey;
}

/* PRODUCT */

a.variant span.variant-color {
    display: inline-block;
    min-width: 20px;
    min-height: 20px;
    margin-right: 5px;
    vertical-align: middle;
    border: 1px solid lightgrey;
}

a.variant.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

img.product-img.active {
    max-width: 100%;
    margin: 0 auto;
    order: -1;
}

img.product-img {
    margin-top: 10px;
    max-width: 100px;
}

.highlight {
    background: var(--color-code-bg);
    padding: 20px;
    border-radius: 10px;
}

.highlight pre {
    margin-bottom: 0;
}

/* ------------------ TABS ------------------------- */

.tabs {
    margin-bottom: 20px;
}

.tabs>div.active[data-tab] {
    color: white;
    background: var(--color-code-bg);
    border: 1px solid #2e3440;
    border-bottom: none;
}

.tabs>div[data-tab] {
    cursor: pointer;
    background: white;
    color: #2e3440;
    display: inline-block;
    border-bottom: none;
    margin: 0;
    padding: 5px 20px;
    border-radius: 5px 5px 0px 0px;
}

.tabs>div.active:not([data-tab]) {
    display: block;
}

.tabs>div:not([data-tab]) {
    margin: 0;
    display: none;
    background: var(--color-code-bg);
    border: 1px solid var(--color-code-bg);
    border-radius: 0 10px 10px 10px;
    color: white;
}

/* testimonials */
identicon-svg {
    width: 100px;
    height: 100px;
    display: block;
    border-radius: 50%;
}

.testimonials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.testimonial {
    display: flex;
    align-items: center;
    padding: 50px;
    margin: 20px;
    width: 500px;
    box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, .1), 0 0 0 1px rgba(10, 10, 10, .02);
    border-radius: 15px;
}

.testimonial p {
    max-width: 300px;
    margin-top: 10px;
}

.categories>a {
    border: 1px solid #ccc;
    padding: 0 20px;
}

.paging-meta {
    text-align: center;
}

.paging {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    align-items: center;
    align-content: center;
}

.paging a {
    margin: 30px;
    text-decoration: none;
    color: var(--color-text);
}

select#order {
    border: none;
    text-transform: uppercase;
}

.filters {
    display: flex;
    justify-content: space-around;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.filters>* {
    /* border: 2px solid #ccc; */
    padding: 10px 20px;
    border-bottom: none;
    text-decoration: none;
    color: var(--color-text);
    text-transform: uppercase;
}

.filters>div {
    margin-left: auto;
}

.main .filters>a:not([href]) {
    border-bottom: 2px solid #ccc;
    font-weight: 800;
}

/* login */

.container.login {
    max-width: 60ch;
}

/* cart */
.add-to-cart {
    transition: all 0.2s;
}

.cart-preview {
    cursor: pointer;
    margin-left: 10px;
}

.cart-preview svg {
    color: var(--color-text);
}

.cart-data {
    position: fixed;
    padding: 20px;
    margin-top: 12px;
    margin-left: -500px;
    background: white;
    width: 500px;
    box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, .1), 0 0 0 1px rgba(10, 10, 10, .02);
    border-radius: 15px;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: hidden;
}

@media screen and (max-width: 1199.98px) {
    .cart-data {
        position: unset;
        margin-left: -10px;
        width: 100%;
        overflow: scroll;
        max-height: 60vh;
        position: absolute;
        display: block;
        right: 0;
        max-width: 500px; 
    }

}

.cart-data.open {
    opacity: 1;
    position: absolute;
    display: block;
    right: 0;
    max-width: 500px; 
    transform: translateY(0);
    visibility: visible;
}

.cart-count {
    color: var(--color-text);
}

.cart-icon {
    text-align: center;
}

a.cart-item {
    text-decoration: none;
    color: var(--color-text);
    display: grid;
    grid-template-columns: 20% 1fr 10% 20%;
    align-items: center;
    margin-bottom: 10px;
}

a.cart-item:hover {
    color: var(--color-primary);
}

a.cart-item img {
    width: 50px;
}


div.cart-meta {
    text-align: right;
    color: var(--color-text);
}

div.cart-control {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-content: center;
    align-items: center;
}

span.cart-quantity {
    text-align: center;
}

span.cart-price {
    text-align: right;
}

.cart-full {
    margin-top: 40px;
}
div#latest-reviews {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center;

    .review {
        max-width: 250px;
    }
}

#testimonials-spinner{
    display: none;
}

#testimonials-spinner.htmx-request{
    display: block;
}

#intro {
    & div.section-cards h3{
        margin-top: 0;
        padding: 1rem 1rem 0 1rem;
        font-size: 1.25rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    & div.article-cards h3 {
        font-size: 22px;
    }

    & div.tool-cards {
        margin-bottom: 20px;
    }

    & a.card {
        text-decoration: none;
        color: var(--color-text);
        border: 2px solid #e9ecef;
        border-radius: 12px;
        transition: all 0.3s ease;
        background: white;
        overflow: hidden;

        & .card-subtitle {
            color: #6c757d;
            text-align: left;
            font-size: 0.875rem;
            font-family: 'Courier New', monospace;
            background: #f8f9fa;
            padding: 0.5rem 1rem;
            margin: 0;
            border-top: 1px solid #e9ecef;
        }

        & .card-body {
            margin-top: 0;
            padding: 1rem;
        }

        & .card-text {
            color: var(--color-text);
            line-height: 1.6;
            margin: 0;
        }
    }

    & a.card:hover {
        border-color: var(--color-primary);
        box-shadow: 0 8px 16px rgba(78, 168, 241, 0.15);
        transform: translateY(-4px);
    }

    & a.card img {
        padding-left: 20px;
        padding-right: 20px;
        margin-bottom: 0;
        margin-top: 0;
    }
}

/* Code block copy button */
.code-block-wrapper {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin-bottom: -2.5rem;
    margin-top: 0.5rem;
    z-index: 10;
}

.copy-code-btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    margin-right: 0.5rem;
}

.copy-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

pre {
    position: relative;
    margin-top: 0;
}

/* Add some spacing for code blocks with copy buttons */
pre > code {
    display: block;
}

/* Difficulty badges */
.difficulty-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    vertical-align: middle;
    margin-left: auto;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0 4rem;
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-badge i {
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .btn {
    min-width: 160px;
}

.hero-actions .btn-outline-primary {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

.hero-actions .btn-outline-primary:hover {
    background: white;
    color: #667eea;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-section {
        padding: 3rem 0 2rem;
    }
}

/* Sponsor Section */
.sponsor-section {
    text-align: center;
    padding: 4rem 0;
    background: #f8f9fa;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.sponsor-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 600;
}

.sponsor-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 2rem 3rem;
    border: 2px solid #2c3e50;
    border-radius: 12px;
    background: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sponsor-link:hover {
    border-color: #34495e;
    background: #34495e;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.sponsor-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.sponsor-tagline {
    font-size: 0.875rem;
    color: #bdc3c7;
    font-weight: 500;
}

.sponsor-link:hover .sponsor-tagline {
    color: #ecf0f1;
}

@media (max-width: 768px) {
    .sponsor-section {
        padding: 2rem 0;
    }

    .sponsor-link {
        padding: 1rem 1.5rem;
    }

    .sponsor-logo {
        height: 33px;
    }
}

/* Resources Section */
.resources-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.section-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 600;
}

.resources-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s ease;
    font-weight: 500;
}

.resource-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.resource-link i {
    font-size: 1.25rem;
}

/* Scenarios Section */
.scenarios-section {
    margin-bottom: 4rem;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--color-primary);
}

.scenario-count {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-primary);
    background: rgba(78, 168, 241, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Changelog Section */
.changelog-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.changelog-section h2 {
    margin-bottom: 1.5rem;
}

.changelog-section details {
    margin-bottom: 1rem;
}

.changelog-section summary {
    font-weight: 600;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
}

.changelog-section summary:hover {
    background: #e9ecef;
}