/* ========================================
   AI Inked Image Lineart - WordPress 样式
   从 V2 版本迁移 - 2026-02-01
   ======================================== */

/* ========================================
   1. 容器隔离和基础样式
   ======================================== */

/* 主容器 - 隔离 WordPress 和主题样式影响 */
.aiinked-lineart-wrapper {
    font-family: 'Inter', sans-serif !important;
    line-height: 1.5 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: block !important;
    position: relative !important;
    width: 100% !important;
}

/* 重置可能的冲突 - 强制覆盖 Astra 主题 */
.aiinked-lineart-wrapper * {
    box-sizing: border-box !important;
}

/* 重置文本元素的字体，但保留图标字体 */
.aiinked-lineart-wrapper h1,
.aiinked-lineart-wrapper h2,
.aiinked-lineart-wrapper h3,
.aiinked-lineart-wrapper p,
.aiinked-lineart-wrapper div,
.aiinked-lineart-wrapper button,
.aiinked-lineart-wrapper input,
.aiinked-lineart-wrapper select,
.aiinked-lineart-wrapper textarea {
    font-family: 'Inter', sans-serif !important;
}

/* 保留 Material Icons 的字体 */
.aiinked-lineart-wrapper .material-icons-outlined {
    font-family: 'Material Icons Outlined' !important;
}

/* Body 基础样式 */
.aiinked-lineart-wrapper body,
.aiinked-lineart-wrapper .mode-initial,
.aiinked-lineart-wrapper .mode-result {
    font-family: 'Inter', sans-serif !important;
    transition: background-color 0.3s;
}

/* 确保所有文本元素正常显示 */
.aiinked-lineart-wrapper span:not(.material-icons-outlined) {
    font-family: 'Inter', sans-serif !important;
}

/* 自定义 Select 样式 */
.aiinked-lineart-wrapper select.custom-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ========================================
   2. 核心过渡动画：主卡片位移与缩放
   ======================================== */

#main-card {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   3. 状态 1：初始模式 (居中 Hero 布局)
   ======================================== */

.mode-initial #main-card {
    position: relative;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 56rem;
    padding: 1.25rem;
    border: 1.5px solid #000000 !important;
    /* 添加这一行 */
}

.mode-initial #prompt-input {
    font-size: 0.875rem;
    min-height: 80px;
}

.mode-initial #hero-title {
    display: block;
    opacity: 1;
}

.mode-initial #result-container {
    display: none !important;
    opacity: 0;
    margin: 0 !important;
    height: 0 !important;
    overflow: hidden;
}

/* ========================================
   4. 状态 2：生成后模式 (底部固定布局)
   ======================================== */

.mode-result #main-card {
    position: fixed;
    border: 1.5px solid #000000 !important;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 56rem;
    padding: 0.75rem;
    z-index: 50;
}

.mode-result #prompt-input {
    font-size: 0.75rem;
    max-height: 65px;
    height: auto;
    overflow-y: auto;
    line-height: 1.4;
    padding: 0.5rem;
}

/* 自定义滚动条样式 - 结果模式 */
.mode-result #prompt-input::-webkit-scrollbar {
    width: 4px;
}

.mode-result #prompt-input::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.mode-result #prompt-input::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.mode-result #prompt-input::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 缩略图在结果模式下缩小一半高度 */
.mode-result #thumb-main,
.mode-result #thumb-1,
.mode-result #thumb-2 {
    height: 40px !important;
    width: 40px !important;
    transition: all 0.3s ease;
}

/* 缩略图容器在结果模式下也调整高度 */
.mode-result #thumbnail-container {
    height: 48px !important;
}

.mode-result #hero-title {
    display: none;
}

.mode-result #result-container {
    display: flex;
    opacity: 1;
    animation: fadeInUp 0.5s ease forwards;
}

.mode-result body {
    padding-bottom: 130px;
}

/* ========================================
   5. 缩略图悬浮动画
   ======================================== */

.thumb-wrapper {
    transition: transform 0.3s ease;
}

