/* 保留必要的动画效果 */
@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-20px) translateY(-10px); }
    50% { transform: translateX(20px) translateY(10px); }
    75% { transform: translateX(-10px) translateY(20px); }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 15px 35px rgba(255, 107, 107, 0.5);
    }
    to {
        box-shadow: 0 20px 45px rgba(255, 107, 107, 0.8);
    }
}

@keyframes shimmer-tip {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
}

/* 隐藏数字输入框的增减按钮 */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input {
    -moz-appearance: textfield;
}

/* 消息提示样式 */
.message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideInFromBottom 0.3s ease;
    max-width: 90%;
    text-align: center;
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideOutBottom {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
}

.message.success {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.message.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.message.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.message.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* ==================== 黑暗主题样式 ==================== */

/* 黑暗主题根变量 */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
}

/* 黑暗主题类 */
body.dark-theme {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #f8fafc !important;
}

body.dark-theme .text-white {
    color: #f8fafc !important;
}

body.dark-theme .text-gray-300 {
    color: #cbd5e1 !important;
}

body.dark-theme .text-gray-400 {
    color: #94a3b8 !important;
}

body.dark-theme .bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .bg-white\/20 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

body.dark-theme .border-white\/20 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .border-white\/30 {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* 黑暗主题背景装饰 */
body.dark-theme .bg-blue-500 {
    background-color: #3b82f6 !important;
}

body.dark-theme .bg-purple-500 {
    background-color: #8b5cf6 !important;
}

body.dark-theme .bg-green-500 {
    background-color: #10b981 !important;
}

body.dark-theme .bg-red-500 {
    background-color: #ef4444 !important;
}

body.dark-theme .bg-yellow-500 {
    background-color: #f59e0b !important;
}

/* 黑暗主题背景装饰增强 */
body.dark-theme .bg-blue-500 {
    opacity: 0.3 !important;
    filter: blur(40px) !important;
}

body.dark-theme .bg-purple-500 {
    opacity: 0.3 !important;
    filter: blur(40px) !important;
}

/* 黑暗主题渐变背景 - 更暗的颜色 */
body.dark-theme .bg-gradient-to-r.from-blue-600.to-purple-600 {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

body.dark-theme .bg-gradient-to-r.from-green-600.to-emerald-600 {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

body.dark-theme .bg-gradient-to-r.from-purple-600.to-indigo-600 {
    background: linear-gradient(to right, #6b21b6, #5b21b6) !important;
}

body.dark-theme .bg-gradient-to-r.from-blue-400.to-purple-400 {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

/* 黑暗主题按钮渐变背景 - 更暗的颜色 */
body.dark-theme .bg-gradient-to-r.from-green-500.to-emerald-500 {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

body.dark-theme .bg-gradient-to-r.from-gray-600.to-gray-700 {
    background: linear-gradient(to right, #374151, #1f2937) !important;
}

body.dark-theme .bg-gradient-to-r.from-gray-700.to-gray-800 {
    background: linear-gradient(to right, #1f2937, #111827) !important;
}

/* 更具体的按钮选择器 - 与背景一致的蓝紫色系 */
body.dark-theme button.bg-gradient-to-r.from-green-600.to-emerald-600 {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

body.dark-theme button.bg-gradient-to-r.from-green-500.to-emerald-500 {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

body.dark-theme button.bg-gradient-to-r.from-purple-600.to-indigo-600 {
    background: linear-gradient(to right, #6b21b6, #5b21b6) !important;
}


body.dark-theme button.bg-gradient-to-r.from-gray-600.to-gray-700 {
    background: linear-gradient(to right, #374151, #1f2937) !important;
}

/* 黑暗主题按钮悬停效果 - 更暗的颜色 */
body.dark-theme .hover\:from-blue-700:hover {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

body.dark-theme .hover\:from-green-700:hover {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

body.dark-theme .hover\:from-purple-700:hover {
    background: linear-gradient(to right, #6b21b6, #5b21b6) !important;
}

body.dark-theme .hover\:from-green-600:hover {
    background: linear-gradient(to right, #1e3a8a, #5b21b6) !important;
}

body.dark-theme .hover\:from-gray-700:hover {
    background: linear-gradient(to right, #374151, #1f2937) !important;
}

body.dark-theme .hover\:from-gray-800:hover {
    background: linear-gradient(to right, #1f2937, #111827) !important;
}

/* 黑暗主题标签页按钮 - 更暗的颜色 */
body.dark-theme .bg-blue-600 {
    background-color: #1e40af !important;
}

body.dark-theme .hover\:text-white:hover {
    color: #ffffff !important;
}

/* 黑暗主题模态框按钮 - 更暗的颜色 */
body.dark-theme .bg-gray-600 {
    background-color: #374151 !important;
}

body.dark-theme .hover\:bg-gray-700:hover {
    background-color: #1f2937 !important;
}

body.dark-theme .hover\:bg-blue-700:hover {
    background-color: #1e3a8a !important;
}

/* 黑暗主题删除按钮 */
body.dark-theme .text-red-400 {
    color: #f87171 !important;
}

body.dark-theme .hover\:text-red-300:hover {
    color: #fca5a5 !important;
}

/* 黑暗主题关闭按钮 */
body.dark-theme .text-gray-400 {
    color: #9ca3af !important;
}

/* 黑暗主题输入框 */
body.dark-theme input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

body.dark-theme input:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

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

/* 黑暗主题按钮 */
body.dark-theme button {
    transition: all 0.3s ease !important;
}

body.dark-theme button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

/* 黑暗主题卡片 */
.dark-theme .bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.dark-theme .bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* 黑暗主题消息提示 */
body.dark-theme .message {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .message.success {
    background: linear-gradient(135deg, #059669, #10b981) !important;
}

body.dark-theme .message.error {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
}

body.dark-theme .message.warning {
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
}

body.dark-theme .message.info {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
}

/* 黑暗主题主题切换按钮 */
body.dark-theme #themeToggleBtn {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.dark-theme #themeToggleBtn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1) !important;
}

/* 黑暗主题图标颜色 */
body.dark-theme #sunIcon {
    color: #fbbf24 !important;
}

body.dark-theme #moonIcon {
    color: #60a5fa !important;
}

/* 黑暗主题动画效果 */
body.dark-theme .animate-pulse-glow {
    animation: pulseGlowDark 2s ease-in-out infinite alternate !important;
}

@keyframes pulseGlowDark {
    from {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    }
}

/* 黑暗主题过渡效果 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* ==================== 明亮主题按钮样式 ==================== */

/* 明亮主题按钮渐变背景 - 与背景一致的蓝紫色系 */
body:not(.dark-theme) .bg-gradient-to-r.from-green-600.to-emerald-600 {
    background: linear-gradient(to right, #3b82f6, #8b5cf6) !important;
}

body:not(.dark-theme) .bg-gradient-to-r.from-green-500.to-emerald-500 {
    background: linear-gradient(to right, #3b82f6, #8b5cf6) !important;
}

/* 明亮主题具体按钮选择器 */
body:not(.dark-theme) button.bg-gradient-to-r.from-green-600.to-emerald-600 {
    background: linear-gradient(to right, #3b82f6, #8b5cf6) !important;
}

body:not(.dark-theme) button.bg-gradient-to-r.from-green-500.to-emerald-500 {
    background: linear-gradient(to right, #3b82f6, #8b5cf6) !important;
}

/* 明亮主题按钮悬停效果 */
body:not(.dark-theme) .hover\:from-green-700:hover {
    background: linear-gradient(to right, #2563eb, #7c3aed) !important;
}

body:not(.dark-theme) .hover\:from-green-600:hover {
    background: linear-gradient(to right, #2563eb, #7c3aed) !important;
}

/* 黑暗主题下的HiveDao标题背景颜色 */
body.dark-theme h1.bg-gradient-to-r.from-blue-400.to-purple-400 {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}