*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-red: #A02020;
    --deep-red-hover: #8B1A1A;
    --deep-red-light: #FAF0F0;
    --deep-red-muted: #C47070;
    --bg-main: #f3f2f0;
    --card-bg: #faf9f6;
    --sidebar-bg: #faf9f6;
    --white: #FFFFFF;
    --black: #2A2A2A;
    --black-soft: #3D3D3D;
    --gray-100: #F0EFED;
    --gray-200: #E5E3DF;
    --gray-300: #D4D1CC;
    --gray-400: #B5B1AA;
    --gray-500: #918C85;
    --gray-600: #716C66;
    --gray-700: #57534E;
    --gray-800: #3E3B37;
    --sidebar-width: 320px;
    --header-height: 75px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-pill: 50px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.05);
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--gray-800);
    overflow: hidden;
    height: 100vh;
}

/* ===== HEADER ===== */
.header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--deep-red);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.02em;
}

.logo-tagline {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 400;
    margin-left: 2px;
}

.logo-main {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.logo-sub {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 400;
}

.back-link {
    font-size: 12px;
    color: var(--gray-500);
    text-decoration: none;
    margin-left: 16px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
    white-space: nowrap;
}

.back-link:hover {
    color: var(--gray-700);
    border-color: var(--gray-300);
    background: var(--gray-100);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Credits pill - merged unit */
.credits-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 8px;
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-pill);
    transition: all 0.2s;
}

.credits-pill:hover {
    background: var(--gray-100);
}

.credits-pill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.credits-pill-icon svg {
    width: 20px;
    height: 20px;
}

.credits-pill-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.credits-pill-value {
    font-size: 14px;
    font-weight: 400;
    color: var(--black);
}

.credits-pill-label {
    font-size: 10px;
    color: var(--gray-500);
    font-weight: 400;
}

.credits-pill-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-300);
    margin: 0 2px;
}

.credits-pill-btn {
    padding: 5px 14px;
    background: var(--deep-red);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.credits-pill-btn:hover {
    background: var(--deep-red-hover);
}

/* Community / Chat Group Button */
.community-btn {
    padding: 5px 12px;
    background: transparent;
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.community-btn:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B8178, #6B6560);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.user-avatar:hover {
    box-shadow: 0 0 0 3px rgba(107, 101, 96, 0.15);
}

/* ===== MAIN LAYOUT ===== */
.main-wrapper {
    display: flex;
    margin-top: var(--header-height);
    padding-top: 12px;
    height: calc(100vh - var(--header-height) - 12px);
    position: relative;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--card-bg);
    margin: 12px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    min-height: 0;
    padding: 20px;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: 0.02em;
}

/* Upload zone - horizontal layout */
.upload-zone-horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}

.upload-zone-horizontal:hover {
    border-color: var(--deep-red-muted);
    background: var(--deep-red-light);
}

.upload-zone-horizontal-text {
    flex: 1;
}

.upload-zone-horizontal-text .upload-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    line-height: 1.4;
}

.upload-zone-horizontal-text .upload-desc {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

.upload-zone-horizontal-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    flex-shrink: 0;
    transition: all 0.2s;
}

.upload-zone-horizontal:hover .upload-zone-horizontal-icon {
    background: var(--deep-red-light);
    color: var(--deep-red);
}

.upload-zone-horizontal-icon svg {
    width: 20px;
    height: 20px;
}

/* Reference image upload zone */
.upload-zone-ref {
    border: 1.5px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
    position: relative;
    overflow: hidden;
    height: 120px;
    box-sizing: border-box;
}
.upload-zone-ref.has-images {
    padding: 8px;
    border-style: solid;
    border-color: var(--deep-red-muted);
    justify-content: center;
}
.upload-zone-ref.has-images .upload-zone-ref-empty {
    display: none;
}
.upload-zone-ref.has-images:hover .upload-zone-ref-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    z-index: 10;
    pointer-events: none;
}
.upload-zone-ref.has-images .ref-grid {
    display: grid;
}
.ref-grid {
    display: none;
    width: 100%;
    height: 100%;
    gap: 6px;
    padding: 8px;
    align-content: center;
    justify-content: center;
    box-sizing: border-box;
}
.ref-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 80px;
    max-height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
}
.ref-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ref-thumb-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

.upload-zone-ref:hover {
    border-color: var(--deep-red-muted);
    background: var(--deep-red-light);
}

.upload-zone-ref-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all 0.2s;
}

.upload-zone-ref:hover .upload-zone-ref-icon {
    background: var(--deep-red-light);
    color: var(--deep-red);
}

.upload-zone-ref-icon svg {
    width: 20px;
    height: 20px;
}

.upload-zone-ref-text {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    line-height: 1.5;
}
.upload-zone-ref-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Reference tips - entry only */
.ref-tips-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 2px;
}

.ref-tips-entry:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
}

.ref-tips-entry svg {
    width: 14px;
    height: 14px;
    color: var(--deep-red-muted);
    flex-shrink: 0;
}

.ref-tips-entry span {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
}

.ref-tips-entry .chevron {
    margin-left: auto;
    color: var(--gray-400);
}

/* Prompt textarea */
.prompt-area {
    width: 100%;
    min-height: 140px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--gray-800);
    resize: vertical;
    transition: all 0.2s;
    line-height: 1.6;
    background: var(--white);
}

.prompt-area::placeholder {
    color: var(--gray-400);
}

.prompt-area:focus {
    outline: none;
    border-color: var(--deep-red-muted);
    box-shadow: 0 0 0 3px rgba(160, 32, 32, 0.06);
}

.ref-upload-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(160, 32, 32, 0.06);
    border: 1px solid rgba(160, 32, 32, 0.15);
    border-radius: 8px;
    font-size: 11px;
    color: var(--deep-red);
    line-height: 1.4;
    animation: refHintPulse 2s ease-in-out infinite;
}

@keyframes refHintPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Aspect Ratio Grid - very compact */
.ratio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.ratio-option {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}

.ratio-option:hover {
    border-color: var(--gray-400);
    background: var(--gray-100);
}

.ratio-option.active {
    border-color: var(--deep-red);
    background: var(--deep-red-light);
    color: var(--deep-red);
}

.ratio-shape {
    border: 1.5px solid currentColor;
    border-radius: 2px;
    transition: all 0.2s;
}

.ratio-option .ratio-label {
    font-size: 10px;
    font-weight: 500;
}

/* Resolution options */
.resolution-row {
    display: flex;
    gap: 8px;
}

.resolution-option {
    flex: 1;
    padding: 6px 10px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}

.resolution-option:hover {
    border-color: var(--gray-400);
}

.resolution-option.active {
    border-color: var(--deep-red);
    background: var(--deep-red-light);
    color: var(--deep-red);
    font-weight: 600;
}
.resolution-option.disabled {
    color: var(--gray-400);
    background: var(--gray-100);
    border-color: var(--gray-200);
    cursor: not-allowed;
    position: relative;
}

.resolution-option.disabled:hover {
    border-color: var(--gray-200);
    background: var(--gray-100);
}