.thumb-container:hover .thumb-wrapper {
    transform: scale(1.05);
}

.delete-btn {
    transition: all 0.3s ease;
    opacity: 0;
}

.thumb-container:hover .delete-btn {
    opacity: 1;
    transform: rotate(-3deg);
}

/* ========================================
   6. 动画定义
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   7. 滚动条样式
   ======================================== */

#prompt-input {
    scrollbar-width: thin;
    overflow-y: auto;
    max-height: 150px;
}

#prompt-input::-webkit-scrollbar {
    width: 6px;
}

#prompt-input::-webkit-scrollbar-track {
    background: transparent;
}

#prompt-input::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#prompt-input::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ========================================
   8. 主容器布局控制
   ======================================== */

main {
    transition: justify-content 0.3s ease;
}

.mode-initial main {
    justify-content: center;
}

.mode-result main {
    justify-content: flex-start;
    padding-top: 5vh;
    overflow-y: auto;
}

.mode-result #result-container {
    margin-bottom: 20px;
}

.mode-initial #result-container {
    margin-bottom: 0 !important;
}

/* ========================================
   9. Guides 弹窗样式
   ======================================== */

.instruction-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.instruction-modal.active {
    display: flex;
}

.aiinkedCLine-guide-container {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    color: white;
}

.aiinkedCLine-guide-header {
    padding: 1rem;
    border-bottom: 1px solid #3f3f46;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aiinkedCLine-guide-content {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

/* ========================================
   10. 计时器样式
   ======================================== */

.timer-container {
    position: absolute;
    top: calc(50% + 50px);
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #fff;
    z-index: 10;
    text-align: center;
}

/* ========================================
   10.5. 用户信息框样式（从 user-info-darkmode.js 注入）
   ======================================== */

/* 确保用户信息框的 Tailwind 类在容器内生效 */
.aiinked-lineart-wrapper .fixed {
    position: fixed !important;
}

.aiinked-lineart-wrapper .top-6 {
    top: 1.5rem !important;
}

.aiinked-lineart-wrapper .right-6 {
    right: 1.5rem !important;
}

.aiinked-lineart-wrapper .z-50 {
    z-index: 50 !important;
}

.aiinked-lineart-wrapper .gap-4 {
    gap: 1rem !important;
}

.aiinked-lineart-wrapper .w-8 {
    width: 2rem !important;
}

.aiinked-lineart-wrapper .h-8 {
    height: 2rem !important;
}

.aiinked-lineart-wrapper .w-10 {
    width: 2.5rem !important;
}

.aiinked-lineart-wrapper .h-10 {
    height: 2.5rem !important;
}

.aiinked-lineart-wrapper .w-4 {
    width: 1rem !important;
}

.aiinked-lineart-wrapper .h-4 {
    height: 1rem !important;
}

.aiinked-lineart-wrapper .text-xs {
    font-size: 0.75rem !important;
    line-height: 1rem !important;
}

.aiinked-lineart-wrapper .text-sm {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
}

.aiinked-lineart-wrapper .rounded-2xl {
    border-radius: 1rem !important;
}

.aiinked-lineart-wrapper .space-y-3>*+* {
    margin-top: 0.75rem !important;
}

.aiinked-lineart-wrapper .h-1\.5 {
    height: 0.375rem !important;
}

.aiinked-lineart-wrapper .bg-blue-100 {
    background-color: #dbeafe !important;
}

.aiinked-lineart-wrapper .bg-blue-500 {
    background-color: #3b82f6 !important;
}

.aiinked-lineart-wrapper .bg-blue-600 {
    background-color: #2563eb !important;
}

.aiinked-lineart-wrapper .hover\:bg-blue-700:hover {
    background-color: #1d4ed8 !important;
}

.aiinked-lineart-wrapper .text-blue-600 {
    color: #2563eb !important;
}

.aiinked-lineart-wrapper .text-blue-400 {
    color: #60a5fa !important;
}

.aiinked-lineart-wrapper .dark\:bg-blue-900\/30:is(.dark *) {
    background-color: rgba(30, 58, 138, 0.3) !important;
}

.aiinked-lineart-wrapper .dark\:text-blue-400:is(.dark *) {
    color: #60a5fa !important;
}

.aiinked-lineart-wrapper .decoration-none {
    text-decoration: none !important;
}

/* ========================================
   11. Tailwind 工具类 - 手动实现常用类
   ======================================== */

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-start {
    justify-content: flex-start;
}

.flex-grow {
    flex-grow: 1;
}

.shrink-0 {
    flex-shrink: 0;
}

/* Spacing */
.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.p-0 {
    padding: 0;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.pt-3 {
    padding-top: 0.75rem;
}

.pr-1\.5 {
    padding-right: 0.375rem;
}

.pl-2 {
    padding-left: 0.5rem;
}

.pl-8 {
    padding-left: 2rem;
}

.pr-7 {
    padding-right: 1.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-20 {
    margin-top: 5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.ml-auto {
    margin-left: auto;
}

/* Sizing */
.w-full {
    width: 100%;
}

.w-12 {
    width: 3rem;
}

.w-20 {
    width: 5rem;
}

.h-12 {
    height: 3rem;
}

.h-20 {
    height: 5rem;
}

.h-24 {
    height: 6rem;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.max-w-56rem {
    max-width: 56rem;
}

/* Positioning */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.top-0 {
    top: 0;
}

.bottom-0 {
    bottom: 0;
}

.-top-2 {
    top: -0.5rem;
}

.-right-2 {
    right: -0.5rem;
}

.-right-16 {
    right: -4rem;
}

/* Display */
.hidden {
    display: none;
}

.block {
    display: block;
}

/* Colors - Light Mode */
.bg-white {
    background-color: #ffffff;
}

.bg-slate-50 {
    background-color: #f8fafc;
}

.bg-slate-100 {
    background-color: #f1f5f9;
}

.bg-slate-200 {
    background-color: #e2e8f0;
}

.bg-red-500 {
    background-color: #ef4444;
}

.bg-red-600 {
    background-color: #dc2626;
}

.text-white {
    color: #ffffff;
}

.text-slate-300 {
    color: #cbd5e1;
}

.text-slate-400 {
    color: #94a3b8;
}

.text-slate-500 {
    color: #64748b;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-900 {
    color: #0f172a;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.border-slate-100 {
    border-color: #f1f5f9;
}

.border-slate-200 {
    border-color: #e2e8f0;
}

.border-zinc-700 {
    border-color: #3f3f46;
}

.border-zinc-800 {
    border-color: #27272a;
}

/* Dark Mode Colors */
.dark\:bg-zinc-700:is(.dark *) {
    background-color: #3f3f46;
}

.dark\:bg-zinc-800:is(.dark *) {
    background-color: #27272a;
}

.dark\:bg-zinc-900:is(.dark *) {
    background-color: #18181b;
}

.dark\:text-white:is(.dark *) {
    color: #ffffff;
}

.dark\:text-slate-100:is(.dark *) {
    color: #f1f5f9;
}

.dark\:text-slate-200:is(.dark *) {
    color: #e2e8f0;
}

.dark\:text-slate-300:is(.dark *) {
    color: #cbd5e1;
}

.dark\:border-zinc-700:is(.dark *) {
    border-color: #3f3f46;
}

.dark\:border-zinc-800:is(.dark *) {
    border-color: #27272a;
}

/* Borders */
.border {
    border-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-none {
    border: none;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-\[1\.5rem\] {
    border-radius: 1.5rem;
}

.rounded-\[2rem\] {
    border-radius: 2rem;
}

/* Shadows */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Typography */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-\[10px\] {
    font-size: 10px;
}

.text-\[12px\] {
    font-size: 12px;
}

.text-\[13px\] {
    font-size: 13px;
}

.text-\[14px\] {
    font-size: 14px;
}

.text-\[16px\] {
    font-size: 16px;
}

.text-\[18px\] {
    font-size: 18px;
}

.text-\[20px\] {
    font-size: 20px;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

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

.leading-snug {
    line-height: 1.375;
}

/* Opacity */
.opacity-0 {
    opacity: 0;
}

.opacity-1 {
    opacity: 1;
}

.opacity-75 {
    opacity: 0.75;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.overflow-visible {
    overflow: visible;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* Resize */
.resize-none {
    resize: none;
}

/* Focus */
.focus\:ring-0:focus {
    box-shadow: none;
}

.focus\:outline-none:focus {
    outline: none;
}

.focus\:border-blue-500:focus {
    border-color: #3b82f6;
}

/* Hover States */
.hover\:bg-slate-50:hover {
    background-color: #f8fafc;
}

.hover\:bg-slate-100:hover {
    background-color: #f1f5f9;
}

.hover\:bg-slate-200:hover {
    background-color: #e2e8f0;
}

.hover\:bg-red-600:hover {
    background-color: #dc2626;
}

.hover\:bg-zinc-800:hover {
    background-color: #27272a;
}

.hover\:text-gray-300:hover {
    color: #d1d5db;
}

.hover\:text-slate-700:hover {
    color: #334155;
}

.hover\:scale-110:hover {
    transform: scale(1.1);
}

.dark\:hover\:bg-zinc-700:hover:is(.dark *) {
    background-color: #3f3f46;
}

.dark\:hover\:bg-zinc-800:hover:is(.dark *) {
    background-color: #27272a;
}

.dark\:hover\:text-slate-200:hover:is(.dark *) {
    color: #e2e8f0;
}

/* Active States */
.active\:bg-slate-200:active {
    background-color: #e2e8f0;
}

.active\:scale-90:active {
    transform: scale(0.9);
}

.active\:scale-95:active {
    transform: scale(0.95);
}

.dark\:active\:bg-zinc-700:active:is(.dark *) {
    background-color: #3f3f46;
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-500 {
    transition-duration: 500ms;
}

/* Z-index */
.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

.z-1000 {
    z-index: 1000;
}

/* Pointer Events */
.pointer-events-none {
    pointer-events: none;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Object Fit */
.object-cover {
    object-fit: cover;
}

/* List Style */
.list-decimal {
    list-style-type: decimal;
}

.list-inside {
    list-style-position: inside;
}

/* Space */
.space-y-4>*+* {
    margin-top: 1rem;
}

/* Group Hover */
.group:hover .group-hover\:text-slate-700 {
    color: #334155;
}

.dark .group:hover .dark\:group-hover\:text-slate-200 {
    color: #e2e8f0;
}

/* Background Transparent */
.bg-transparent {
    background-color: transparent;
}

/* Placeholder */
.placeholder-slate-300::placeholder {
    color: #cbd5e1;
}

.dark\:placeholder-zinc-600:is(.dark *)::placeholder {
    color: #52525b;
}

/* ========================================
   12. 响应式设计 - 移动端适配
   ======================================== */

@media (min-width: 768px) {
    .md\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    .md\:rounded-\[2rem\] {
        border-radius: 2rem;
    }

    .md\:w-\[490px\] {
        width: 490px;
    }

    .md\:h-\[490px\] {
        height: 490px;
    }
}

/* 平板端优化 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    /* 缩小工具栏元素的宽度和外边距，以防止溢出 */
    .aiinked-lineart-wrapper .w-\[140px\] { width: 120px !important; }
    .aiinked-lineart-wrapper .w-\[160px\] { width: 135px !important; }
    .aiinked-lineart-wrapper .w-\[110px\] { width: 95px !important; }
    .aiinked-lineart-wrapper .w-\[90px\] { width: 80px !important; }
    .aiinked-lineart-wrapper .w-\[135px\] { width: 125px !important; }
    
    .aiinked-lineart-wrapper .mr-2 { margin-right: 0.25rem !important; }
    
    /* 缩小下拉框内边距和字号 */
    .aiinked-lineart-wrapper select.custom-select { 
        padding-left: 1.5rem !important; 
        padding-right: 1.25rem !important; 
        font-size: 11px !important; 
    }
    
    .aiinked-lineart-wrapper .pt-3 .material-icons-outlined { 
        font-size: 14px !important; 
    }
}

/* 手机端优化 (< 768px) */
@media (max-width: 767px) {
    /* 模式 2：生成后的卡片吸底，取消底部圆角，占满宽度 */
    .mode-result #main-card {
        width: 100% !important;
        max-width: 100% !important;
        bottom: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        padding: 0.75rem 1rem 1.5rem 1rem !important; /* 底部多留出安全区 */
    }

    /* 模式 1：初始卡片留边距 */
    .mode-initial #main-card {
        width: 95% !important;
        padding: 1rem !important;
        border-radius: 1.25rem !important;
    }

    /* 结果图片适应屏幕，保持方形 */
    #result-container img {
        width: 100% !important;
        max-width: 350px !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }

    /* 隐藏不需要的占位元素 */
    .aiinked-lineart-wrapper .flex-grow {
        display: none !important;
    }

    /* 工具栏 (Toolbar) 核心重构：多行流式布局 */
    .aiinked-lineart-wrapper .pt-3.flex.items-center {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: space-between !important;
    }

    /* 1. 上传图片按钮 */
    .aiinked-lineart-wrapper #upload-image,
    .aiinked-lineart-wrapper #upload-trigger {
        flex: 0 0 auto !important;
        max-width: 88px !important;
        margin-right: 0 !important;
        height: 38px !important;
    }

    /* 2. Lora 选择框（如果有）占据第一行剩余空间 */
    .aiinked-lineart-wrapper #lora-model-container {
        flex: 1 1 calc(100% - 96px) !important;
        width: auto !important;
        margin-right: 0 !important;
        height: 38px !important;
    }

    /* 3. 其它选择框：双列并排显示 */
    .aiinked-lineart-wrapper .w-\[160px\],
    .aiinked-lineart-wrapper .w-\[110px\],
    .aiinked-lineart-wrapper .w-\[90px\] {
        flex: 1 1 calc(50% - 0.25rem) !important;
        width: auto !important;
        margin-right: 0 !important;
        height: 38px !important;
    }

    /* 微调下拉框字体和内边距防止溢出 */
    .aiinked-lineart-wrapper select.custom-select {
        padding-left: 1.75rem !important;
        padding-right: 1.25rem !important;
        font-size: 12px !important;
    }

    .aiinked-lineart-wrapper .pt-3 .material-icons-outlined {
        font-size: 16px !important;
    }

    /* 4. 生成按钮：占满整行，增加高度便于触摸 */
    .aiinked-lineart-wrapper #generate-btn {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-top: 0.25rem !important;
        height: 44px !important;
    }
    
    #generate-btn span {
        font-size: 14px !important;
    }

    /* 提示词输入框在不同模式下的微调 */
    .mode-initial #prompt-input {
        min-height: 60px !important;
        font-size: 14px !important;
    }
    
    .mode-result #prompt-input {
        max-height: 50px !important;
        font-size: 13px !important;
    }

    /* 缩略图容器间距微调 */
    .aiinked-lineart-wrapper #thumbnail-container {
        gap: 0.5rem !important;
    }

    .aiinkedCLine-guide-container {
        width: 95%;
    }
}

/* ========================================
   13. 特殊尺寸类
   ======================================== */

.w-\[400px\] {
    width: 400px;
}

.h-\[400px\] {
    height: 400px;
}

.w-\[490px\] {
    width: 490px;
}

.h-\[490px\] {
    height: 490px;
}

.w-\[135px\] {
    width: 135px;
}

.w-\[140px\] {
    width: 140px;
}

.w-\[160px\] {
    width: 160px;
}

.h-\[35px\] {
    height: 35px;
}

.w-95\% {
    width: 95%;
}

/* ========================================
   14. Material Icons 图标对齐
   ======================================== */

.material-icons-outlined {
    font-family: 'Material Icons Outlined' !important;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 确保图标字体正确加载 */
.aiinked-lineart-wrapper .material-icons-outlined {
    font-family: 'Material Icons Outlined' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   15. 优先级提升 - 覆盖 WordPress/主题样式
   ======================================== */

/* 确保插件样式优先级高于主题 */
.aiinked-lineart-wrapper #main-card {
    background-color: #ffffff !important;
}

.dark .aiinked-lineart-wrapper #main-card {
    background-color: #18181b !important;
}

.aiinked-lineart-wrapper #prompt-input {
    border: none !important;
    outline: none !important;
}

