﻿body {
    font-family: 'Inter', sans-serif;
    background-color: #F3F4F6;
}

:root {
    --primary: #FF0033;
    --primary-hover: #CC0029;
    --surface-light: #FFFFFF;
    --surface-dark: #1E1E1E;
}

.bg-primary-custom {
    background-color: var(--primary);
}

.nav-sticky {
    position: sticky;
    top: 73px;
    z-index: 1019;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary-custom {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.surface-card {
    background: var(--surface-light);
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.nav-secondary a {
    color: white;
    text-decoration: none;
    padding: .5rem 1rem;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 500;
}

.nav-secondary a:hover,
.nav-secondary a.active {
    background: #cc0028;
}

.aspect-video {
    aspect-ratio: 16/9;
}


:root {

    --bgColor--night: #423966;
    --toggleBtn-bgColor--night: var(--bgColor--night);
    --mooncolor: #D9FBFF;
    --bgColor--day: #9ee3fb;
    --toggleBtn-bgColor--day: var(--bgColor--day);
}



.light {
    background: #fff;
    color: #D43370;
}

.tdnn {
    margin: 0 auto;
    /*change size of toggle with font-size*/
    font-size: 11%;
    position: relative;
    height: 16em;
    width: 35em;
    border-radius: 16em;
    transition: all 500ms ease-in-out;
    background: #241936;
}

.day {
    /* background: #FFBF71; */
    background: #f1f2f6;
    border: 1px solid #c7c9cb;
}

.moon {
    position: absolute;
    display: block;
    border-radius: 50%;
    transition: all 400ms ease-in-out;
    top: 3em;
    left: 22em;
    transform: rotate(-75deg);
    width: 10em;
    height: 10em;
    background: #241936;
    /* #012a3c */
    /* rgba(255, 255, 255, 0.1) */
    box-shadow:
        3em 2.5em 0 0em var(--mooncolor) inset, #d8d8d8 -7em -18em 0 -4.5em, #d8d8d8 -4em -11em 0 -4.5em, #d8d8d8 0em -15em 0 -4em, #d8d8d8 0em -10em 0 -4.1em, #d8d8d8 -8em -8em 0 -4.5em, #d8d8d8 5em 2em 0 -4.5em, #d8d8d8 -8em -13em 0 -4.5em, #d8d8d8 -4em -9em 0 -4.5em
}

.sun {
    top: 4em;
    left: 5em;
    transform: rotate(0deg);
    width: 7em;
    height: 7em;
    background: #fff;
    box-shadow: 3em 3em 0 5em #b1b1b1 inset,
        0 -5em 0 -2.7em #b1b1b1,
        3.5em -3.5em 0 -3em #b1b1b1,
        5em 0 0 -2.7em #b1b1b1,
        3.5em 3.5em 0 -3em #b1b1b1,
        0 5em 0 -2.7em #b1b1b1,
        -3.5em 3.5em 0 -3em #b1b1b1,
        -5em 0 0 -2.7em #b1b1b1,
        -3.5em -3.5em 0 -3em #b1b1b1;
}


.acc-type {
    display: inline-block;
    padding: 6px 18px 6px 18px;
    border-radius: 5px;
    white-space: nowrap;
    color: rgb(255 255 255);
    background: #fda001;
    font-size: 18px;
}

.top-level-img {
    width: 23px !important;
    position: relative;
    top: -3px;
    margin-right: 8px;

}

.score-sec {
    padding: 3px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c5bbd8;
    font-size: 1.1rem;
    color: white !important;
    border: 0px solid #ffc107;
    background: #cd8505;
    background: linear-gradient(90deg, #cd8505 0%, #e75c0b 100%);
}

.score-sec.yellow {
    color: rgb(0, 0, 0) !important;
    border: 1px solid #cd8505;
    background: transparent;
}

.para-home {
    font-size: 1.4rem;
    font-weight: 400;
    color: #636161 !important;
    margin-top: 20px;
}

@media (max-width:767px) {
    .para-home {
        font-size: 1.2rem !important;
    }

    .btn-home {
        font-size: 1.1rem;
    }
}

.btn-home {
    font-size: 1.3rem;
    padding: 6px 15px 6px 15px !important;
}

.campaign-card {
    overflow: hidden;
    border-radius: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #dee2e6 !important;
}

.campaign-card .image-wrapper {
    position: relative;
    overflow: hidden;
}

.campaign-card img {
    transition: transform 0.5s ease;
}

.campaign-card .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.campaign-card:hover img {
    transform: scale(1.08);
}

.campaign-card:hover .overlay {
    opacity: 1;
}

.overlay-btn {
    background: white;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: 0.2s;
}

.overlay-btn:hover {
    background: #f1f1f1;
}

.create-card {
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #ffffff;
}

.create-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.create-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 0, 51, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.create-card:hover .create-icon-wrapper {
    transform: scale(1.15);
    background: rgba(255, 0, 51, 0.15);
}

.db-sec {
    display: flex;
    gap: 10px;
    color: gray;
    font-size: 1.2rem;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.db-item.active {
    color: black;
    font-weight: 400;
}

.db-item {
    font-weight: 500;
}

.watch-tutorial-btn {
    background-color: black;
    border-color: black;
    color: white;
    font-weight: bold;
}

.header-con {
    background: white;

}

.header {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    margin: 0 auto;
    width: 100%;
    justify-content: space-between;
    max-width: 1270px;
}

.header-left {
    display: flex;
    align-items: end;
    gap: 10px;
}

.header h2 {
    font-size: 22px !important;
    margin-bottom: unset;
    color: #000;
}

.breadcrumbs {
    font-size: 16px;
    color: #666;
    display: flex;
    align-items: center;
}

.breadcrumbs {
    font-size: 16px;
    color: #666;
}

.breadcrumbs span:not(:last-child) {
    margin-right: 5px;
}

.breadcrumbs i {
    color: #666;
    margin: 0px 5px 0px 3px !important;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 576px) {
    .header h2 {
        font-size: 18px !important;
    }

    .header {
        padding: 15px;
        flex-wrap: wrap;
    }
}

.wel-area,
.wel-area-right {
    background: white !important;
    padding: 40px 30px;
    min-height: 270px;
    border-radius: 10px;
    border: 1px solid white;
    height: 100%;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem
}

.wel-main-text {
    color: black;
    font-weight: 600;
    font-size: 1.8rem;
    margin: 1rem;
    transition: color .3s ease
}

.wel-sub-text,
.wel-right-sub-text {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 20px;
    transition: color .3s ease
}

.support-btn {
    background: #ff0033;
    color: #fff;
    font-size: 1.3rem;
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: .5rem;
    margin-bottom: .5rem;
    transition: all .2s ease
}

.support-btn:hover {
    background: #e2002d;
    transition: none;
    transform: scale(1.04);
    box-shadow: #0000000d 0 2px 6px, #0000001a 0 4px 24px, #0000001a 0 3px 1px -2px;
    color: #fff
}

.btn-watch-video {
    background: #ff0033;
    color: #fff;
    font-size: 1.2rem;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all .2s ease
}

.btn-watch-video:hover {
    background: #e2002d;
    transition: none;
    transform: scale(1.04);
    box-shadow: #0000000d 0 2px 6px, #0000001a 0 4px 24px, #0000001a 0 3px 1px -2px;
    color: #fff !important;
}

.remove-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 0;
    display: contents
}

.remove-img {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer
}

.text-content {
    height: inherit
}

.watch-video-section {
    justify-items: center
}

:focus {
    outline: none !important
}

.empty-sec {
    border: none
}

:root.dark .empty-sec {
    background: #161b22;
    border: none
}


@media(max-width: 576px) {

    .support-btn {
        font-size: 1.1rem !important;
    }
}

@media(max-width: 991px) {

    .wel-area,
    .wel-area-right {
        text-align: center
    }

}

@media (max-width: 767px) {
    .wel-main-text {
        font-size: 1.3rem;
    }
}

/* Popup */
.modal {
    background: #0000007d;
}

.modal-header {
    background: var(--primary);
    padding: 10px 15px !important;
}

.modal-content {
    border: 1px solid !important;
}

.modal-label {
    font-size: 1.2rem;
}

.w-120 {
    width: 120px;
}

.cust-text {
    font-size: 1.2rem;
}

.btn-cancel {
    background: #000000;
    width: 120px;
    border: 0px solid;
    color: white;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-cancel:hover {
    background: #000000;
    color: white;
}


.btn-save {
    background: var(--primary);
    width: 120px;
    border: 0px solid;
    color: white;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-save img {
    width: 22px;
}

.btn-save:hover,
.btn-save:active {
    background: var(--primary-hover) !important;
    color: white !important;
}

@media (max-width:767px) {

    .btn-save,
    .btn-cancel {
        font-size: 1.1rem !important;
    }

    .modal-label {
        font-size: 1.1rem !important;
    }

    .cust-text {
        font-size: 1.1rem !important;
    }
    .faces-grid {
    grid-template-columns: 1fr 1fr;
}
}
@media (max-width:500px){
      .faces-grid {
    grid-template-columns: 1fr 1fr;
}
}

/* Faces */
.faces-grid {
    column-gap: 1.2rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.face-grid-item {
    break-inside: avoid;
    margin-bottom: 1.2rem;
}

.face-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.face-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.face-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 16px;
}

.face-card:hover .face-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .faces-grid {
        columns: 2 160px;
    }
}

@media (max-width: 480px) {
    .faces-grid {
        columns: 1;
    }
}

/* Create Character */
/* Style Grid Wrapper - shows 2 rows, scrollable */
.char-style-grid-wrapper {
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 10px;
}

.char-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.char-style-card {
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px 8px;
    gap: 6px;
}

.char-style-card:hover {
    border-color: #ff0033;
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
    transform: translateY(-2px);
}

.char-style-card.selected {
    border-color: #ff0033;
    background: rgba(255, 0, 51, 0.08);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.25);
}

.char-style-icon {
    font-size: 28px;
    line-height: 1;
}

.char-style-name {
    font-size: 15px;
    text-align: center;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
    margin-top: 5px;
}

/* AI Horizontal Cards */
.char-ai-card {
    min-width: 100px;
    flex: 0 0 auto;
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 8px;
}

.char-ai-card:hover {
    border-color: #ff0033;
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
}

.char-ai-card.selected {
    border-color: #ff0033;
    background: rgba(255, 0, 51, 0.08);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.25);
}

.char-ai-icon {
    font-size: 22px;
    line-height: 1;
}

.char-ai-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: inherit;
}

/* Scrollbar styling for style grid */
.char-style-grid-wrapper::-webkit-scrollbar {
    width: 6px;
}

.char-style-grid-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.char-style-grid-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.char-style-grid-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
    .char-style-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    }
}