.resolution-option.disabled::after {
    content: '暂不可用';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.resolution-option.disabled:hover::after {
    opacity: 1;
}

/* Generate Button */
.btn-generate {
    width: 100%;
    padding: 14px;
    background: var(--black);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s;
    font-family: inherit;
    position: relative;
    margin-top: 40px;
}

.btn-generate:hover {
    background: var(--black-soft);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-generate-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.btn-generate-label {
    font-size: 15px;
    font-weight: 400;
}

/* Credits cost indicator on right side of button */
.btn-generate-cost {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    font-size: 15px;
    font-weight: 400;
    color: white;
    flex-shrink: 0;
}

.btn-generate-cost svg {
    width: 13px;
    height: 13px;
}

.generate-hint {
    font-size: 11px;
    color: var(--gray-500);
    text-align: center;
    margin-top: 8px;
}

/* ===== CONTENT AREA ===== */
.content-wrapper {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 28px 24px;
    background: var(--bg-main);
    min-height: 0;
}

.content::-webkit-scrollbar {
    width: 6px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* Content Header */
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

/* Content tabs - no border, pill shape */
.content-tabs {
    display: flex;
    gap: 4px;
    background: var(--white);
    padding: 4px;
    border-radius: var(--radius-pill);
    border: none;
}

.content-tab {
    padding: 8px 18px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-600);
    border: none;
    background: transparent;
    font-family: inherit;
}

.content-tab:hover {
    color: var(--gray-800);
    background: var(--gray-100);
}

.content-tab.active {
    background: var(--black);
    color: white;
    box-shadow: var(--shadow-sm);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--white);
    border: none;
    border-radius: var(--radius-pill);
    width: 220px;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: #8B1A2B;
    box-shadow: 0 0 0 3px rgba(139,26,43,0.1);
}

.search-box svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    color: var(--gray-700);
    background: transparent;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--gray-400);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
}

.filter-pill {
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-600);
    border: none;
    background: var(--white);
    font-family: inherit;
}

.filter-pill:hover {
    color: var(--gray-800);
    background: var(--gray-200);
}

.filter-pill.active {
    background: var(--white);
    color: var(--gray-700);
    font-weight: 600;
}

/* Date filter */
.date-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--white);
    border-radius: var(--radius-pill);
    border: none;
    color: var(--gray-600);
    transition: all 0.2s;
    cursor: pointer;
}

.date-filter:hover {
    background: var(--gray-200);
}

.date-filter svg {
    color: var(--gray-500);
    flex-shrink: 0;
}

.date-filter span {
    font-size: 13px;
    color: var(--gray-700);
    white-space: nowrap;
}

/* Custom Calendar */
.custom-calendar {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 280px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 16px;
    z-index: 100;
    display: none;
    border: 1px solid var(--gray-200);
}

.custom-calendar.active {
    display: block;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cal-month-year {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}

.cal-nav {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.2s;
}

.cal-nav:hover {
    background: var(--gray-100);
    color: var(--black);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.cal-weekdays span {
    text-align: center;
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 500;
    padding: 4px 0;
}

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    text-align: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--gray-700);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: transparent;
}

.cal-day:hover {
    background: var(--gray-100);
}

.cal-day.other-month {
    color: var(--gray-300);
}

.cal-day.no-record {
    color: var(--gray-400);
}

.cal-day.no-record:hover {
    background: var(--gray-100);
}

.cal-day.today {
    color: var(--deep-red);
    font-weight: 600;
}

.cal-day.selected {
    background: var(--deep-red);
    color: white;
    font-weight: 600;
}

.cal-day.selected:hover {
    background: var(--deep-red-hover, #8B1A1A);
}

.cal-day.has-records {
    position: relative;
}

.cal-day.has-records::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--deep-red);
    border-radius: 50%;
}

.cal-day.selected.has-records::after {
    background: white;
}

.cal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.cal-clear, .cal-today {
    padding: 4px 14px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.cal-clear {
    background: transparent;
    color: var(--gray-500);
}

.cal-clear:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.cal-today {
    background: transparent;
    color: var(--deep-red);
}

.cal-today:hover {
    background: var(--deep-red-light, #FAF0F0);
}

/* Gallery Groups */
.gallery-group {
    margin-bottom: 20px;
}

.gallery-group-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.gallery-date {
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-500);
    white-space: nowrap;
}

.gallery-header-line {
    flex: 1;
    height: 1px;
    background-image: repeating-linear-gradient(90deg, var(--gray-400) 0, var(--gray-400) 2px, transparent 2px, transparent 6px);
}

.gallery-count {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 400;
    white-space: nowrap;
}

/* Masonry / Waterfall layout */
.masonry-grid {
    column-count: 5;
    column-gap: 10px;
}

.gallery-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    break-inside: avoid;
    margin-bottom: 6px;
    display: inline-block;
    width: 100%;
}

.gallery-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.gallery-card-image {
    width: 100%;
    display: block;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.gallery-card-image.landscape { aspect-ratio: 16/9; }
.gallery-card-image.portrait-tall { aspect-ratio: 3/4; }
.gallery-card-image.portrait-vtall { aspect-ratio: 9/16; }
.gallery-card-image.square { aspect-ratio: 1/1; }

.gallery-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.45) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    pointer-events: none;
    z-index: 2;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
    pointer-events: auto;
    z-index: 3;
}

.gallery-card-top-actions {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
}

.gallery-card-bottom-actions {
    display: flex;
    gap: 4px;
}

.card-action-btn {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.card-action-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
}

/* Disable tooltips for copy/same-style buttons */
.card-action-btn.copy-btn[title]:hover::after,
.card-action-btn.same-style-btn[title]:hover::after {
    display: none;
}

/* Fav and unfav tooltips show above button (overflow:hidden clips below) */
.card-action-btn.fav[title]:hover::after,
.card-action-btn.unfav[title]:hover::after {
    bottom: 100%;
    top: auto;
    margin-bottom: 6px;
    margin-top: 0;
}