.aiinked-lineart-wrapper button {
    cursor: pointer !important;
}

/* ========================================
   16. 修复可能的主题冲突
   ======================================== */

/* 重置 Astra 主题可能的影响 */
.aiinked-lineart-wrapper a {
    text-decoration: none !important;
    color: inherit !important;
}

.aiinked-lineart-wrapper button,
.aiinked-lineart-wrapper input,
.aiinked-lineart-wrapper select,
.aiinked-lineart-wrapper textarea {
    font-family: inherit !important;
    line-height: inherit !important;
}

.aiinked-lineart-wrapper img {
    max-width: 100%;
    height: auto;
}

/* 确保 flexbox 正常工作 */
.aiinked-lineart-wrapper .flex {
    display: flex !important;
}

/* 强制覆盖 Astra 主题的容器宽度限制 */
.aiinked-lineart-wrapper main {
    max-width: none !important;
    width: 100% !important;
}

/* 重置 Astra 主题的标题样式 */
.aiinked-lineart-wrapper h1,
.aiinked-lineart-wrapper h2,
.aiinked-lineart-wrapper h3 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit !important;
}

/* ========================================
   17. Generate 按钮样式优化 - 防止文本换行和溢出
   ======================================== */

#generate-btn {
    white-space: nowrap !important;
    min-width: 160px !important;
    width: auto !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    /* 防止内容溢出按钮边界 */
}

