body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
}

pre {
    overflow-x: scroll;
    max-width: 100%;
    white-space: break-spaces;
}

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

header {
    background: rgb(82, 56, 120);
    color: #fff;
    padding: 1rem 0;
}

header img {
    height: 60px;
}

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

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav a {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

nav a:hover {
    color: rgb(196 166 227);
    transition: color 0.2s ease;
}

.menu-icon-prompt,
.menu-icon-image,
.menu-icon-analyse,
.menu-icon-character,
.menu-icon-video,
.menu-icon-configure,
.menu-icon-admin,
.menu-icon-user,
.menu-icon-tools,
.menu-icon-badword,
.menu-icon-logout {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    flex: 0 0 1rem;
    background-color: currentColor;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
}

.menu-icon-dollar {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    flex: 0 0 5rem;
    background-color: white;
}

.menu-icon-prompt {
    mask: url("/assets/images/icons/money-check-pen-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/money-check-pen-regular-full.svg") center / contain no-repeat;
}

.menu-icon-analyse {
    mask: url("/assets/images/icons/magnifying-glass-chart-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/magnifying-glass-chart-regular-full.svg") center / contain no-repeat;
}

.menu-icon-character {
    mask: url("/assets/images/icons/address-book-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/address-book-regular-full.svg") center / contain no-repeat;
}

.menu-icon-video {
    mask: url("/assets/images/icons/video-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/video-regular-full.svg") center / contain no-repeat;
}

.menu-icon-tools {
    mask: url("/assets/images/icons/wrench-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/wrench-regular-full.svg") center / contain no-repeat;
}

.menu-icon-user {
    mask: url("/assets/images/icons/circle-user-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/circle-user-regular-full.svg") center / contain no-repeat;
}

.menu-icon-logout {
    mask: url("/assets/images/icons/person-carry-empty-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/person-carry-empty-regular-full.svg") center / contain no-repeat;
}

.menu-icon-dollar {
    mask: url("/assets/images/icons/circle-dollar-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/circle-dollar-regular-full.svg") center / contain no-repeat;
}

.menu-icon-configure,
.menu-icon-admin {
    mask: url("/assets/images/icons/user-gear-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/user-gear-regular-full.svg") center / contain no-repeat;
}

.menu-icon-badword {
    mask: url("/assets/images/icons/face-swear-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/face-swear-regular-full.svg") center / contain no-repeat;
}

.menu-icon-image {
    mask: url("/assets/images/icons/image-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/image-regular-full.svg") center / contain no-repeat;
}

.desktop-only {
    display: list-item;
}

.mobile-only {
    display: none !important;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    z-index: 101;
}

.nav-toggle:hover,
.nav-toggle:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.hamburger-bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-active .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 350px;
    background: #ffffff;
    color: #333333;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 1rem;
    z-index: 1000;
    margin-top: 0.5rem;
    box-sizing: border-box;
}

.nav-dropdown-menu-tools {
    min-width: 250px;
    right: -2rem;
}

.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
}

.dropdown-usage-section {
    margin-bottom: 0.5rem;
    border: 1px solid #c4a6e3;
    border-radius: 0.5rem;
    background-color: #f4f0fa;
    padding: 1rem;
}

.dropdown-usage-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.dropdown-usage-title {
    font-weight: 600;
    color: rgb(82, 56, 120);
}

.dropdown-usage-numbers {
    color: #666;
    font-size: 0.78rem;
}

.dropdown-usage-bar {
    background: #e9ecef;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.dropdown-usage-fill {
    height: 100%;
    background: rgb(156, 66, 245);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.dropdown-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

nav .dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    justify-content: flex-start;
    background: transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}

nav .dropdown-menu-item:hover {
    background-color: #f4f0fa;
    color: rgb(82, 56, 120);
}

nav .dropdown-menu-item span[class^="menu-icon-"] {
    background-color: currentColor;
}

nav span.pill {
    font-size: 0.5rem;
}