.card-action-btn.sell-top {
    background: rgba(255,255,255,0.9);
    color: var(--gray-700);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.card-action-btn.sell-top:hover {
    background: rgba(255,255,255,1);
    color: var(--black);
}

.card-action-btn.sell {
    background: var(--deep-red);
    color: white;
}

.card-action-btn.sell:hover {
    background: var(--deep-red-hover);
}

.card-action-btn.download {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.card-action-btn.download:hover {
    background: rgba(255,255,255,0.3);
}

.card-action-btn.fav {
    background: rgba(255,255,255,0.9);
    color: var(--gray-700);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-action-btn.fav:hover {
    background: rgba(255,255,255,1);
    color: var(--deep-red);
}

#tab-my-gen .card-action-btn.fav {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(4px);
    border-radius: 4px;
    width: auto;
    height: auto;
    padding: 6px 8px;
}

#tab-my-gen .card-action-btn.fav:hover {
    background: rgba(220,60,60,0.6);
}

.card-action-btn.edit {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.card-action-btn.edit:hover {
    background: rgba(255,255,255,0.3);
}

.card-action-btn.ref {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.card-action-btn.ref:hover {
    background: rgba(255,255,255,0.3);
}

.card-action-btn.del {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.card-action-btn.del:hover {
    background: rgba(220,60,60,0.6);
}

/* Ratio shapes - smaller for very compact grid */
.ratio-3-1 { width: 30px; height: 8px; }
.ratio-2-1 { width: 26px; height: 11px; }
.ratio-21-9 { width: 28px; height: 11px; }
.ratio-16-9 { width: 26px; height: 14px; }
.ratio-3-2 { width: 24px; height: 16px; }
.ratio-4-3 { width: 22px; height: 16px; }
.ratio-1-1 { width: 18px; height: 18px; }
.ratio-3-4 { width: 16px; height: 22px; }
.ratio-2-3 { width: 16px; height: 24px; }
.ratio-9-16 { width: 14px; height: 26px; }
.ratio-9-21 { width: 12px; height: 28px; }
.ratio-1-3 { width: 10px; height: 30px; }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-card {
    animation: fadeInUp 0.5s ease-out both;
}

.gallery-group:nth-child(1) .gallery-card:nth-child(1) { animation-delay: 0.05s; }
.gallery-group:nth-child(1) .gallery-card:nth-child(2) { animation-delay: 0.1s; }
.gallery-group:nth-child(1) .gallery-card:nth-child(3) { animation-delay: 0.15s; }
.gallery-group:nth-child(2) .gallery-card:nth-child(1) { animation-delay: 0.2s; }
.gallery-group:nth-child(2) .gallery-card:nth-child(2) { animation-delay: 0.25s; }
.gallery-group:nth-child(3) .gallery-card:nth-child(1) { animation-delay: 0.3s; }
.gallery-group:nth-child(4) .gallery-card:nth-child(1) { animation-delay: 0.35s; }
.gallery-group:nth-child(5) .gallery-card:nth-child(1) { animation-delay: 0.4s; }
.gallery-group:nth-child(5) .gallery-card:nth-child(2) { animation-delay: 0.45s; }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    overflow: visible;
    padding: 32px;
    max-width: 640px;
    width: 90%;
    max-height: 80vh;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-body {
    overflow-y: auto;
    max-height: calc(80vh - 80px);
    padding-right: 8px;
}

/* Reference tips modal close button - outside card top-right */
.ref-tips-close {
position: absolute;
top: -14px;
right: -14px;
width: 28px;
height: 28px;
border: 1.5px solid var(--gray-200);
background: var(--white);
border-radius: 50%;
font-size: 12px;
color: var(--gray-600);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
transition: all 0.2s;
line-height: 1;
}

.ref-tips-close:hover {
background: var(--gray-100);
color: var(--black);
}

/* Custom scrollbar inside modal */
.modal-body::-webkit-scrollbar {
    width: 4px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
}

.modal-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--black);
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}

.modal-section-img {
    width: 100%;
    border-radius: 12px;
    background: var(--gray-100);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    margin-bottom: 10px;
    overflow: hidden;
}

.modal-section-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-section-desc {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.8;
}

/* Workbench sell modal */
.wb-sell-modal .modal-content {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.wb-sell-modal .modal-body {
    overflow-y: auto;
    max-height: calc(85vh - 80px);
    flex: 1;
}
.wb-sell-modal .wb-modal-form-group {
    margin-bottom: 20px;
}
.wb-sell-modal .wb-modal-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
}
.wb-sell-modal .wb-modal-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    color: #1d1d1f;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}
.wb-sell-modal .wb-modal-textarea:focus {
    border-color: #8B1A2B;
}
.wb-sell-modal .wb-modal-textarea-counter {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
.wb-sell-modal .wb-modal-toggle {
    display: inline-flex;
    background: #f0f0f0;
    border-radius: 10px;
    padding: 3px;
    gap: 0;
}
.wb-sell-modal .wb-modal-toggle-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}
.wb-sell-modal .wb-modal-toggle-btn.active {
    background: #fff;
    color: #1d1d1f;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.wb-sell-modal .wb-upload-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.wb-sell-modal .wb-upload-zone:hover {
    border-color: #999;
}
.wb-sell-modal .wb-upload-icon {
    font-size: 32px;
    color: #ccc;
    margin-bottom: 8px;
}
.wb-sell-modal .wb-upload-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}
.wb-sell-modal .wb-upload-hint {
    font-size: 11px;
    color: #999;
}
.wb-sell-modal .wb-keywords-input {
    flex: 1;
    min-width: 120px;
    padding: 4px 0;
    border: none;
    outline: none;
    font-size: 13px;
    color: #1d1d1f;
    background: transparent;
}
.wb-sell-modal .wb-upload-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.wb-sell-modal .wb-upload-container.img2img {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wb-sell-modal .wb-manual-upload-zone {
    display: none;
}
.wb-sell-modal .wb-upload-container.img2img .wb-manual-upload-zone {
    display: block;
}
.wb-sell-modal .wb-auto-image-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    padding: 16px;
    min-width: 0;
    box-sizing: border-box;
    height: 320px;
    display: flex;
    flex-direction: column;
}
.wb-sell-modal .wb-manual-upload-zone {
    display: none;
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    padding: 16px;
    min-width: 0;
    box-sizing: border-box;
    height: 320px;
    flex-direction: column;
}
.wb-sell-modal .wb-upload-container.img2img .wb-manual-upload-zone {
    display: flex;
}
.wb-sell-modal .wb-auto-image-preview,
.wb-sell-modal .wb-manual-upload-grid {
    flex: 1;
    height: auto;
    min-height: 0;
}
.wb-sell-modal .wb-auto-image-label,
.wb-sell-modal .wb-manual-upload-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}
.wb-sell-modal .wb-auto-image-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wb-sell-modal .wb-auto-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.wb-auto-image-preview .van-uploader__preview-image,
.wb-auto-image-preview .van-uploader__preview,
.wb-auto-image-preview .van-uploader__wrapper,
.wb-auto-image-preview .van-uploader{
    width: 100%;
    height: 100%;
}
.wb-auto-image-preview .van-uploader__preview{
    margin: 0;
}
.wb-auto-image-preview .van-uploader__preview-image img{
    object-fit: contain !important;
}
.wb-sell-modal .wb-auto-image-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 12px;
}
.wb-sell-modal .wb-manual-upload-grid {
    display: grid;
    /* grid-template-columns: repeat(3, 1fr); */
    gap: 8px;
    height: 280px;
    align-content: start;
    overflow-y: auto;
}
.wb-sell-modal .wb-manual-upload-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}
.wb-sell-modal .wb-manual-upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wb-sell-modal .wb-manual-upload-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.wb-sell-modal .wb-manual-upload-add:hover {
    background: #eee;
}
.wb-sell-modal .wb-manual-upload-icon {
    font-size: 24px;
    color: #ccc;
}
.wb-sell-modal .wb-manual-upload-hint {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}
.wb-sell-modal .wb-manual-upload-item .wb-manual-upload-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}
.wb-sell-modal .wb-manual-upload-item:hover .wb-manual-upload-delete {
    opacity: 1;
}
.wb-sell-modal .wb-keywords-input-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.2s;
    min-height: 40px;
}
.wb-sell-modal .wb-keywords-input-wrap:focus-within {
    border-color: #8B1A2B;
}
.wb-sell-modal .wb-keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.wb-sell-modal .wb-keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 16px;
    font-size: 12px;
    color: #333;
}
.wb-sell-modal .wb-keyword-tag .wb-keyword-tag-text {
    font-weight: 500;
}
.wb-sell-modal .wb-keyword-tag .wb-keyword-tag-close {
    cursor: pointer;
    color: #999;
    font-size: 14px;
    line-height: 1;
}
.wb-sell-modal .wb-keyword-tag .wb-keyword-tag-close:hover {
    color: #666;
}
.wb-sell-modal .wb-keywords-input::placeholder {
    color: #bbb;
}
.wb-sell-modal .wb-bottom-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.wb-sell-modal .wb-bottom-row select,
.wb-sell-modal .wb-bottom-row input[type="text"],
.wb-sell-modal .wb-bottom-row input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #1d1d1f;
    outline: none;
    min-width: 100px;
}
.wb-sell-modal .wb-bottom-row select {
    min-width: 120px;
}
.wb-sell-modal .wb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1d1d1f;
    cursor: pointer;
}
.wb-sell-modal .wb-submit-btn {
    display: inline-flex;
    padding: 10px 32px;
    background: #8B1A2B;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
}
.wb-sell-modal .wb-submit-btn:hover {
    background: #7a1525;
}