#generate-btn span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    /* 超长文本显示省略号 */
}

/* 缩小按钮内文字和图标尺寸，防止拥挤 */
#generate-btn .material-icons-outlined {
    font-size: 16px !important;
    /* 图标从 18px 缩小到 16px */
}

#generate-btn #generate-btn-text {
    font-size: 12px !important;
    /* 主文本从 13px 缩小到 12px */
}

#generate-btn #credits-deduct {
    font-size: 9px !important;
    /* 积分提示从 10px 缩小到 9px */
}

/* ========================================
   18. 用户信息框样式 - 确保在所有页面正确显示
   ======================================== */

/* 用户信息框容器 - 字体设置，定位由 user-info-darkmode.js 统一控制 */
.aiinked-user-header-container {
    font-family: 'Inter', sans-serif !important;
}

/* 确保用户信息框的所有子元素使用正确的字体 */
#aiinkedUserInfoBox,
#aiinkedUserInfoBox *,
#aiinkedUserDetailPopup,
#aiinkedUserDetailPopup *,
#aiinkedSignInBtn {
    font-family: 'Inter', sans-serif !important;
}


/****  修改边框颜色***/

/* 修改输入框边框：黑色，0.6 透明度 */
.aiinked-lineart-wrapper #prompt-input {
    /* 使用 rgba 设置黑色 (0,0,0) 且透明度为 0.6 */
    border: 1.5px solid rgba(0, 0, 0, 0.6) !important;

    /* 建议微调以下属性，让输入框看起来更精致 */
    border-radius: 0.75rem !important;
    /* 圆角稍微调小一点，与外框区分 */
    background-color: rgba(255, 255, 255, 0.8) !important;
    /* 背景也可以带一点点透明 */
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
}

