/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* 基础样式 */
body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

/* 自定义工具类 */
@layer utilities {
    .text-shadow {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    .card-hover {
        @apply transition-all duration-300 hover:shadow-lg hover:-translate-y-1;
    }
    .btn-primary {
        @apply bg-primary text-white px-4 py-2 rounded-lg hover:bg-opacity-90 transition-all;
    }
    .btn-secondary {
        @apply bg-secondary text-white px-4 py-2 rounded-lg hover:bg-opacity-90 transition-all;
    }
    .btn-outline {
        @apply border border-primary text-primary px-4 py-2 rounded-lg hover:bg-primary hover:text-white transition-all;
    }
    .input-field {
        @apply border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary;
    }
}

/* 导航链接样式 */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

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

/* 鸟类卡片样式 */
.bird-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bird-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 地图容器样式 */
.map-container {
    height: 500px;
    width: 100%;
    border-radius: 0.5rem;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* 页面切换动画 */
.page {
    animation: fadeInUp 0.6s ease-out;
}

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

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

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

/* 浮动动画 */
.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* 首页英雄区域 */
.hero-section {
    background-image: url('https://p11-flow-imagex-sign.byteimg.com/tos-cn-i-a9rns2rl98/rc/pc/super_tool/dec6da6c29bb4a3fb22d1f299870719d~tplv-a9rns2rl98-image.image?lk3s=8e244e95&rcl=2026031711571379ACC014D961F16B530D&rrcfp=f06b921b&x-expires=1776311882&x-signature=%2B8G5g9hVGPcyLI7QdzkHbJ0XGT4%3D');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.3), rgba(33, 150, 243, 0.3));
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 1;
}

/* 加载状态 */
.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #4CAF50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

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

/* 脉冲动画 */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 地图标记样式 */
.custom-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.custom-marker:hover {
    transform: scale(1.1);
}

.current-location-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 科技感边框 */
.tech-border {
    position: relative;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.tech-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
    animation: techBorderMove 3s linear infinite;
}

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

/* 科技感按钮 */
.tech-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tech-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tech-btn:hover::before {
    left: 100%;
}

.tech-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 玻璃态效果 */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* 霓虹文字 */
.neon-text {
    text-shadow: 
        0 0 5px rgba(76, 175, 80, 0.5),
        0 0 10px rgba(76, 175, 80, 0.3),
        0 0 15px rgba(76, 175, 80, 0.1);
}

/* 网格背景 */
.grid-bg {
    background-image: 
        linear-gradient(rgba(76, 175, 80, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(76, 175, 80, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .map-container {
        height: 350px;
    }
    
    .hero-section {
        height: 50vh;
    }
}

@media (max-width: 640px) {
    .map-container {
        height: 300px;
    }
    
    .hero-section {
        height: 40vh;
    }
}