
/* 夜间主题 */
.theme-dark {
    --bg-html: #161615;
    --bg-body: #240808;
    --bg-secondary: #110e0e;
    --bg-card: #110f0f;
    --bg-disabled: #0f0f0f;
    --text-primary: #e8eaed;
    --text-secondary: #b1b1b1;
    --border-color: #1a1e25;
    --shadow-color: rgba(0, 0, 0, 0.6);
    --active-bg: #334269;
    --active-color: #303131;
    --active-border: #60a5fa;
    --side-menu-hover: #4671d6;
    --side-menu-hover-background: #1d1d1d;
}

/* 日间主题 */
.theme-light {
    --bg-html: #fcfafa;
    --bg-body: #e6ecf1;
    --bg-secondary: #e6ecf1;
    --bg-card: #ffffff;
    --bg-disabled: #f3f4f6;
    --text-primary: #15181f;
    --text-secondary: #282e36;
    --border-color: #414242;
    --shadow-color: rgba(85, 85, 85, 0.1);
    --active-bg: #6a6b6d;
    --active-color: #1d1d1d;
    --active-border: #22458f;
    --side-menu-hover: #4671d6;
    --side-menu-hover-background: #eae9f0a8;
}

* {
    touch-action: manipulation;
}

/*
body {
    background-color: var(--bg-body) !important;
    color: var(--text-primary);
}

.theme-dark body {
    background: radial-gradient(125% 125% at 50% 100%, #000000 40%, #010133 100%);
    color: var(--text-primary);
}
*/

html.theme-light {
    color: var(--text-primary);
    background-color: var(--bg-html);
}

html.theme-dark {
    color: var(--text-primary);
    background-color: var(--bg-html);
}

body.theme-light {
    width: 100%;
    position: relative;
    background-color: var(--bg-html);
    background-image: radial-gradient(circle at top left,rgba(56, 193, 182, 0.5),transparent 1px);
    image-rendering: pixelated;
}

body.theme-dark {
    width: 100%;
    position: relative;
    background-color: var(--bg-html);
    background-image:
    radial-gradient(circle at 25% 25%, #222222 0.5px, transparent 1px),
    radial-gradient(circle at 75% 75%, #111111 0.5px, transparent 1px);
    image-rendering: pixelated;
}


/* 导航栏主题适配 */
.theme-dark .topbar {
    background: var(--bg-card) !important;
    border-bottom-color: var(--border-color) !important;
}

.theme-dark .topbar-left {
    background: var(--bg-card) !important;
}

.theme-dark .button-menu-mobile {
    background: transparent !important;
}

.theme-dark .button-menu-mobile:hover {
    background: transparent !important;
}

.theme-dark .button-menu-mobile i {
    color: var(--text-primary) !important;
}

/* 侧边栏主题适配 */
.theme-dark .left {
    background: var(--bg-card) !important;
    border-right-color: var(--border-color) !important;
}

.theme-dark #side-menu > li > a {
    color: var(--text-secondary) !important;
}

#side-menu > li > a:hover {
    background: var(--side-menu-hover-background) !important;
}

.theme-dark #side-menu > li > a:hover {
    background: var(--side-menu-hover-background) !important;
    color: var(--side-menu-hover) !important;
}