/* Change 4: Center bottom actions for my-gen */
.tab-panel#tab-my-gen .gallery-card-bottom-actions { justify-content: center; }

/* Change 5: Filter pills transition */

/* Change 8: Inspiration gallery center actions */
.gallery-card-center-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card-action-btn.copy-btn,
.card-action-btn.same-style-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--bg-elevated, rgba(255,255,255,0.92));
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-action-btn.copy-btn svg,
.card-action-btn.same-style-btn svg {
    color: var(--deep-red);
}

.card-action-btn.copy-btn:hover,
.card-action-btn.same-style-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    background: rgba(255,255,255,1);
    color: var(--black);
}

.card-action-btn.copy-btn:active,
.card-action-btn.same-style-btn:active {
    transform: scale(0.97);
}

.gallery-card-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
}

.card-info-users {
    font-size: 12px;
    font-weight: 300;
    color: white;
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.3px;
}

.card-info-users svg {
    opacity: 0.8;
}

.card-info-price {
    font-size: 13px;
    color: #C9A96E;
    font-weight: 500;
}

.card-info-free-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-weight: 400;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* Change 8: Hot keywords */
.hot-keywords {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
    flex-wrap: wrap;
}

.hot-keywords-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
    display: block;
}

.hot-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-keyword {
    padding: 5px 14px;
    background: #faf9f8;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.hot-keyword:hover {
    border-color: var(--deep-red-muted);
    color: var(--deep-red);
    background: var(--deep-red-light);
}

.hot-keyword-sort.active {
    background: var(--deep-red);
    border-color: var(--deep-red);
    color: #fff;
}

.hot-keyword-sort.active:hover {
    background: var(--deep-red-hover);
    border-color: var(--deep-red-hover);
    color: #fff;
}

/* Sort links for workbench inspiration tab */
.hot-keywords > .sort-links a {
    padding: 3px 8px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 11px;
}

.hot-keywords > .sort-links a:hover {
    color: var(--deep-red);
    background: rgba(139,26,43,0.06);
}

.hot-keywords > .sort-links a.active {
    color: var(--deep-red);
    font-weight: 500;
}

/* Change 10: For-sale card styles */
.card-sold-count {
    font-size: 11px;
    color: white;
    background: rgba(0,0,0,0.6);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(4px);
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.card-action-btn.edit-info,
.card-action-btn.off-shelf-del {
    background: rgba(255,255,255,0.9);
    color: var(--gray-700);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    font-size: 13px;
}

.card-action-btn.edit-info:hover,
.card-action-btn.off-shelf-del:hover {
    background: rgba(255,255,255,1);
    color: var(--black);
}

.card-action-btn.off-shelf-del:hover {
    background: rgba(220,60,60,0.7);
    color: white;
}

/* Change 3: Inspiration gallery fav button - frosted semi-transparent */
#tab-inspiration .card-action-btn.fav {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(4px);
}

/* Change 11: Unfav button */
.card-action-btn.unfav {
    background: rgba(255,255,255,0.2);
    color: var(--deep-red);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-action-btn.unfav:hover {
    background: rgba(255,255,255,0.3);
}

/* Hot keyword search input */
.hot-keyword-search {
    padding: 5px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--gray-600);
    background: var(--white);
    outline: none;
    width: 200px;
    transition: all 0.2s;
}

.hot-keyword-search:focus {
    border-color: var(--deep-red-muted);
}


.hot-keyword-active-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hot-keyword-active-wrapper .hot-keyword {
    border-color: var(--deep-red);
    color: var(--deep-red);
}

.hot-keyword-active-clear {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: var(--gray-300);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s;
}

.hot-keyword-active-clear:hover {
    background: var(--gray-500);
}

.gallery-card-bottom-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#tab-for-sale .card-action-btn[title]:hover::after {
    display: none;
}

#tab-inspiration .gallery-card-bottom-actions {
    justify-content: center;
}

#tab-for-sale .gallery-card-bottom-actions {
    justify-content: center;
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    padding: 0 8px;
}

#tab-my-fav .gallery-card-bottom-actions {
    justify-content: center;
}



/* ========== Recharge Modal ========== */
/* ========== Recharge Modal — Workbench Theme ========== */
.recharge-modal {
    backdrop-filter: blur(12px);
    background: rgba(42, 42, 42, 0.45);
}

.recharge-modal-content {
    max-width: 680px;
    width: 94%;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08);
    padding: 0;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    position: relative;
    overflow: visible;
}

.recharge-modal.active .recharge-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header bar */
.recharge-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 28px 0;
}

