/* 
 * 卡车展示网站自定义样式
 * 配合Tailwind CSS使用，添加项目特定的样式
 */

/* 全局样式重置和基础设置 */
* {
    box-sizing: border-box;
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 主题色彩变量 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --background-light: #f8fafc;
    --border-color: #e2e8f0;
}

/* 导航栏样式增强 */
.navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 移动端菜单动画 */
.mobile-menu {
    transition: all 0.3s ease-in-out;
    transform: translateY(-10px);
    opacity: 0;
}

.mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

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

/* 按钮样式增强 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息列表样式 */
.message-item {
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.message-item.unread {
    border-left-color: var(--primary-color);
    background-color: #eff6ff;
}

.message-item:hover {
    background-color: #f8fafc;
}

/* 响应式文字大小 */
@media (max-width: 640px) {
    .text-responsive-lg {
        font-size: 1.5rem;
    }
    
    .text-responsive-xl {
        font-size: 1.875rem;
    }
    
    .text-responsive-2xl {
        font-size: 2rem;
    }
}

/* 图片懒加载效果 */
.img-lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-lazy.loaded {
    opacity: 1;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --background-light: #1e293b;
        --border-color: #334155;
    }
}