.char-style-card img {
    width: 60px;
}

/* Edit Face */
/* AI Horizontal Cards */
.edit-ai-card {
    min-width: 100px;
    flex: 0 0 auto;
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 8px;
}

.edit-ai-card:hover {
    border-color: #ff0033;
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
}

.edit-ai-card.selected {
    border-color: #ff0033;
    background: rgba(255, 0, 51, 0.08);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.25);
}

.edit-ai-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: inherit;
}

/* Selectable image thumbnails */
.edit-image-thumb {
    border: 3px solid transparent;
    border-radius: 12px;
    transition: all 0.2s ease;
    padding: 4px;
    cursor: pointer;
}

.edit-image-thumb:hover {
    border-color: rgba(255, 0, 51, 0.4);
}

.edit-image-thumb.selected {
    border-color: #ff0033;
    box-shadow: 0 0 12px rgba(255, 0, 51, 0.3);
}

.img-con {
    overflow-y: auto;
    padding: 24px 24px 16px;
    max-height: calc(100vh - 370px);
}

/* Image history grid layout */
.img-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 16px;
}

.img-history-item {
    text-align: center;
}

.img-history-image {
    width: 100%;
    height: 320px;
    object-fit: contain;
}

/* Hover download button on thumbnails */
.img-thumb-wrap {
    position: relative;
    display: block;
}