.theme-dark .theme-toggle {
    background: transparent !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* 按钮主题适配 */
.theme-dark .btn {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.theme-dark .btn-sm {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .btn-sm:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* 主题按钮图标颜色 */
.theme-dark #themeIcon {
    color: var(--text-primary) !important;
}

/* 语言切换按钮图标颜色 */
.theme-dark .ri-translate-2 {
    color: var(--text-primary) !important;
}

/* 卡片主题适配 */
.theme-dark .bg-white {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary);
}

.theme-dark .text-gray-800 {
    color: var(--text-primary) !important;
}

.theme-dark .text-gray-900 {
    color: var(--text-primary) !important;
}

.theme-dark .text-gray-600 {
    color: var(--text-secondary) !important;
}

.theme-dark .text-gray-500 {
    color: var(--text-secondary) !important;
}

.theme-dark .text-gray-700 {
    color: var(--text-primary) !important;
}

.theme-dark .text-gray-300 {
    color: var(--text-secondary) !important;
}

.theme-dark .text-gray-400 {
    color: var(--text-secondary) !important;
}

.theme-dark .text-gray-200 {
    color: var(--text-primary) !important;
}

.theme-dark .border-gray-200 {
    border-color: var(--border-color) !important;
}

.theme-dark .border-gray-300 {
    border-color: var(--border-color) !important;
}

.theme-dark .border-gray-700 {
    border-color: var(--border-color) !important;
}

.theme-dark .border-gray-100 {
    border-color: var(--border-color) !important;
}

.theme-dark .border-t-gray-200 {
    border-top-color: var(--border-color) !important;
}

.theme-dark .bg-gray-50 {
    background-color: var(--bg-secondary) !important;
}

/* 仪表板主题适配 */
.theme-dark .dashboard {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* 特殊颜色适配 */
.theme-dark .bg-yellow-50 {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border-color: rgba(255, 193, 7, 0.3) !important;
}

.theme-dark .text-yellow-800 {
    color: rgba(255, 193, 7, 0.9) !important;
}

.theme-dark .text-yellow-600 {
    color: rgba(255, 193, 7, 0.8) !important;
}

.theme-dark .text-yellow-400 {
    color: rgba(255, 193, 7, 0.7) !important;
}

.theme-dark .text-yellow-200 {
    color: rgba(255, 193, 7, 0.6) !important;
}

.theme-dark .border-yellow-200 {
    border-color: rgba(255, 193, 7, 0.3) !important;
}

.theme-dark .border-yellow-800 {
    border-color: rgba(255, 193, 7, 0.5) !important;
}

.theme-dark .bg-blue-600:hover {
    background-color: #2563eb !important;
}

.theme-dark .border-blue-600:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

.theme-dark .text-blue-600 {
    color: #60a5fa !important;
}
.theme-dark .text-blue-400:hover {
    color: #59a2fa !important;
}

.theme-dark .border-blue-400 {
    border-color: #60a5fa !important;
}

.theme-dark .text-blue-400 {
    color: #60a5fa !important;
}

.theme-dark .text-green-600 {
    color: #4ade80 !important;
}

.theme-dark .text-green-400 {
    color: #4ade80 !important;
}

.theme-dark .text-red-600 {
    color: #f87171 !important;
}

.theme-dark .text-red-400 {
    color: #f87171 !important;
}

/* 图表区域主题适配 */
.theme-dark .absolute.inset-0.bg-white\/100 {
    background-color: var(--bg-card) !important;
}

.theme-dark .border-gray-200 {
    border-color: var(--border-color) !important;
}

.theme-dark .border-t-\[\#4e54c8\] {
    border-top-color: #8f94fb !important;
}

/* 表格行悬停效果 */
table tbody tr:hover {
    background-color: var(--side-menu-hover-background) !important;
}

.theme-dark table tbody tr:hover {
    background-color: var(--side-menu-hover-background) !important;
}

/* 注册页面主题适配 */
.theme-dark .bg-gray-100 {
    background-color: #1e293b !important;
    border-color: var(--border-color) !important;
}

.theme-dark .bg-gray-200 {
    background-color: #334155 !important;
    border-color: var(--border-color) !important;
}

.theme-dark .bg-indigo-100 {
    background-color: #1e1b4b !important;
}

.theme-dark .placeholder-gray-500::placeholder {
    color: var(--text-secondary) !important;
}

.theme-dark .focus\:bg-white:focus {
    background-color: #1e293b !important;
}

.theme-dark .focus\:border-gray-400:focus {
    border-color: var(--active-border) !important;
}

.theme-dark .hover\:bg-indigo-700:hover {
    background-color: #3730a3 !important;
}

.theme-dark .hover\:text-gray-700:hover {
    color: var(--text-primary) !important;
}

.theme-dark .hover\:bg-gray-50:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.theme-dark .hover\:text-gray-600:hover {
    color: var(--text-primary) !important;
}

.theme-dark .text-gray-600 {
    color: var(--text-secondary) !important;
}

.theme-dark .text-gray-400 {
    color: var(--text-secondary) !important;
}

.theme-dark .bg-gray-200 {
    background-color: #334155 !important;
}

.theme-dark .bg-gray-300 {
    background-color: #475569 !important;
}

.theme-dark .shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.6), 0 1px 2px 0 rgba(0, 0, 0, 0.6) !important;
}

.theme-dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.6) !important;
}

.theme-dark .sm\:rounded-lg {
    border-radius: 0.5rem !important;
}

.theme-dark .bg-indigo-500 {
    background-color: #4f46e5 !important;
}

.theme-dark .text-gray-100 {
    color: #f1f5f9 !important;
}

.theme-dark .text-red-500 {
    color: #f87171 !important;
}

.theme-dark .bg-gray-200 {
    background-color: #334155 !important;
}

.theme-dark .cursor-not-allowed {
    cursor: not-allowed !important;
}

.theme-dark input::placeholder {
    color: var(--text-secondary) !important;
}

.theme-dark input {
    color: var(--text-primary) !important;
}

.theme-dark .text-indigo-500 {
    color: #6366f1 !important;
}

