/* 暗色模式相关样式 */
body.dark-mode #mainForm {
    background: rgba(33, 40, 45, 0.98);
    color: #e0e7ff;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.28);
    border: 1.5px solid rgba(96, 165, 250, 0.18);
}

body.dark-mode button,
body.dark-mode .row button,
body.dark-mode .row [id$='Btn'] {
    background: linear-gradient(90deg, #232526 0%, #414345 100%);
    color: #e0e7ff;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: rgba(44, 51, 73, 0.98);
    color: #e0e7ff;
    border: 1.5px solid rgba(96, 165, 250, 0.18);
}

body.dark-mode #price-ticker {
    background: rgba(44, 51, 73, 0.98);
    color: #e0e7ff;
    border: 1px solid rgba(96, 165, 250, 0.18);
}

body.dark-mode label {
    color: #93c5fd;
}

/* 暗色模式下的按钮颜色 */
body.dark-mode .row button:nth-child(4),
body.dark-mode .row button:nth-child(5) {
    background: linear-gradient(90deg, #1e40af 0%, #3730a3 100%);
}

body.dark-mode .row button:nth-child(6),
body.dark-mode .row button:nth-child(7) {
    background: linear-gradient(90deg, #9d174d 0%, #92400e 100%);
}

body.dark-mode .row button:nth-child(2),
body.dark-mode .row button:nth-child(3) {
    background: linear-gradient(90deg, #065f46 0%, #047857 100%);
}

body.dark-mode .row button:nth-child(8),
body.dark-mode .row button:nth-child(9) {
    background: linear-gradient(90deg, #5b21b6 0%, #4c1d95 100%);
}

/* 确保区块链浏览器查询按钮在暗黑模式下显示为蓝色 */
body.dark-mode #explorerQueryBtn {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%) !important;
}

/* 区块链浏览器查询按钮悬停样式 */
body.dark-mode #explorerQueryBtn:hover {
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%) !important;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px 0 rgba(37, 99, 235, 0.3) !important;
}

/* 使用最高优先级确保暗黑模式下显示蓝色 */
body.dark-mode #mainForm .row #explorerQueryBtn {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 2px 8px 0 rgba(29, 78, 216, 0.2) !important;
}

body.dark-mode #mainForm .row #explorerQueryBtn:hover {
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%) !important;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px 0 rgba(29, 78, 216, 0.3) !important;
}

/* 暗色模式弹窗样式 */
body.dark-mode .swal2-popup {
    background: rgba(36, 41, 59, 0.98) !important;
    color: #e0e7ff !important;
    border-color: rgba(96, 165, 250, 0.18);
}

body.dark-mode .swal2-title {
    color: #93c5fd !important;
}

body.dark-mode .swal2-html-container {
    color: #e0e7ff !important;
}

body.dark-mode .swal2-confirm,
body.dark-mode .swal2-cancel {
    background: linear-gradient(90deg, #1e40af 0%, #3730a3 100%) !important;
    color: #e0e7ff !important;
}

body.dark-mode .swal2-cancel {
    background: linear-gradient(90deg, #991b1b 0%, #7f1d1d 100%) !important;
}

body.dark-mode .swal2-deny {
    background: linear-gradient(90deg, #5b21b6 0%, #4c1d95 100%) !important;
    color: #e0e7ff !important;
}

body.dark-mode .swal2-backdrop-show {
    background: rgba(2, 6, 23, 0.85) !important;
}

/* 确保暗色模式下弹窗按钮居中 */
body.dark-mode .swal2-actions {
    justify-content: center !important;
    margin: 1.25em auto 0 !important;
    width: 100% !important;
}

body.dark-mode .swal2-input,
body.dark-mode .swal2-textarea,
body.dark-mode .swal2-select {
    background: rgba(33, 39, 55, 0.98) !important;
    color: #e0e7ff !important;
    border-color: rgba(96, 165, 250, 0.25) !important;
}

body.dark-mode .swal2-input-label {
    color: #93c5fd !important;
}

/* 暗色主题按钮悬停状态 */
body.dark-mode button:hover,
body.dark-mode .row button:hover,
body.dark-mode .row [id$='Btn']:hover {
    background: linear-gradient(90deg, #414345 0%, #232526 100%);
    color: #60a5fa;
}

/* 暗色主题样式重写 */
body.dark-mode .price-info,
body.dark-mode .user-info {
    background: rgba(44, 51, 73, 0.95);
    border: 1px solid rgba(96, 165, 250, 0.15);
}

body.dark-mode .theme-btn::before {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.3);
}

/* 暗色主题结果显示样式 */
body.dark-mode .result {
    background: linear-gradient(90deg, #232526 0%, #414345 100%);
    color: #60a5fa;
}

/* 确保暗色模式下设置按钮正确显示 */
body.dark-mode #settingsBtn,
body.dark-mode .settings-btn {
    background: rgba(96, 165, 250, 0.15) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    visibility: visible !important;
    display: flex !important;
}

body.dark-mode #settingsBtn:hover,
body.dark-mode .settings-btn:hover {
    background: rgba(96, 165, 250, 0.25) !important;
    transform: rotate(30deg) scale(1.05) !important;
}