.img-thumb-wrap .img-thumb-download {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff0033;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    z-index: 3;
}

.img-thumb-wrap:hover .img-thumb-download {
    opacity: 1;
}

.img-thumb-download .download-icon {
    color: #fff;
    font-size: 18px;
    line-height: 1;
}

.img-thumb-download:hover {
    background: #cc0029;
}

/* StartFromScratch - Thumbnail Face Cards */
.thumb-face-card {
    width: 88px;
    min-height: 110px;
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.thumb-face-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
}

.thumb-face-card.selected {
    border-color: var(--primary);
    background: rgba(255, 0, 51, 0.06);
}

.thumb-face-card.active {
    background: rgba(108, 117, 125, 0.1);
}

.thumb-face-card img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    object-position: center top;
}

.thumb-face-placeholder {
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-face-name {
    font-size: 11px;
    text-align: center;
    padding: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    font-weight: 500;
}

.thumb-face-remove {
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

.thumb-face-remove:hover {
    background: rgba(220, 53, 69, 1);
}

.thumb-face-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 2;
}

.thumb-option-card {
    min-width: 88px;
    flex: 0 0 auto;
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    gap: 6px;
}

.thumb-option-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
    transform: translateY(-2px);
}

.thumb-option-card.selected {
    border-color: var(--primary);
    background: rgba(255, 0, 51, 0.06);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.2);
}