.theme-dark .text-indigo-500:hover {
    color: #818cf8 !important;
}

/* 加载动画样式 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 在菜单状态未应用时禁用过渡动画，防止页面加载时的布局动画 */
body:not(.menu-state-applied) .left,
body:not(.menu-state-applied) #remove-scroll,
body:not(.menu-state-applied) .menu-text,
body:not(.menu-state-applied) .menu-title,
body:not(.menu-state-applied) #sidebar-menu li i,
body:not(.menu-state-applied) #sidebar-menu li a,
body.menu-state-applied:not(.menu-transition-active) .left,
body.menu-state-applied:not(.menu-transition-active) #remove-scroll,
body.menu-state-applied:not(.menu-transition-active) .menu-text,
body.menu-state-applied:not(.menu-transition-active) .menu-title,
body.menu-state-applied:not(.menu-transition-active) #sidebar-menu li i,
body.menu-state-applied:not(.menu-transition-active) #sidebar-menu li a {
    transition: none !important;
}

/* 仅当用户主动切换菜单时才启用过渡动画 */
body.menu-transition-active .left,
body.menu-transition-active #remove-scroll,
body.menu-transition-active .menu-text,
body.menu-transition-active .menu-title,
body.menu-transition-active #sidebar-menu li i,
body.menu-transition-active #sidebar-menu li a {
    transition: all 0.5s ease !important;
}

/* 菜单状态样式 */
.menu-collapsed .menu-text {
    display: none !important;
}

.menu-collapsed #side-menu > li > a {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.menu-collapsed #side-menu .menu-title {
    display: none !important;
}

body:not(.menu-collapsed) #side-menu .menu-title {
    display: block !important;
}

#sidebarTooltip {
    background-color: rgba(31, 41, 55, 0.95);
    color: #f9fafb;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-width: 200px;
    word-wrap: break-word;
}

.theme-dark #sidebarTooltip {
    background-color: rgba(55, 65, 81, 0.95);
    color: #f3f4f6;
}

/* 支付方式主题适配 */
div.payment-method {
    background-color: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease;
    display: block !important;
    width: 100% !important;
    border-style: solid !important;
    border-width: 2px !important;
}

div.payment-method:hover:not(.disabled) {
    border-color: #3b82f6 !important;
}

div.payment-method.selected:not(.disabled) {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
}

/* 夜间主题下的支付方式样式 */
.theme-dark div.payment-method {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    border-style: solid !important;
    border-width: 2px !important;
}

.theme-dark div.payment-method:hover:not(.disabled) {
    border-color: #3b82f6 !important;
}

.theme-dark div.payment-method.selected:not(.disabled) {
    border-color: #3b82f6 !important;
    background-color: #1e3a8a !important;
}

/* 禁用状态的支付方式样式 - 点击时无任何变化 */
div.payment-method.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background-color: var(--bg-disabled) !important;
}

div.payment-method.disabled:hover {
    border-color: #e5e7eb !important;
    background-color: var(--bg-disabled) !important;
    border-style: solid !important;
    border-width: 2px !important;
}

.theme-dark div.payment-method.disabled:hover {
    border-color: #374151 !important;
    background-color: var(--bg-disabled) !important;
    border-style: solid !important;
    border-width: 2px !important;
}

div.payment-method.disabled.selected {
    border-color: #e5e7eb !important;
    background-color: var(--bg-disabled) !important;
    border-style: solid !important;
    border-width: 2px !important;
}

.theme-dark div.payment-method.disabled.selected {
    border-color: #374151 !important;
    background-color: var(--bg-disabled) !important;
    border-style: solid !important;
    border-width: 2px !important;
}

.theme-dark div.payment-method.disabled.selected {
    border-color: #374151 !important;
    background-color: #1f2937 !important;
    border-style: solid !important;
    border-width: 2px !important;
}


.side-menu::-webkit-scrollbar {
    width: 6px;
}

.side-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.side-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dark .side-menu::-webkit-scrollbar-track {
    background: #4b5563;
}

.dark .side-menu::-webkit-scrollbar-thumb {
    background: #1f2937;
}

.menu-collapsed .group:hover .menu-collapsed-tooltip {
    opacity: 1;
}

.menu-collapsed .menu-title {
    display: none;
}

.left {
    overflow-x: hidden;
}

.left #remove-scroll {
    overflow-x: hidden;
}

@media (max-width: 1024px) {
    .left {
        transform: translateX(-100%);
    }
    
    .menu-open .left {
        transform: translateX(0);
    }
    
    .menu-open .left {
        width: 14rem;
    }
}

@media (min-width: 1025px) {
    .left {
        transform: translateX(0);
    }
    
    .menu-collapsed .left {
        width: 5rem;
    }
}