nav span.pill-dollar {
    font-size: 0.8rem;
}

@media (max-width: 760px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: list-item !important;
    }

    header {
        padding: 0.75rem 0;
    }

    header img {
        height: 44px;
    }

    nav .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0px;
        width: 350px;
        max-width: calc(100vw - 40px);
        background: rgb(72, 48, 108);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.15);
        padding: 0.75rem;
        z-index: 1000;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        box-sizing: border-box;
    }

    .nav-menu.is-active {
        display: block;
        animation: navFadeIn 0.2s ease forwards;
    }

    @keyframes navFadeIn {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    nav ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.45rem;
        margin: 0;
        padding: 0;
    }

    nav ul li {
        margin-left: 0;
        width: 100%;
    }

    nav a,
    nav .nav-dropdown-toggle {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.65rem 0.85rem;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.08);
        font-size: 0.95rem;
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
    }

    nav a.logo, body.dark-mode nav a.logo {
        margin-right: 20px;
        background-color: transparent;
    }

    nav a:hover,
    nav .nav-dropdown-toggle:hover {
        background: rgba(255, 255, 255, 0.16);
        color: #fff;
    }

    .nav-dropdown-menu {
        position: static;
        min-width: unset;
        width: 100%;
        box-shadow: none;
        margin-top: 0.4rem;
        margin-bottom: 0.4rem;
        padding: 0.75rem;
        border-radius: 6px;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-dropdown-menu-tools {
        right: auto;
    }

    .nav-dropdown-menu::before {
        display: none;
    }

    nav span.pill {
        font-size: 0.45rem;
        margin-left: auto;
    }
}

main {
    padding: 2rem 0;
    min-height: 80vh;
}

footer {
    position: relative;
    bottom: 0;
    width: 100%;
    color: #aaa;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-less-padding {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h4, .card-less-padding h4 {
    margin-top: 2rem;
    margin-bottom: 0.2rem;
}

h1, h2, h3, h4 {
    color: rgb(82, 56, 120);
}

h3.prompt-summary-heading {
    margin-bottom: 0.5rem;
    color: #333;
}

.btn {
    display: inline-block;
    background: rgb(82, 56, 120);
    color: #fff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.btn-grey {
    background: #aaa;
}

.btn.is-copied,
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn:hover {
    background: rgb(156, 66, 245);
}

