/* 公共样式文件 */

/* 导航按钮样式 */
.nav-btn {
    @apply w-full px-3 py-2 text-xs text-gray-600 bg-gray-50 rounded-md border border-gray-200 hover:bg-blue-50 hover:text-blue-600 hover:border-blue-200 transition-all duration-200;
}

.nav-btn.active {
    @apply bg-blue-500 text-white border-blue-500;
}

/* 隐藏滚动条但保持滚动功能 */
.custom-scrollbar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.custom-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* 输入框聚焦效果 */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: rgb(59, 130, 246);
}

/* 按钮按压效果 */
.btn-press:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}

/* 卡片阴影效果 */
.card-shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card-shadow:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

/* 文本省略 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 加载动画 */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* 滚动相关样式 */
html, body {
    scroll-behavior: smooth;
}

/* 确保在小屏幕设备上有良好的滚动体验 */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }
    
    /* 优化触摸滚动 */
    .custom-scrollbar {
        -webkit-overflow-scrolling: touch;
    }
}

/* 全局隐藏所有滚动条 */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* 修复内容区域的滚动问题 */
.content-scroll {
    height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* 防止水平滚动 */
.no-horizontal-scroll {
    overflow-x: hidden;
    max-width: 100%;
}

/* 为固定定位的元素确保z-index */
.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
} 