﻿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;
}

.stat-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.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-without-side-gap {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    width: 100%;
    justify-content: space-between;
}

.header-without-side-gap h2 {
    font-size: 22px !important;
    margin-bottom: unset;
    color: #000;
}

.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;
}

.breadcrumb-prev-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb-prev-link:hover {
    color: inherit;
    text-decoration: none;
}

.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;
}

.face-preview-wrapper {
    cursor: pointer;
}

.face-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 12px;
}

.face-preview-wrapper:hover .face-preview-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;
}

/* Edit Page Layout */
.page-edit-layout {
    height: calc(100vh - 300px);
    display: flex;
    flex-direction: column;
}

.edit-panel-card {
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.img-con-flex {
    flex: 1;
    min-height: 0;
    max-height: unset;
}

.edit-scroll-area {
    overflow-y: auto;
    padding: 24px 24px 16px;
    flex: 1;
    min-height: 0;
}

.edit-sticky-footer {
    flex: 0 0 auto;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--bs-border-color);
}

.edit-empty-state {
    min-height: 400px;
}

.edit-empty-icon {
    font-size: 80px;
    opacity: 0.25;
}

.skeleton-img-wrap {
    height: 320px;
    border-radius: 8px;
    position: relative;
}

.skeleton-status-overlay {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
}

.btn-rounded {
    border-radius: 12px !important;
}

.btn-icon {
    font-size: 18px;
    vertical-align: middle;
}

.edit-ai-card img {
    border-radius: 4px;
}

/* 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);
}

.fs-face-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 10px;
    background: #f8f9fa;
    cursor: grab;
    transition: opacity 0.15s, border-color 0.15s;
}

.fs-face-row:active {
    cursor: grabbing;
}

.fs-drag-handle {
    font-size: 20px;
    cursor: grab;
    flex-shrink: 0;
    align-self: center;
    opacity: 0.5;
}

.fs-face-instruct {
    flex: 1 1 0;
    min-width: 0;
    resize: none;
    font-size: 13px;
}

/* ================================================
   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);
}

/* ================================================
   Thumbnail Generation - Skeleton Loader
   ================================================ */

.thumb-skeleton-wrapper {
    width: 100%;
    margin: auto;
}

.thumb-skeleton {
    width: 100%;
    aspect-ratio: 16/9;
    /* default */

    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background: linear-gradient(90deg,
            #f2f2f2 25%,
            #e6e6e6 50%,
            #f2f2f2 75%);

    background-size: 400% 100%;
    animation: shimmer 1.6s infinite linear;

    border:1px solid #e5e5e5;
}

/* shimmer animation */
@keyframes shimmer {
    0% {
        background-position: 100% 0
    }

    100% {
        background-position: -100% 0
    }
}

.skeleton-shimmer {
    background: linear-gradient(90deg,
            #ebebeb 25%,
            #d6d6d6 50%,
            #ebebeb 75%);
    background-size: 400% 100%;
    animation: shimmer 1.6s infinite linear;
}

/* top text area */
.thumb-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title-line {
    height: 32px;
    width: 85%;
    background: #dcdcdc;
    border-radius: 6px;
}

.title-line.small {
    width: 60%;
    height: 24px;
}

/* bottom images */
.thumb-bottom {
    display: flex;
    gap: 12px;
}

.img-placeholder {
    flex: 1;
    height: 45%;
    min-height: 100px;
    background: #dcdcdc;
    border-radius: 10px;
}

/* Status pill */
.thumb-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 0, 51, 0.08);
    border: 1px solid rgba(255, 0, 51, 0.25);
    border-radius: 999px;
    padding: 11px 24px;
}

.thumb-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.thumb-status-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.02em;
}

/* ================================================
   Credits Page
   ================================================ */

.credits-summary-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credits-coin-icon {
    font-size: 28px;
    color: #e0a800;
}

.credits-count-badge {
    background: rgba(255, 0, 51, 0.08);
    border: 1px solid rgba(255, 0, 51, 0.2);
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 2px 14px;
    border-radius: 999px;
}

/* Card wrapper */
.credits-table-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* Toolbar */
.credits-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-wrap: wrap;
    gap: 10px;
}

.credits-page-size-select {
    width: 72px;
}

.credits-search-wrap {
    width: 280px;
}

/* Scrollable table body, sticky header */
.credits-table-scroll {
    overflow-y: auto;
    max-height: calc(100vh - 370px);
}

.credits-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.credits-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #991b1b;
    background: #fef2f2;
    border-bottom: 2px solid #fecaca;
    padding: 11px 16px;
    white-space: nowrap;
}

.credits-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.credits-table tbody tr:hover {
    background: rgba(255, 0, 51, 0.03);
}

.credits-table tbody td {
    padding: 11px 16px;
    vertical-align: middle;
    font-size: 0.92rem;
    border-bottom: 1px solid #f3f4f6;
}