.thumb-option-icon {
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-option-name {
    font-size: 11px;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.thumb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-modal-popup {
    background: var(--surface-light);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.thumb-modal-popup.thumb-modal-lg {
    max-width: 560px;
}

/* Start With Template */
    .thumb-face-card {
        width: 88px;
        min-height: 110px;
        border: 2px solid var(--bs-border-color);
        border-radius: 10px;
        overflow: hidden;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
    }

    .thumb-face-card:hover {
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
    }

    .thumb-face-card.selected {
        border-color: var(--primary);
        background: rgba(255, 0, 51, 0.06);
    }

    .thumb-face-card.active {
        background: rgba(108, 117, 125, 0.1);
    }

    .thumb-face-card img {
        width: 100%;
        height: 72px;
        object-fit: cover;
    }

    .thumb-face-placeholder {
        width: 100%;
        height: 72px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .thumb-face-name {
        font-size: 11px;
        text-align: center;
        padding: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
        font-weight: 500;
    }

    .thumb-face-remove {
        top: 2px;
        right: 2px;
        background: rgba(220, 53, 69, 0.85);
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        cursor: pointer;
    }

    .thumb-face-remove:hover {
        background: rgba(220, 53, 69, 1);
    }

    .thumb-face-badge {
        position: absolute;
        top: 2px;
        right: 2px;
        background: var(--primary);
        color: #fff;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        z-index: 2;
    }

    .thumb-option-card {
        min-width: 88px;
        flex: 0 0 auto;
        border: 2px solid var(--bs-border-color);
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 8px;
        gap: 6px;
    }

    .thumb-option-card:hover {
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
        transform: translateY(-2px);
    }

    .thumb-option-card.selected {
        border-color: var(--primary);
        background: rgba(255, 0, 51, 0.06);
        box-shadow: 0 2px 8px rgba(255, 0, 51, 0.2);
    }

    .thumb-option-icon {
        font-size: 24px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .thumb-option-name {
        font-size: 11px;
        text-align: center;
        font-weight: 500;
        line-height: 1.2;
    }

    .thumb-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1050;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .thumb-modal-popup {
        border-radius: 16px;
        padding: 24px;
        max-width: 400px;
        width: 90%;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    }

    .thumb-modal-popup.thumb-modal-lg {
        max-width: 560px;
    }

    /* Choose Template */
    
     .masonry-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .template-item {
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.3s ease;
        cursor: pointer;
        border: 2px solid transparent;
    }

    .template-item:hover {
        border-color: var(--primary);
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(255, 0, 51, 0.2);
    }

    .template-item.selected {
        border-color: var(--primary);
        border-width: 3px;
        box-shadow: 0 8px 24px rgba(255, 0, 51, 0.35);
    }

    .template-item img {
        width: 100%;
        height: auto;
        display: block;
    }

    .scratch-card {
        border-radius: 12px;
        border: 2px dashed var(--primary);
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 200px;
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .scratch-card:hover {
        background: rgba(255, 0, 51, 0.06);
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(255, 0, 51, 0.15);
    }

    .scratch-icon-wrapper {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: rgba(255, 0, 51, 0.12);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1rem;
        color: var(--primary);
        transition: all 0.3s ease;
    }

    .scratch-card:hover .scratch-icon-wrapper {
        background: rgba(255, 0, 51, 0.22);
        transform: scale(1.1);
    }

    @media (max-width: 992px) {
        .masonry-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }
    }

    @media (max-width: 576px) {
        .masonry-grid {
            grid-template-columns: 1fr;
            gap: 12px;
        }
    }
}

/* ================================================
   Face Swap Page
   ================================================ */

.fs-face-order-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0;
}

.fs-face-order-item {
    width: 88px;
    min-height: 110px;
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    overflow: visible;
    cursor: grab;
    transition: border-color 0.15s, opacity 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
    background: #f9f9f9;
}

.fs-face-order-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
}

.fs-face-order-item.fs-dragging {
    opacity: 0.35;
    cursor: grabbing;
}

.fs-face-order-item.fs-drag-over {
    border-color: var(--primary);
    border-style: dashed;
    background: rgba(255, 0, 51, 0.06);
}

.fs-face-order-item img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px 8px 0 0;
}

.fs-face-order-badge {
    position: absolute;
    top: -9px;
    left: -9px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.fs-face-modal-badge {
    position: absolute;
    top: -9px;
    left: -9px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.fs-face-empty-hint {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(108, 117, 125, 0.06);
    border: 1px dashed var(--bs-border-color);
}

.fs-thumb-clear-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 0;
    transition: background 0.15s;
}

.fs-thumb-clear-btn:hover {
    background: rgba(220, 53, 69, 1);
}

/* ================================================
   Edit Thumbnail Page
   ================================================ */

.et-ref-card {
    width: 72px;
    min-height: 106px;
    border: 2px solid var(--bs-border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: border-color 0.2s ease;
}

.et-ref-card img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    object-position: center top;
}

.et-ref-card-empty {
    cursor: pointer;
    border-style: dashed;
}

.et-ref-card-empty:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.15);
}

.et-ref-card-locked {
    pointer-events: none;
}

.et-ref-placeholder {
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.et-ref-label {
    font-size: 10px;
    text-align: center;
    padding: 3px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    font-weight: 500;
}

.et-ref-index-badge {
    position: absolute;
    top: -9px;
    left: -9px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}