/* 全局样式 */
:root {
    --primary: #2E7D32;
    --secondary: #4CAF50;
    --accent: #66BB6A;
    --light: #E8F5E9;
    --dark: #1B5E20;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.slide-in {
    animation: slideIn 0.8s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* 响应式断点调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

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

/* 卡片悬停效果增强 */
.hover-scale {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* 按钮样式增强 */
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.98);
}

/* 图片加载过渡 */
img {
    transition: opacity 0.5s ease;
}

img:hover {
    opacity: 0.95;
}

/* 表单输入增强 */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* 导航链接效果 */
a.nav-link {
    position: relative;
}

a.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

a.nav-link:hover::after {
    width: 100%;
}

/* 页脚增强 */
footer {
    background: linear-gradient(135deg, var(--dark) 0%, #1a4c1d 100%);
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    margin-right: 10px;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    color: #666;
}

/* 价格标签样式 */
.price-tag {
    display: inline-flex;
    align-items: baseline;
}

.price-tag .currency {
    font-size: 0.8em;
    margin-right: 2px;
}

.price-tag .amount {
    font-weight: bold;
    font-size: 1.2em;
}

.price-tag .unit {
    font-size: 0.8em;
    margin-left: 2px;
    color: #666;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

.tag.primary {
    background-color: var(--primary);
    color: white;
}

.tag.secondary {
    background-color: var(--light);
    color: var(--primary);
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8em;
}

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

/* 计数动画 */
.count-up {
    transition: all 1s ease;
}

/* 卡片阴影层次 */
.card-shadow-1 {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-shadow-2 {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-shadow-3 {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-shadow-4 {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* 文本样式变体 */
.text-balance {
    text-wrap: balance;
}

.text-shadow-small {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(45deg, var(--primary), var(--secondary));
}

/* 背景图案 */
.bg-pattern {
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%232e7d32" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}