.credits-time-sub {
    font-size: 0.78rem;
    color: #9ca3af;
    display: block;
}

/* Footer */
.credits-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-wrap: wrap;
    gap: 10px;
}

.credits-table-footer .page-link {
    color: #111827;
}

.credits-table-footer .page-link:hover {
    color: #111827;
}

.credits-table-footer .page-item.disabled .page-link {
    color: #9ca3af;
}

.credits-table-footer .page-item.active .page-link,
.credits-page-active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.credits-page-ellipsis {
    cursor: default;
    pointer-events: none;
    color: #9ca3af;
}

/* Badges */
.credits-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.credits-type-addition {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.credits-type-subtraction {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.credits-amount-positive {
    color: #16a34a;
}

.credits-amount-negative {
    color: #dc2626;
}


/* ===== Settings Page ===== */

.settings-section {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    padding: 24px;
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section-header .material-symbols-outlined {
    color: var(--primary);
    font-size: 22px;
}

.settings-avatar-wrap {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 0, 51, 0.06);
    border: 3px solid rgba(255, 0, 51, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-avatar-icon {
    font-size: 52px !important;
    color: var(--primary);
}

.header-avatar-wrap {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 0, 51, 0.06);
    border: 3px solid rgba(255, 0, 51, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar-initial {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.header-avatar-icon {
    font-size: 1.2rem;
    color: var(--primary);
}

.settings-user-display-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
}

.settings-level-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(253, 160, 1, 0.1);
    color: #b45309;
    border: 1px solid rgba(253, 160, 1, 0.28);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.settings-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0 20px;
}

.settings-field-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
}


/* ===== Invite Team Member Page ===== */

.invite-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 56px 52px;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin-top: 32px;
}

.invite-card-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 0, 51, 0.08);
    border: 2px solid rgba(255, 0, 51, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.invite-card-icon {
    font-size: 34px;
    color: var(--primary);
}

.invite-card-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.invite-card-subtitle {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 32px;
    max-width: 380px;
}

.invite-input-group {
    width: 100%;
    margin-bottom: 16px;
    text-align: left;
}

.invite-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.invite-input {
    height: 52px;
    font-size: 1rem;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    padding: 0 16px;
    width: 100%;
    background: #f9fafb;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.invite-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 0, 51, 0.12);
    background: #ffffff;
    outline: none;
}

.invite-input::placeholder {
    color: #9ca3af;
}

.invite-error-msg {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 5px;
}

.invite-send-btn {
    width: 100%;
    height: 52px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    letter-spacing: 0.01em;
}

.invite-send-btn .material-symbols-outlined {
    font-size: 20px;
}

.invite-send-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.invite-success-banner {
    margin-top: 20px;
    width: 100%;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    color: #16a34a;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ===== Accept Invite Page ===== */

.accept-invite-status-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0;
}

.accept-invite-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.accept-invite-icon-wrap .material-symbols-outlined {
    font-size: 36px;
}

.accept-invite-icon-success {
    background: rgba(34, 197, 94, 0.12);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: #16a34a;
}

.accept-invite-icon-info {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.25);
    color: #2563eb;
}

.accept-invite-icon-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 2px solid rgba(234, 179, 8, 0.25);
    color: #a16207;
}

.accept-invite-icon-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
}

.accept-invite-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.accept-invite-sub {
    font-size: 0.93rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

.accept-invite-spinner {
    color: var(--primary);
    width: 2.5rem;
    height: 2.5rem;
}


/* ===== Team Members Page ===== */

.team-status-pending {
    background: rgba(234, 179, 8, 0.1);
    color: #a16207;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.team-status-accepted {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.team-status-cancelled {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.team-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    flex-shrink: 0;
    padding: 0;
    position: relative;
}

.team-icon-btn .material-symbols-outlined {
    font-size: 17px;
    line-height: 1;
}

.team-icon-btn:hover {
    transform: translateY(-1px);
}

.team-icon-btn-manage {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.25);
}

.team-icon-btn-manage:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.45);
    color: #1d4ed8;
}

.team-icon-btn-copy {
    background: rgba(168, 85, 247, 0.08);
    color: #7c3aed;
    border-color: rgba(168, 85, 247, 0.25);
}

.team-icon-btn-copy:hover {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.45);
    color: #6d28d9;
}

.team-icon-btn-resend {
    background: rgba(234, 179, 8, 0.08);
    color: #a16207;
    border-color: rgba(234, 179, 8, 0.25);
}

.team-icon-btn-resend:hover {
    background: rgba(234, 179, 8, 0.18);
    border-color: rgba(234, 179, 8, 0.45);
    color: #854d0e;
}

.team-icon-btn-delete {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.25);
}

.team-icon-btn-delete:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #b91c1c;
}