/* Balance inline — inside header left */
.recharge-balance-inline {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.recharge-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    border-radius: 50%;
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.recharge-close:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Body wrapper */
.recharge-body {
    padding: 4px 28px 20px;
}

.recharge-balance-label {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.recharge-balance-value {
    font-size: 28px;
    font-weight: 700;
    color: #C9A96E;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.recharge-balance-unit {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.recharge-balance-note {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

/* Section label */
.recharge-section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: 0.02em;
    margin-top: 20px;
    margin-bottom: 12px;
}

/* Package cards — 2x2 grid */
.recharge-packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
    padding-top: 0;
}

.recharge-pkg {
    position: relative;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    padding: 22px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    overflow: visible;
}

.recharge-pkg:hover {
    border-color: var(--gray-300);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.recharge-pkg.selected {
    background: #FFF5F5;
    border-color: var(--deep-red-muted, #E8A0A0);
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(160,32,32,0.12);
}

/* Left side — coin info, vertically centered */
.recharge-pkg-left {
    flex: 1;
}

/* Right side — price, vertically centered */
.recharge-pkg-right {
    flex-shrink: 0;
}

/* Badge — half above the top border */
.recharge-pkg-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--deep-red), #C44040);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 12px;
    line-height: 1.3;
    letter-spacing: 0.05em;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(160,32,32,0.3);
    z-index: 2;
}

.recharge-pkg.selected .recharge-pkg-badge {
    background: var(--deep-red);
    color: #fff;
    box-shadow: 0 3px 10px rgba(160,32,32,0.25);
}

/* Coin amount — number on top, unit below */
.recharge-pkg-coins {
    font-size: 26px;
    font-weight: 700;
    color: var(--black);
    line-height: 1.1;
    margin-bottom: 1px;
}

.recharge-pkg-coins span,
.recharge-pkg-unit {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
    margin-left: 0;
    margin-top: 2px;
}

.recharge-pkg.selected .recharge-pkg-coins {
    color: var(--deep-red);
}

.recharge-pkg.selected .recharge-pkg-unit {
    color: var(--deep-red-muted, #C47070);
}

/* Bonus tag */
.recharge-pkg-bonus {
    display: inline-block;
    font-size: 10px;
    color: var(--deep-red);
    font-weight: 600;
    margin: 4px auto 6px;
    letter-spacing: 0.03em;
    padding: 1px 6px;
    background: var(--deep-red-light);
    border-radius: 3px;
}

.recharge-pkg.selected .recharge-pkg-bonus {
    color: var(--deep-red);
    background: rgba(160,32,32,0.08);
}

/* Price */
.recharge-pkg-price {
    font-size: 18px;
    color: var(--gray-600);
    font-weight: 600;
}

.recharge-pkg.selected .recharge-pkg-price {
    color: var(--deep-red);
}

/* Payment section — card style */
.recharge-payment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
}

.recharge-payment-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recharge-payment-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.recharge-payment-amount {
    font-size: 26px;
    font-weight: 700;
    color: var(--deep-red);
    line-height: 1.2;
}

/* QR code area */
.recharge-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.recharge-qr {
    width: 72px;
    height: 72px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.recharge-qr:hover {
    border-color: var(--gray-300);
}

.recharge-qr svg {
    width: 30px;
    height: 30px;
    color: #07C160;
}

.recharge-qr-wrap > span:last-child {
    font-size: 10px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Payment security note */
.recharge-payment-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-200);
    font-size: 11px;
    color: var(--gray-500);
    letter-spacing: 0.03em;
}

.recharge-security-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--deep-red);
    opacity: 0.6;
}

/* ========== End Recharge Modal ========== */

/* ========== Community Dropdown ========== */
.community-dropdown {
    position: fixed;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 1000;
    width: 260px;
}

.community-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.community-dropdown-notice {
    font-size: 12px;
    color: var(--deep-red);
    text-align: center;
    padding: 10px 16px 6px;
    font-weight: 500;
}

.community-dropdown-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    text-align: center;
}

.community-qr-grid {
    display: flex;
    gap: 14px;
}

.community-qr-item {
    flex: 1;
    text-align: center;
}

.community-qr-img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    object-fit: cover;
    margin-bottom: 6px;
}

.community-qr-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
}

/* ========== Avatar Dropdown Menu ========== */
.avatar-dropdown {
    position: fixed;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 160px;
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.avatar-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.avatar-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: center;
    font-family: inherit;
}

.avatar-dropdown-item:hover {
    background: var(--gray-100);
}

.avatar-dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--gray-500);
}

.avatar-dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 8px;
}

.avatar-dropdown-item.danger {
    color: var(--deep-red);
}

.avatar-dropdown-item.danger svg {
    color: var(--deep-red);
}

.avatar-dropdown-item.danger:hover {
    background: rgba(160,32,32,0.06);
}

/* ========== Record Pages ========== */
.record-panel {
    max-width: 720px;
    width: 92%;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    margin: auto;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1100;
    overflow: visible;
}

.record-panel-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    border-radius: 50%;
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.record-panel-close:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-700);
}

.record-panel.active {
    display: flex;
}
.record-panel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--card-bg);
    flex-shrink: 0;
}

/* Profile bar at top — centered, vertical */
.record-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 20px 16px;
    flex-shrink: 0;
}

.record-avatar-edit {
    position: relative;
    cursor: pointer;
}

.record-avatar-camera {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 50%;
    padding: 2px;
    color: var(--gray-600);
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.record-avatar-edit:hover .record-avatar-camera {
    opacity: 1;
}

.record-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--deep-red), #C44040);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(160,32,32,0.2);
}

.record-username-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    cursor: pointer;
}

.record-username-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.record-username-edit-icon {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--gray-400);
    opacity: 0;
    transition: opacity 0.2s;
}

.record-username-wrap:hover .record-username-edit-icon {
    opacity: 1;
}

.record-username-input {
    position: absolute;
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    border: 1.5px solid var(--deep-red);
    border-radius: 6px;
    padding: 3px 10px;
    outline: none;
    background: var(--white);
    font-family: inherit;
    width: 140px;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.record-panel-tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    border-radius: 20px;
    padding: 3px;
}

.record-tab {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    font-family: inherit;
}

.record-tab:hover {
    color: var(--gray-800);
    background: rgba(0,0,0,0.04);
}

.record-tab.active {
    background: var(--black);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.record-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.record-table {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}

.record-table-header {
    display: grid;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--gray-200);
    background: var(--card-bg);
}

.record-table-header.usage-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.record-table-header.order-cols {
    grid-template-columns: 100px 1fr 80px 80px 80px;
}

.record-table-row {
    display: grid;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    align-items: center;
}

.record-table-row:last-child {
    border-bottom: none;
}

.record-table-row.usage-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.record-table-row.order-cols {
    grid-template-columns: 100px 1fr 80px 80px 80px;
}

.record-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
    font-size: 13px;
}

/* Status badge */
.record-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.record-status.paid {
    background: rgba(7,193,96,0.08);
    color: #07C160;
}

.record-status.pending {
    background: rgba(255,165,0,0.08);
    color: #E69500;
}

/* Invoice button */
.record-invoice-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--deep-red);
    background: rgba(160,32,32,0.06);
    border: 1px solid rgba(160,32,32,0.15);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.record-invoice-btn:hover {
    background: rgba(160,32,32,0.12);
    border-color: rgba(160,32,32,0.25);
}

/* ========== Invoice Modal ========== */
.invoice-modal {
    z-index: 1200;
    backdrop-filter: blur(12px);
    background: rgba(42, 42, 42, 0.45);
}

.invoice-modal-content {
    max-width: 420px;
    width: 90%;
    background: var(--card-bg);
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 0;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    position: relative;
    overflow: visible;
}

.invoice-modal.active .invoice-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.invoice-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    border-radius: 50%;
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.invoice-close:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-700);
}

.invoice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 0;
}

.invoice-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
}