.theme-dark .border-t-gray-900 {
    border-top-color: #9d9fa1 !important;
}

.theme-dark .border-b-gray-900 {
    border-bottom-color: #9d9fa1 !important;
}

.mingcute--trade-line {
    display: inline-block;
    width: 20px;
    height: 20px;
    transform: translateX(-3px);
    --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'%3E%3Cpath d='M520.533333 878.933333h-12.8c-8.533333 0-17.066667-4.266667-29.866666-12.8L226.133333 725.333333c-12.8-8.533333-21.333333-12.8-25.6-21.333333-8.533333-8.533333-12.8-17.066667-12.8-25.6-4.266667-8.533333-4.266667-21.333333-4.266666-34.133333V366.933333c0-12.8 0-21.333333 4.266666-34.133333l12.8-25.6c4.266667-4.266667 12.8-8.533333 25.6-17.066667l251.733334-140.8c12.8-4.266667 17.066667-8.533333 29.866666-12.8h25.6c8.533333 0 17.066667 4.266667 29.866667 12.8l251.733333 140.8c12.8 8.533333 21.333333 12.8 25.6 21.333334 8.533333 8.533333 12.8 17.066667 12.8 25.6 4.266667 8.533333 4.266667 21.333333 4.266667 34.133333v277.333333c0 12.8 0 21.333333-4.266667 34.133334l-12.8 25.6c-8.533333 8.533333-17.066667 12.8-25.6 17.066666l-251.733333 140.8c-12.8 8.533333-21.333333 8.533333-29.866667 12.8h-12.8zM247.466667 392.533333v264.533334s4.266667 0 8.533333 4.266666l230.4 128v-264.533333L247.466667 392.533333z m307.2 136.533334v264.533333l230.4-128c4.266667-4.266667 8.533333-4.266667 12.8-8.533333V392.533333L554.666667 529.066667zM281.6 337.066667l238.933333 132.266666 238.933334-132.266666-226.133334-128c-4.266667-4.266667-8.533333-4.266667-12.8-4.266667 0 0-4.266667 4.266667-8.533333 4.266667l-230.4 128z'/%3E%3Cpath d='M661.333333 439.466667c-4.266667 0-12.8 0-17.066666-4.266667L366.933333 285.866667c-17.066667-8.533333-21.333333-29.866667-12.8-46.933334s29.866667-21.333333 46.933334-12.8l277.333333 149.333334c17.066667 8.533333 21.333333 29.866667 12.8 46.933333-4.266667 8.533333-17.066667 17.066667-29.866667 17.066667z'/%3E%3C/svg%3E");
    background-color: currentColor;
    -webkit-mask-image: var(--svg);
    mask-image: var(--svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.mingcute--tether-usdt-line {
  display: inline-block;
  width: 20px;
  height: 20px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z'/%3E%3Cpath fill='%23000' d='M17.42 3a2 2 0 0 1 1.649.868l.087.14L22.49 9.84a2 2 0 0 1-.208 2.283l-.114.123l-9.283 9.283a1.25 1.25 0 0 1-1.666.091l-.102-.09l-9.283-9.284a2 2 0 0 1-.4-2.257l.078-.15l3.333-5.832a2 2 0 0 1 1.572-1.001L6.58 3zm0 2H6.58l-3.333 5.833L12 19.586l8.753-8.753zM15 6a1 1 0 1 1 0 2h-2v1.545c.758.07 1.447.217 2.004.426c.395.148.749.336 1.013.571s.483.557.483.958s-.219.724-.483.958c-.264.235-.618.423-1.013.57c-.594.223-1.338.377-2.157.44A1 1 0 0 1 13 14v2a1 1 0 1 1-2 0v-2c0-.196.056-.378.153-.532c-.819-.063-1.563-.216-2.157-.44c-.395-.147-.749-.335-1.013-.57S7.5 11.901 7.5 11.5s.219-.724.483-.958c.264-.235.618-.423 1.013-.57c.556-.21 1.245-.357 2.004-.427V8H9a1 1 0 1 1 0-2zm-2.001 4.55a1 1 0 0 1-1.998 0a6.8 6.8 0 0 0-1.654.357c-.33.124-.56.259-.701.383c-.117.104-.14.172-.145.199L8.5 11.5c0 .013.005.085.146.21s.372.26.701.382c.655.246 1.592.408 2.653.408s1.998-.162 2.653-.408c.329-.123.56-.258.7-.382a.46.46 0 0 0 .14-.178l.007-.032l-.007-.032a.46.46 0 0 0-.14-.178c-.14-.124-.371-.26-.7-.382c-.44-.165-1.008-.293-1.654-.358'/%3E%3C/g%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}