/* 焦点状态：当用户点击输入时，边框可以变实，提升交互感 */
.aiinked-lineart-wrapper #prompt-input:focus {
    border-color: rgba(0, 0, 0, 1) !important;
    /* 聚焦时变为纯黑 */
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) !important;
    /* 淡淡的呼吸灯效果 */
}

/****  修改与顶部间距***/
/* --- 仅针对 Hero 模式（初始状态）的安全修改 --- */

/* 1. 调整容器：只在 mode-initial 下靠顶对齐 */
.aiinked-lineart-wrapper.mode-initial main {
    justify-content: flex-start !important;
    padding-top: 5vh !important;
    /* 使用 vh (屏幕高度百分比) 比 px 更灵活 */
}

/* 2. 调整标题：控制标题离顶部的距离 */
.mode-initial #hero-title {
    margin-top: 2rem !important;
    margin-bottom: 1.5rem !important;
}

/* 3. 调整卡片：确保在初始模式下没有被强制居中或带多余边距 */
.mode-initial #main-card {
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
}

/* --- 强制重置卡片内按钮的颜色 --- */

/* 1. UPLOAD IMAGE / 选择文件按钮 */
.aiinked-lineart-wrapper #upload-trigger,
.aiinked-lineart-wrapper .upload-btn {
    background-color: #000000 !important;
    /* 背景设为黑色 */
    color: #ffffff !important;
    /* 文字设为白色 */
    border: none !important;
    transition: all 0.3s ease !important;
}