.invoice-body {
    padding: 16px 24px 20px;
}

.invoice-field {
    margin-bottom: 14px;
}

.invoice-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.invoice-field input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    color: var(--black);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.invoice-field input:focus {
    border-color: var(--deep-red);
    box-shadow: 0 0 0 3px rgba(160,32,32,0.08);
}

.invoice-field input::placeholder {
    color: var(--gray-400);
}

.invoice-note {
    margin-top: 16px;
    padding: 10px 12px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 11px;
    color: var(--gray-500);
    line-height: 1.5;
}

.invoice-submit {
    width: 100%;
    padding: 11px;
    margin-top: 16px;
    background: var(--deep-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.invoice-submit:hover {
    background: #8A1A1A;
}

/* ========== End Avatar Dropdown & Records ========== */

/* ========== Watermark Modal ========== */
.watermark-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    backdrop-filter: blur(12px);
    background: rgba(42, 42, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.watermark-modal.active {
    opacity: 1;
    visibility: visible;
}

.watermark-modal-content {
    max-width: 520px;
    width: 92%;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 0;
    position: relative;
    overflow: visible;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

.watermark-modal.active .watermark-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.watermark-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    border-radius: 50%;
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.watermark-close:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-700);
}

.watermark-header {
    padding: 22px 24px 0;
}

.watermark-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: 0.01em;
}

.watermark-body {
    padding: 14px 24px 20px;
}

.watermark-legal {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.watermark-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.watermark-switch-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.watermark-switch-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

/* Toggle switch */
.watermark-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.25s;
    flex-shrink: 0;
}

.watermark-toggle.active {
    background: var(--deep-red);
}

.watermark-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.watermark-toggle.active::after {
    transform: translateX(20px);
}

.watermark-save-btn {
    padding: 8px 24px;
    background: var(--deep-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.watermark-save-btn:hover {
    background: #8A1A1A;
}

/* ========== End Watermark Modal ========== */

/* ========== Image Preview Modal ========== */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    background: rgba(42, 42, 42, 0.45);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-preview-modal.active {
    visibility: visible;
    opacity: 1;
}

.image-preview-modal-content {
    max-width: var(--preview-max-width, 900px);
    width: 94%;
    height: 650px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 0;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    position: relative;
    overflow: visible;
}

.image-preview-modal.active .image-preview-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.image-preview-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    border-radius: 50%;
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.image-preview-close:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-700);
}

.image-preview-content {
    display: flex;
    gap: 0;
}

.image-preview-left {
    flex: 1;
    min-width: 0;
    background: var(--card-bg);
    border-radius: 16px 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    position: relative;
    height: 650px;
}

.image-preview-left .preview-img-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: hidden;
    padding: 48px 24px;
    box-sizing: border-box;
}

.image-preview-left .preview-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    display: block;
    aspect-ratio: auto !important;
    box-sizing: border-box;
}

.image-preview-right {
    width: 380px;
    flex-shrink: 0;
    padding: 32px 24px 24px 24px;
    overflow-y: auto;
    height: 650px;
}

.image-preview-right .preview-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.image-preview-right .preview-copy-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all 0.2s;
    flex-shrink: 0;
}

.image-preview-right .preview-copy-btn:hover {
    color: var(--deep-red);
    background: rgba(160,32,32,0.04);
}

.image-preview-right .preview-copy-btn.copied {
    color: #16a34a;
    background: rgba(22,163,74,0.06);
}

.image-preview-right .preview-copy-btn svg {
    width: 15px;
    height: 15px;
}

.image-preview-right .preview-prompt-text {
    font-size: 15px;
    line-height: 2;
    color: var(--gray-700);
    margin-bottom: 24px;
    word-break: break-word;
    padding: 16px;
    background: var(--gray-100);
    border-radius: 10px;
}

.image-preview-right .preview-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 16px;
}

.image-preview-right .preview-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--deep-red), #C44040);
    color: #fff;
}

.image-preview-right .preview-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
}

.image-preview-right .preview-user-date {
    font-size: 13px;
    color: var(--gray-500);
    margin-left: auto;
}

.image-preview-right .preview-stats-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--gray-600);
}

.image-preview-right .preview-stats-row .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.image-preview-right .preview-stats-row .stat-price {
    color: var(--deep-red);
    font-weight: 600;
    font-size: 17px;
}

.image-preview-right .preview-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.image-preview-right .preview-tag {
    padding: 5px 12px;
    background: var(--gray-100);
    border-radius: 14px;
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
}

.image-preview-right .preview-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.image-preview-right .preview-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    flex: 1;
    justify-content: center;
}

.image-preview-right .preview-action-btn:hover {
    border-color: var(--deep-red);
    color: var(--deep-red);
    background: rgba(160,32,32,0.04);
}

.image-preview-right .preview-action-btn.primary {
    background: var(--deep-red);
    color: #fff;
    border-color: var(--deep-red);
}

.image-preview-right .preview-action-btn.primary:hover {
    background: #8A1A1A;
    border-color: #8A1A1A;
    color: #fff;
}

/* Gen modal action buttons */
.preview-gen-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.preview-gen-actions-row {
    display: flex;
    gap: 8px;
}

.preview-gen-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    flex: 1;
    justify-content: center;
}

.preview-gen-action-btn:hover {
    border-color: var(--deep-red);
    color: var(--deep-red);
    background: rgba(160,32,32,0.04);
}

.preview-gen-action-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.preview-gen-action-btn.danger:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: rgba(220,38,38,0.04);
}
.preview-gen-action-btn.sell {
    background: #8B1A2B;
    color: #fff;
    border-color: #8B1A2B;
}
.preview-gen-action-btn.sell:hover {
    background: #6b1222;
    border-color: #6b1222;
    color: #fff;
}

/* Inspiration modal: smaller action buttons */
.insp-preview-actions {
    display: flex;
    gap: 8px;
}

.insp-preview-actions .preview-action-btn {
    padding: 7px 12px;
    font-size: 11px;
    gap: 4px;
}

.insp-preview-actions .preview-action-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* --- Inspiration preview extras --- */
.preview-left-tags {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
    z-index: 5;
}

.preview-left-tag {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.preview-left-tag.exclusive {
    background: linear-gradient(135deg, #C9A96E, #E8D5A8);
    color: var(--black);
}

.preview-left-tag.ai-gen {
    background: var(--gray-200);
    color: var(--gray-700);
}

.image-preview-left {
    position: relative;
}

.preview-prompt-section {
    position: relative;
    margin-top: 12px;
    margin-bottom: 16px;
    min-height: 180px;
}

.preview-prompt-feather-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 40%);
    pointer-events: none;
    z-index: 2;
}

.preview-prompt-section .preview-info-overlay {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    z-index: 3;
}

.preview-info-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    margin-bottom: 16px;
    position: relative;
    z-index: 3;
}

.preview-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.preview-info-label {
    font-size: 12px;
    color: var(--gray-500);
    flex-shrink: 0;
    min-width: 70px;
}

.preview-info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
}