.btn-smaller {
    padding: 0.5rem 1rem;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

form div {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-actions {
    text-align: right;
}

input,
textarea,
select {
    font-size: 0.8rem;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input[type="text"]:hover,
input[type="password"]:hover,
textarea:hover {
    border-color: #aaa;

}

hr {
    color: #eee;
    margin: 1rem 0;
    border-top: 1px;
}

p.field-helper-text small {
    border-left: 5px solid #ddd;
    padding-left: 0.5rem;
    display: block;
}

img.reference-image {
    margin: 5px;
    border: 1px solid #ddd;
    max-width: 120px;
    max-height: 120px;
    border-radius: 4px;
    overflow: hidden;
    object-fit: cover;
}

/* Image Upload Slots */
.image-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 800px) {
    .image-slots-grid {
        grid-template-columns: 1fr;
    }
}

.image-slot {
    background: #fdfdfd;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: rgb(82, 56, 120);
}

.slot-title {
    font-weight: 700;
}

.slot-remove-btn {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.slot-remove-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
}

.slot-dropzone {
    min-height: 180px;
    height: 180px;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
    position: relative;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.slot-dropzone:hover,
.slot-dropzone:focus {
    border-color: rgb(156, 66, 245);
    background-color: #f5f3ff;
    outline: none;
}

.slot-dropzone.drag-over {
    border-color: rgb(124, 58, 237);
    background-color: #ede9fe;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem;
    pointer-events: none;
}

.dropzone-icon {
    width: 36px;
    height: 36px;
    background-color: rgb(156, 66, 245);
    mask: url("/assets/images/icons/image-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/image-regular-full.svg") center / contain no-repeat;
    opacity: 0.85;
}

.dropzone-text {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.35;
    font-weight: 500;
}

.dropzone-subtext {
    color: #94a3b8;
    font-size: 0.7rem;
}

.dropzone-filled {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    background: #111827;
}

.slot-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.slot-controls {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.slot-controls label {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 0.8rem;
    color: #475569;
}

.slot-focus-select,
.slot-custom-focus-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #334155;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.slot-focus-select:focus,
.slot-custom-focus-input:focus {
    border-color: rgb(156, 66, 245);
    outline: none;
    box-shadow: 0 0 0 2px rgba(156, 66, 245, 0.15);
}

.purple {
    color: rgb(156, 66, 245);
}

div.card-content-box {
    background: #f9f9f9;
    padding: 1rem;
    border-left: 4px solid rgb(156, 66, 245);
    margin-bottom: 2rem;
}

div.card-content-box-green {
    background: #dbf3df;
    border-left: 4px solid rgb(15 119 28);
}

div.card-content-box-blue {
    background: #c5e5ec;
    border-left: 4px solid rgb(15 100 119);
}

div.card-content-box-red {
    background: #ecc5c5;
    border-left: 4px solid rgb(119 15 15);
}

span.pill {
    background: rgb(156, 66, 245);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

span.white-pill {
    background: #c4a6e3;
    color: rgb(82, 56, 120);
}

section.card label,
section.card-less-padding label {
    font-weight: bold;
    font-size: 0.9rem;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0rem;
    font-size: 0.8rem;
}

.section-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-top: 4px;
    background-color: rgb(156, 66, 245);
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.section-heading-text {
    display: flex;
    flex-direction: column;
}

.section-title {
    margin: 0;
    line-height: 1.2;
}

.section-description {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #666;
}

span.list-ul-solid-full {
    mask-image: url("/assets/images/icons/list-ul-solid-full.svg");
    -webkit-mask-image: url("/assets/images/icons/list-ul-solid-full.svg");
}

span.camera-viewfinder-regular-full {
    mask-image: url("/assets/images/icons/camera-viewfinder-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/camera-viewfinder-regular-full.svg");
}

span.image-landscape-regular-full {
    mask-image: url("/assets/images/icons/image-landscape-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/image-landscape-regular-full.svg");
}

span.wardrobe-regular-full {
    mask-image: url("/assets/images/icons/wardrobe-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/wardrobe-regular-full.svg");
}

span.person-carry-empty-regular-full {
    mask-image: url("/assets/images/icons/person-carry-empty-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/person-carry-empty-regular-full.svg");
}

span.face-smile-wink-regular-full {
    mask-image: url("/assets/images/icons/face-smile-wink-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/face-smile-wink-regular-full.svg");
}

span.user-hair-long-regular-full {
    mask-image: url("/assets/images/icons/user-hair-long-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/user-hair-long-regular-full.svg");
}

span.lips-regular-full {
    mask-image: url("/assets/images/icons/lips-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/lips-regular-full.svg");
}

span.lightbulb-on-regular-full {
    mask-image: url("/assets/images/icons/lightbulb-on-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/lightbulb-on-regular-full.svg");
}

span.aperture-regular-full {
    mask-image: url("/assets/images/icons/aperture-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/aperture-regular-full.svg");
}

span.circle-small-regular-full {
    mask-image: url("/assets/images/icons/circle-small-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/circle-small-regular-full.svg");
}

span.user-gear-regular-full {
    mask-image: url("/assets/images/icons/user-gear-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/user-gear-regular-full.svg");
}

span.face-swear-regular-full {
    mask-image: url("/assets/images/icons/face-swear-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/face-swear-regular-full.svg");
}

span.image-regular-full {
    mask-image: url("/assets/images/icons/image-regular-full.svg");
    -webkit-mask-image: url("/assets/images/icons/image-regular-full.svg");
}

div.generic-content-box {
    background: #f9f9f9;
    padding: 1rem;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
}

.analysis-overall {
    border: 1px solid rgba(82, 56, 120, 0.45) !important;
    box-shadow:
            0 0 0 4px rgba(156, 66, 245, 0.08),
            0 12px 28px rgba(82, 56, 120, 0.18),
            0 0 34px rgba(156, 66, 245, 0.16);
}

.analysis-result-box {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.analysis-result-content {
    min-width: 0;
    flex: 1;
}

.score-widget {
    --score-colour: hsl(0, 72%, 42%);
    --score-percent: 0%;
    --score-track: #e7e2ec;

    position: relative;
    display: inline-flex;
    flex: 0 0 86px;
    width: 86px;
    height: 86px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 50%;
    color: var(--score-colour);
    background:
            radial-gradient(circle at 50% 50%, #ffffff 0 58%, transparent 59%),
            conic-gradient(
                    from 0deg,
                    var(--score-colour) 0 var(--score-percent),
                    var(--score-track) var(--score-percent) 100%
            );
}

.score-widget::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: inherit;
    background:
            radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88) 62%, rgba(244, 247, 246, 0.95));
    box-shadow:
            inset 0 2px 4px rgba(255, 255, 255, 0.95),
            inset 0 -5px 10px rgba(0, 0, 0, 0.045);
    z-index: 0;
}

.score-widget::after {
    content: "";
    position: absolute;
    top: 13px;
    left: 19px;
    width: 36px;
    height: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    transform: rotate(-20deg);
    pointer-events: none;
    z-index: 1;
}

.score-widget-value,
.score-widget-max {
    position: relative;
    z-index: 2;
}

.score-widget-value {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.score-widget-max {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0.68;
}

.score-widget-large {
    flex: 0 0 128px;
    width: 128px;
    height: 128px;
    margin: 0.25rem 0.5rem 0.25rem 0;
}

.score-widget-large::before {
    inset: 12px;
}

.score-widget-large::after {
    top: 20px;
    left: 30px;
    width: 52px;
    height: 22px;
}

.score-widget-large .score-widget-value {
    font-size: 3rem;
    font-weight: 800;
}

@supports not (color: color-mix(in srgb, red 50%, white)) {
    .score-widget {
        box-shadow:
                0 10px 22px rgba(0, 0, 0, 0.10),
                0 0 0 4px rgba(0, 0, 0, 0.04),
                inset 0 2px 5px rgba(255, 255, 255, 0.85);
    }
}

@media (max-width: 640px) {
    .analysis-result-box {
        flex-direction: column;
    }

    .score-widget {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
    }

    .score-widget-value {
        font-size: 1.55rem;
    }
}

span.grey {
    color: #888;
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

body.dark-mode {
    background-color: #121217;
    color: #e4e6eb;
    color-scheme: dark;
}

body.dark-mode header {
    background: #1c1829;
    border-bottom: 1px solid #2e2640;
}

body.dark-mode .hamburger-bar {
    background-color: #e4e6eb;
}

body.dark-mode .nav-toggle:hover,
body.dark-mode .nav-toggle:focus {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 760px) {
    body.dark-mode .nav-menu {
        background: #1e1829;
        border: 1px solid #2e2640;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    body.dark-mode nav a,
    body.dark-mode nav .nav-dropdown-toggle {
        background: rgba(255, 255, 255, 0.05);
    }

    body.dark-mode nav a:hover,
    body.dark-mode nav .nav-dropdown-toggle:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
    }

    body.dark-mode .nav-dropdown-menu {
        background: rgba(0, 0, 0, 0.35);
        border: 1px solid #362e4a;
    }
}

body.dark-mode .nav-dropdown-menu {
    background: #201c2e;
    color: #e4e6eb;
    border: 1px solid #362e4a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dropdown-usage-section {
    border: 1px solid #4d3b66;
    background-color: #171322;
}

body.dark-mode .dropdown-usage-title {
    color: #d6b8f8;
}

body.dark-mode .dropdown-usage-numbers {
    color: #a09ab0;
}

body.dark-mode .dropdown-usage-bar {
    background: #332b45;
}

body.dark-mode .dropdown-usage-fill {
    background: rgb(168, 85, 247);
}

body.dark-mode nav .dropdown-menu-item {
    color: #e4e6eb;
}

body.dark-mode nav .dropdown-menu-item:hover {
    background-color: #322b45;
    color: #d6b8f8;
}

body.dark-mode .card, body.dark-mode .card-less-padding {
    background: #1c1c24;
    color: #e4e6eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    border: 1px solid #2c2c38;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: #c9a7f5;
}

body.dark-mode h3.prompt-summary-heading {
    margin-bottom: 0.5rem;
    color: #e4e6eb;
}

body.dark-mode .btn {
    background: rgb(124, 58, 237);
    color: #fff;
}

body.dark-mode .btn:hover {
    background: rgb(147, 51, 234);
}

body.dark-mode .btn-grey {
    background: #4b4858;
    color: #e4e6eb;
}

body.dark-mode .btn.is-copied,
body.dark-mode .btn:disabled {
    opacity: 0.5;
}

body.dark-mode div.card-content-box {
    background: #252430;
    border-left: 4px solid rgb(168, 85, 247);
    color: #e4e6eb;
}

body.dark-mode div.card-content-box-green {
    background: #14281c;
    border-left: 4px solid #34d399;
    color: #a7f3d0;
}

body.dark-mode div.card-content-box-blue {
    background: #142533;
    border-left: 4px solid #38bdf8;
    color: #bae6fd;
}

body.dark-mode div.card-content-box-red {
    background: #33161a;
    border-left: 4px solid #f87171;
    color: #fecaca;
}

body.dark-mode div.generic-content-box {
    background: #242430;
    border: 1px solid #363646;
    color: #e4e6eb;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="password"],
body.dark-mode textarea,
body.dark-mode select {
    background: #252532;
    color: #f3f4f6;
    border: 1px solid #434358;
}

body.dark-mode input[type="text"]:hover,
body.dark-mode input[type="password"]:hover,
body.dark-mode select:hover,
body.dark-mode textarea:hover {
    border-color: #716485;
}

body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="password"]:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
    outline: none;
}

body.dark-mode p.field-helper-text small {
    border-left: 5px solid #4a485a;
    color: #9ca3af;
}

body.dark-mode hr {
    color: rgba(192, 132, 252, 0.1);
    border-color: rgba(192, 132, 252, 0.1);
    border-top: 1px solid rgba(192, 132, 252, 0.1);
}

body.dark-mode span.grey {
    color: #9ca3af;
}

body.dark-mode .purple {
    color: #c084fc;
}

body.dark-mode span.white-pill {
    background: #3d2f58;
    color: #e9d5ff;
}

body.dark-mode span.pill {
    background: rgb(147, 51, 234);
    color: #fff;
}

body.dark-mode .alert-success {
    background-color: #14281c;
    color: #a7f3d0;
    border-color: #1a432d;
}

body.dark-mode .alert-danger {
    background-color: #33161a;
    color: #fecaca;
    border-color: #552026;
}

body.dark-mode .section-icon {
    background-color: #c084fc;
}

body.dark-mode .section-description {
    color: #9ca3af;
}

body.dark-mode .analysis-overall {
    border: 1px solid rgba(192, 132, 252, 0.45) !important;
    box-shadow:
        0 0 0 4px rgba(192, 132, 252, 0.1),
        0 12px 28px rgba(0, 0, 0, 0.45),
        0 0 34px rgba(192, 132, 252, 0.15);
}

body.dark-mode .score-widget {
    --score-track: #363244;
    background:
        radial-gradient(circle at 50% 50%, #1c1c24 0 58%, transparent 59%),
        conic-gradient(
            from 0deg,
            var(--score-colour) 0 var(--score-percent),
            var(--score-track) var(--score-percent) 100%
        );
}

body.dark-mode .score-widget::before {
    background: radial-gradient(circle at 50% 35%, rgba(45, 43, 58, 0.98), rgba(35, 33, 46, 0.88) 62%, rgba(28, 28, 36, 0.95));
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.08),
        inset 0 -5px 10px rgba(0, 0, 0, 0.5);
}

body.dark-mode .score-widget::after {
    display: none;
}

body.dark-mode .score-widget-value {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

body.dark-mode pre {
    background: #14141a;
    color: #a5b4fc;
    border: 1px solid #2c2c3a;
    padding: 1rem;
    border-radius: 4px;
}

body.dark-mode footer {
    color: #71717a;
}

body.dark-mode footer small {
    color: #63636e;
}

body.dark-mode img.reference-image {
    border: 1px solid #434358;
}

body.dark-mode .image-slot {
    background: #1e1e27;
    border-color: #2e2d3d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .slot-header {
    color: #c9a7f5;
}

body.dark-mode .slot-remove-btn {
    color: #f87171;
    border-color: #552026;
    background: #27161b;
}

body.dark-mode .slot-remove-btn:hover {
    background: #3c1820;
    border-color: #7f1d1d;
    color: #fca5a5;
}

body.dark-mode .slot-dropzone {
    border-color: #3b3a4e;
    background: #171720;
}

body.dark-mode .slot-dropzone:hover,
body.dark-mode .slot-dropzone:focus {
    border-color: #a855f7;
    background-color: #231d33;
}

body.dark-mode .slot-dropzone.drag-over {
    border-color: #c084fc;
    background-color: #2d2244;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.25);
}

body.dark-mode .dropzone-icon {
    background-color: #c084fc;
}

body.dark-mode .dropzone-text {
    color: #cbd5e1;
}

body.dark-mode .dropzone-subtext {
    color: #64748b;
}

body.dark-mode .slot-controls label {
    color: #a09ab0;
}

body.dark-mode .slot-focus-select,
body.dark-mode .slot-custom-focus-input {
    background: #14141a;
    border-color: #3b3a4e;
    color: #e4e6eb;
}

body.dark-mode .slot-focus-select:focus,
body.dark-mode .slot-custom-focus-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

body.dark-mode a[style*="color: #666"],
body.dark-mode a[style*="color:#666"] {
    color: #9ca3af !important;
}

mark.badword-highlight {
    background-color: #fecaca;
    color: #991b1b;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #f87171;
}

body.dark-mode mark.badword-highlight {
    background-color: #551d24;
    color: #fca5a5;
    border: 1px solid #991b1b;
}

/* System Notification Banner */
.system-notification-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 2px solid #f59e0b;
    color: #92400e;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: opacity 0.2s ease;
}

.system-notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.system-notification-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    background-color: #d97706;
    mask: url("/assets/images/icons/lightbulb-on-regular-full.svg") center / contain no-repeat;
    -webkit-mask: url("/assets/images/icons/lightbulb-on-regular-full.svg") center / contain no-repeat;
}

.system-notification-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

body.dark-mode .system-notification-banner {
    background: linear-gradient(135deg, #3d2f16 0%, #2e230d 100%);
    border-bottom: 2px solid #d97706;
    color: #fef3c7;
}

body.dark-mode .system-notification-icon {
    background-color: #fbbf24;
}

/* Admin Tools Components */
.admin-users-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.admin-users-table tbody tr:hover {
    background-color: rgba(156, 66, 245, 0.03);
}

body.dark-mode .admin-users-table th {
    background-color: #1e1e27;
    color: #cbd5e1;
    border-bottom-color: #3b3a4e !important;
}

body.dark-mode .admin-users-table tr {
    border-bottom-color: #2e2d3d !important;
}

body.dark-mode .admin-users-table tbody tr:hover {
    background-color: rgba(168, 85, 247, 0.08);
}

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.admin-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.admin-modal-dialog {
    position: relative;
    z-index: 1001;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin: 0;
}