/* 2. GENERATE 按钮 */
.aiinked-lineart-wrapper #generate-btn {
    background-color: #000000 !important;
    /* 假设你想要蓝色，可改为 #000000 */
    color: #ffffff !important;
    border-radius: 0.75rem !important;
    border: none !important;
}

/* 3. 按钮悬停状态 (Hover) - 避免 Astra 变色 */
.aiinked-lineart-wrapper #upload-trigger:hover,
.aiinked-lineart-wrapper #generate-btn:hover {
    background-color: #333333 !important;
    /* 悬停时稍微变浅一点的黑 */
    opacity: 0.9 !important;
    color: #ffffff !important;
}

/* 4. 针对下拉菜单 (Select) 的按钮化外观重置 */
.aiinked-lineart-wrapper select {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #000000 !important;
}

/* --- 彻底强制重置 UPLOAD IMAGE 按钮 --- */

/* 1. 针对 ID 的精准打击，增加外层容器权重 */
.aiinked-lineart-wrapper #upload-image,
.aiinked-lineart-wrapper #upload-trigger {
    background-color: #000000 !important;
    /* 强制背景为黑色 */
    color: #ffffff !important;
    /* 强制文字为白色 */
    border: 2px solid #000000 !important;
    /* 强制边框 */
    border-radius: 0.75rem !important;
    /* 强制圆角 */
    padding: 10px 20px !important;
    /* 强制内边距 */
    display: flex !important;
    /* 确保它是弹性布局以居中文字 */
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: none !important;
    /* 去掉 Astra 可能带的阴影 */
    text-transform: none !important;
    /* 防止全大写 */
    opacity: 1 !important;
    /* 防止半透明 */
    visibility: visible !important;
}

/* 设置按钮最大宽度并处理溢出 */
.aiinked-lineart-wrapper #upload-image {
    max-width: 88px !important;
    width: 100%;
    /* 允许按钮在 88px 范围内自适应 */
    white-space: nowrap;
    /* 强制文字不换行 */
    overflow: hidden;
    /* 隐藏超出部分 */
    text-overflow: ellipsis;
    /* 超出部分显示省略号 (...) */
    display: inline-flex;
    /* 确保图标和文字能正常排列 */
    justify-content: center;
    align-items: center;
}

.aiinked-lineart-wrapper #upload-image *,
.aiinked-lineart-wrapper #upload-trigger * {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* 悬停效果 */
.aiinked-lineart-wrapper #upload-image:hover,
.aiinked-lineart-wrapper #upload-trigger:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

/* ========================================
   END OF FILE
   ======================================== */