.preview-info-value .info-copy-btn,
.preview-info-row > .info-copy-btn {
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: color 0.2s;
    margin-left: -2px;
    flex-shrink: 0;
    padding: 0;
}

.preview-info-value .info-copy-btn:hover,
.preview-info-row > .info-copy-btn:hover {
    color: var(--deep-red);
}

.preview-info-value.price {
    color: var(--deep-red);
    font-weight: 700;
}

.preview-free-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 400;
    background: linear-gradient(135deg, #C9A96E, #E8D5A8, #C9A96E);
    color: var(--black);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.preview-fav-share {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.preview-fav-share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    flex: 1;
    justify-content: center;
}

.preview-fav-share-btn:hover {
    color: var(--deep-red);
    background: rgba(160,32,32,0.04);
}

.preview-fav-share-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.preview-fav-share-btn.active {
    color: var(--deep-red);
    background: rgba(160,32,32,0.06);
}

.preview-fav-share-btn.active svg {
    fill: var(--deep-red);
}

/* Inspiration: usage count at top */
.insp-usage-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 14px;
}

.insp-usage-count svg {
    flex-shrink: 0;
    color: var(--gray-500);
}

/* Inspiration: keywords section */
.insp-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    margin-bottom: 18px;
}

.insp-keyword-tag {
    padding: 3px 10px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 400;
}

/* Inspiration: bottom bar with author + fav/share */
.insp-bottom-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.insp-bottom-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.insp-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.insp-author-stats-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.insp-author-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.insp-author-stat-num {
    font-size: 18px;
    font-weight: 400;
    color: var(--gray-800);
    line-height: 1.2;
}

.insp-author-stat-label {
    font-size: 10px;
    color: var(--gray-500);
}

.insp-author-stats-inline .insp-author-stats-dot {
    width: 1px;
    height: 24px;
    border-radius: 0;
    background: var(--gray-200);
    flex-shrink: 0;
    align-self: center;
}

.insp-author-detail {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.insp-author-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.insp-author-verified {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--gray-500);
    margin-top: 2px;
}

.insp-author-verified svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--gray-500);
}

.insp-author-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--gray-500);
}

.insp-author-stats-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--gray-400);
    flex-shrink: 0;
}

.insp-bottom-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.insp-bottom-actions .preview-fav-share-btn {
    flex: none;
    padding: 8px;
}

/* ========== End Image Preview Modal ========== */

/* ========== MOBILE (max-width: 768px) ========== */
@media (max-width: 768px) {

    /* --- Header --- */
    .header {
        height: 56px;
        padding: 0 14px;
    }
    .logo-icon { width: 28px; height: 28px; }
    .logo-text { font-size: 15px !important; }
    .logo-sub { font-size: 10px !important; }
    .back-link { display: none; }
    .community-btn { display: none; }
    .credits-pill { padding: 4px 8px; gap: 5px; }
    .credits-pill-icon { width: 20px; height: 20px; }
    .credits-pill-icon svg { width: 13px; height: 13px; }
    .credits-pill-value { font-size: 13px; }
    .credits-pill-btn { padding: 3px 10px; font-size: 11px; }
    .user-avatar { width: 30px; height: 30px; font-size: 11px; }

    /* --- Layout: vertical stack, content on top --- */
    .main-wrapper {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 56px);
        margin-top: 56px;
        padding-top: 10px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Content area first (tabs at top) */
    .content-wrapper {
        order: -1;
        padding-top: 90px; /* space for fixed tabs + search box */
    }
    .content {
        padding: 0 12px 32px;
    }

    /* Tabs: fixed below header */
    .content-header {
        position: fixed;
        top: 56px;
        left: 20px;
        right: 20px;
        z-index: 80;
        background: var(--bg-main);
        padding: 8px 0 0;
        margin-bottom: 0;
        flex-direction: column;
        gap: 8px;
    }
    .sidebar {
        width: 100%;
        min-width: 0;
        margin: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
        max-height: calc(100vh - 102px);
        overflow: hidden;
        flex-shrink: 0;
        position: fixed;
        top: 102px;
        left: 0;
        right: 0;
        z-index: 90;
        background: var(--white);
        border: none;
        border-top: 1px solid var(--gray-200);
        transform: translateY(calc(100vh - 102px));
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar:not(.collapsed) {
        transform: translateY(0);
    }
    .sidebar.collapsed {
        transform: translateY(calc(100vh - 102px));
        pointer-events: none;
    }
    .sidebar-scroll {
        padding: 14px 16px 20px;
        gap: 12px;
        overflow-y: auto;
        max-height: calc(100vh - 102px);
    }

    /* Upload zone - compact */
    .upload-zone-horizontal {
        padding: 10px 12px;
        gap: 10px;
    }
    .upload-zone-horizontal-icon { width: 32px; height: 32px; }
    .upload-zone-horizontal-icon svg { width: 16px; height: 16px; }
    .upload-title { font-size: 12px !important; }
    .upload-desc { font-size: 10px !important; }

    /* Reference upload */
    .upload-zone-ref { height: 80px; font-size: 12px; }
    .upload-zone-ref-icon { width: 22px; height: 22px; }
    .ref-tips-entry { font-size: 12px; }

    /* Prompt textarea */
    .prompt-area {
        height: 56px;
        font-size: 13px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    /* Ratio grid: 6 columns */
    .ratio-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 4px;
    }
    .ratio-option { padding: 6px 2px; }
    .ratio-shape { transform: scale(0.7); }
    .ratio-label { font-size: 9px; }

    /* Resolution */
    .resolution-row { gap: 6px; }
    .resolution-option { padding: 6px 16px; font-size: 12px; }

    /* Generate button */
    .btn-generate { padding: 12px; font-size: 14px; }
    .btn-generate-icon svg { width: 16px; height: 16px; }
    .generate-hint { font-size: 10px; }

    /* Section label */
    .section-label { font-size: 11px; margin-bottom: 4px; }

    /* --- Content area --- */
    .content-wrapper {
        flex: 1;
        overflow: visible;
    }

    /* Tabs (styles already set above in fixed rule) */
    .content-tabs {
        display: flex;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 3px;
        background: var(--gray-100);
        border-radius: var(--radius-pill);
        flex-shrink: 0;
        max-width: 100%;
    }
    .content-tabs::-webkit-scrollbar { display: none; }
    .content-tab {
        padding: 6px 16px;
        font-size: 12px;
        white-space: nowrap;
        border-radius: var(--radius-pill);
        flex-shrink: 0;
    }
    .content-tab svg { width: 12px; height: 12px; }

    /* Search box */
    .search-box {
        width: 100%;
        border: 1px solid var(--gray-200);
    }

    /* Filter pills */
    .filter-pills {
        padding: 0 12px;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 14px;
    }
    .filter-pill { padding: 5px 16px; font-size: 12px; }

    /* Masonry grid: 2 columns */
    .masonry-grid {
        columns: 2 !important;
        column-gap: 10px;
    }
    .gallery-card { margin-bottom: 10px; border-radius: 10px; }
    .gallery-card-overlay {
        border-radius: 10px;
        padding: 8px;
    }
    .card-action-btn { padding: 6px; }
    .card-action-btn svg { width: 12px; height: 12px; }

    /* Gallery group */
    .gallery-group-header { padding: 4px 12px; margin-bottom: 10px; }
    .gallery-date { font-size: 13px; }
    .gallery-count { font-size: 11px; }

    /* Calendar */
    .custom-calendar { width: calc(100vw - 48px); }

    /* Modals - mobile friendly */
    .modal-overlay { overflow: hidden; }
    .modal-content {
        width: 92vw;
        max-width: none;
        padding: 20px 16px;
        border-radius: 14px;
        overflow: visible;
    }
    .ref-tips-close,
    .recharge-close,
    .watermark-close,
    .image-preview-close {
        top: -10px;
        right: -6px;
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    .watermark-modal-content { width: 92vw; max-width: 360px; overflow: visible; }
    .recharge-modal-content { width: 92vw; max-width: 380px; overflow: visible; }
    .record-panel { width: 92vw; max-width: 380px; }
    .image-preview-modal-content { width: 96vw; max-width: none; border-radius: 12px; height: auto; max-height: 85vh; }
    .image-preview-modal-content .image-preview-inner { flex-direction: column !important; }
    .image-preview-left {
        height: auto !important;
        max-height: 45vh;
        border-radius: 12px 12px 0 0 !important;
    }
    .image-preview-right {
        width: 100% !important;
        height: auto !important;
        padding: 16px !important;
        overflow-y: visible !important;
    }
    .image-preview-right .preview-user-row { padding-bottom: 10px; margin-bottom: 10px; }
    .image-preview-right .preview-user-avatar { width: 32px; height: 32px; }
    .image-preview-right .preview-prompt-text { margin-bottom: 12px; }
    .image-preview-right .preview-actions {
        padding-top: 20px;
        margin-top: 20px;
        gap: 10px;
    }

    /* Order records: card layout on mobile */
    .record-table-header.order-cols {
        display: none;
    }
    .record-table-row.order-cols {
        display: flex;
        flex-wrap: wrap;
        padding: 12px 14px;
        gap: 4px 12px;
        align-items: center;
        font-size: 12px;
    }
    .record-table-row.order-cols > span:nth-child(1) { order: 1; width: 100%; color: var(--gray-500); font-size: 11px; }
    .record-table-row.order-cols > span:nth-child(2) { order: 2; flex: 1; }
    .record-table-row.order-cols > span:nth-child(3) { order: 3; font-weight: 600; }
    .record-table-row.order-cols > span:nth-child(4) { order: 4; }
    .record-table-row.order-cols > span:nth-child(5) { order: 5; }

    /* Floating generate button at bottom */
    .mobile-sidebar-trigger {
        display: none;
        position: fixed;
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 85;
        width: calc((100% - 24px) * 2 / 3);
        padding: 13px;
        background: rgba(160, 32, 32, 0.5);
        border-radius: 50px;
        border: none;
        color: var(--white);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        font-family: inherit;
        box-shadow: 0 2px 16px rgba(160, 32, 32, 0.25);
        white-space: nowrap;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .mobile-sidebar-trigger:active {
        background: rgba(160, 32, 32, 0.65);
        transform: translateX(-50%) scale(0.98);
    }
    .sidebar.collapsed + .mobile-sidebar-trigger {
        display: flex !important;
    }
}

/* Mobile sidebar trigger - hidden on desktop */
.mobile-sidebar-trigger {
    display: none !important;
}


.zx-notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background-color: #FFF5DC;
  border: 1px solid #E0C050;
  border-radius: 2em;
  cursor: pointer;
  width: 34%;
  height: 32px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 6px;
  box-shadow: 0 2px 8px rgba(224, 192, 80, 0.15);
}

/* 左侧内容区 */
.zx-notice-bar__left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.zx-notice-bar__icon svg{
    width: 15px;
    height: 15px;
    fill:#E0C050;
}

.zx-notice-bar__text {
  font-size: 12px;
  font-weight: 500;
  color: #8A6D10;
  word-break: break-word;
  /* 单行省略 */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 关闭按钮 */
.zx-notice-bar__close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(138, 109, 16, 0.10);
  color: #8A6D10;
  font-size: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  line-height: 1;
}
.zx-notice-bar__close:hover {
  background: rgba(138, 109, 16, 0.20);
  transform: rotate(90deg);
}

/* ---------- 弹窗遮罩 ---------- */
.zx-notice-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    background: rgba(42, 42, 42, 0.45);
}

/* ---------- 弹窗主体 ---------- */
.zx-notice-modal {
    max-width: 680px;
    width: 94%;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08);
    padding: 0;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    position: relative;
    overflow: visible;
}

@keyframes zx-notice-modal-in {
    0% {
        opacity: 0;
        transform: scale(0.94) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ---------- 弹窗头部 ---------- */
.zx-notice-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px 16px 28px;
    border-bottom: 1px solid #F0EFED;
    flex-shrink: 0;
    position: relative;
}

.zx-notice-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.5px;
}

.zx-notice-modal__close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    border-radius: 50%;
    font-size: 12px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.zx-notice-modal__close-btn:hover {
    background: #e8dfd2;
    transform: rotate(90deg);
}

.zx-notice-modal__close-btn:active {
    transform: scale(0.90);
}

/* ---------- 弹窗内容（公告列表） ---------- */
.zx-notice-modal__body {
    padding: 16px 28px 28px 28px;
    overflow-y: auto;
    flex: 1;
    max-height: 80vh;
}
/* 滚动条美化 */
.zx-notice-modal__body::-webkit-scrollbar {
  width: 6px;
}
.zx-notice-modal__body::-webkit-scrollbar-track {
  background: #f5f0e8;
  border-radius: 10px;
}
.zx-notice-modal__body::-webkit-scrollbar-thumb {
  background: #d4c8b0;
  border-radius: 10px;
}
.zx-notice-modal__body::-webkit-scrollbar-thumb:hover {
  background: #c0b09a;
}



/* 每条公告 */
.zx-notice-modal__item {
    padding: 18px 0;
    border-bottom: 1px solid #F0EFED;
}

.zx-notice-modal__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.zx-notice-modal__item:first-child {
    padding-top: 0;
}

.zx-notice-modal__item-date {
    font-size: 12px;
    font-weight: 500;
    color: #bbb;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    column-gap: 8px;
    line-height: 1;
}
.zx-notice-modal__item-date::before{
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #6366F1;
}

.zx-notice-modal__item-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.zx-notice-modal__item-desc {
    font-size: 13px;
    color: #918C85;
    line-height: 1.7;
    word-break: break-word;
}

.hot-keywords .ss_tag_list .van-tag--primary.van-tag--plain{
    padding-top: 7px;
    padding-bottom: 7px;
}
.hot-keywords .van-search__field{
    height: 32px;
}
.hot-keywords .van-search{
    padding: 0;
}
.hot-keywords .van-search__content{
    background: #fff;
}
.hot-keywords .van-field__control{
    font-size: 1.2rem;
}

