/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    overflow-x: hidden;
    background: linear-gradient(135deg, #064e3b 0%, #0f766e 50%, #0891b2 100%);
    min-height: 100vh;
}

/* 字体样式 */
.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-noto {
    font-family: 'Noto Sans SC', sans-serif;
}

/* 自定义动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

@keyframes slide-up {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-left {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-right {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes bounce-in {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

@keyframes community-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(16, 185, 129, 0.5); }
}

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

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

.animate-slide-up {
    animation: slide-up 0.8s ease-out forwards;
}

.animate-slide-left {
    animation: slide-left 0.8s ease-out forwards;
}

.animate-slide-right {
    animation: slide-right 0.8s ease-out forwards;
}

.animate-bounce-in {
    animation: bounce-in 1s ease-out forwards;
}

.animate-shine {
    position: relative;
    overflow: hidden;
}

.animate-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 2s infinite;
}

.animate-community-pulse {
    animation: community-pulse 2s ease-in-out infinite;
}

.animate-community-rotate {
    animation: community-rotate 3s linear infinite;
}

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

::-webkit-scrollbar-track {
    background: #064e3b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #10b981, #0891b2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #059669, #0e7490);
}

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

/* 玻璃态效果 */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 悬停效果增强 */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3);
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #0891b2, #06b6d4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
}

/* 卡片阴影效果 */
.card-glow {
    transition: all 0.3s ease;
}

.card-glow:hover {
    box-shadow: 
        0 0 20px rgba(16, 185, 129, 0.3),
        0 0 40px rgba(8, 145, 178, 0.2),
        0 0 60px rgba(6, 182, 212, 0.1);
}

/* 按钮特效 */
.btn-creative {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #10b981, #0891b2);
    border: none;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-creative::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;
}

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

.btn-creative:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

/* 导航栏特效 */
.nav-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 3D变换效果 */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.rotate-y {
    transform: rotateY(15deg);
    transition: transform 0.3s ease;
}

.rotate-y:hover {
    transform: rotateY(0deg);
}

/* 海角社区卡片效果 */
.haijiao-community-card {
    position: relative;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.haijiao-community-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}

/* 社区服务按钮效果 */
.community-service-btn {
    position: relative;
    background: linear-gradient(45deg, #10b981, #0891b2);
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
}

.community-service-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    animation: community-pulse 1s ease-in-out infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-8xl {
        font-size: 4rem;
    }
}

/* 统计数字动画 */
.counter {
    display: inline-block;
    font-weight: 900;
    font-family: 'Noto Sans SC', sans-serif;
}

/* 加载动画 */
.loading-spinner {
    border: 4px solid rgba(16, 185, 129, 0.3);
    border-top: 4px solid #10b981;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* 成功提示样式 */
.success-message {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
}

.success-message i {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

/* 错误提示样式 */
.error-message {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

/* 无障碍访问增强 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 焦点样式 */
.focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* 文本截断 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-gradient-to-r,
    .bg-gradient-to-br {
        background: white !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .text-gray-300 {
        color: #d1d5db;
    }
    
    .text-gray-400 {
        color: #9ca3af;
    }
    
    .border-emerald-200 {
        border-color: #10b981;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce)  {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 自定义滚动动画 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 海角社区主题标签效果 */
.haijiao-community-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.haijiao-community-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 社交分享按钮 */
.social-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #9ca3af;
}

.social-share:hover {
    transform: translateY(-2px);
    color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #0891b2);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* 模态框动画 */
.modal-enter {
    opacity: 0;
    transform: scale(0.9);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.modal-exit {
    opacity: 1;
    transform: scale(1);
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

/* 工具提示 */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: #1f2937;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
}

/* 徽章样式 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #10b981;
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.badge-success {
    background: #10b981;
}

.badge.badge-warning {
    background: #f59e0b;
}

.badge.badge-error {
    background: #ef4444;
}

/* 分割线样式 */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    margin: 2rem 0;
}

/* 卡片堆叠效果 */
.card-stack {
    position: relative;
}

.card-stack::before,
.card-stack::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: -4px;
    bottom: -4px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: inherit;
    z-index: -1;
}

.card-stack::after {
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    background: rgba(16, 185, 129, 0.05);
}

/* 脉冲动画 */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid #10b981;
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* 闪烁效果 */
.shimmer {
    background: linear-gradient(90deg, rgba(31, 41, 55, 0.8) 25%, rgba(55, 65, 81, 0.8) 50%, rgba(31, 41, 55, 0.8) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* 弹跳加载动画 */
.bounce-loader {
    display: flex;
    gap: 0.25rem;
}

.bounce-loader div {
    width: 0.5rem;
    height: 0.5rem;
    background: #10b981;
    border-radius: 50%;
    animation: bounce-loader 1.4s infinite ease-in-out both;
}

.bounce-loader div:nth-child(1) { animation-delay: -0.32s; }
.bounce-loader div:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce-loader {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 海角社区特色样式 */
.haijiao-community-gradient {
    background: linear-gradient(135deg, #10b981 0%, #0891b2 50%, #06b6d4 100%);
}

.haijiao-community-card {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.haijiao-community-hover {
    transition: all 0.3s ease;
}

.haijiao-community-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
}

/* 服务图标特效 */
.service-icon {
    transition: all 0.3s ease;
}

.service-icon:hover {
    transform: rotate(360deg) scale(1.2);
    color: #fbbf24;
}

/* 评分星星效果 */
.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.rating-star {
    color: #fbbf24;
    transition: all 0.2s ease;
}

.rating-star:hover {
    transform: scale(1.2);
    animation: star-twinkle 1s ease-in-out;
}

@keyframes star-twinkle {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* 社区服务样式 */
.haijiao-community-service {
    position: relative;
    background: linear-gradient(45deg, #064e3b, #10b981);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.haijiao-community-service:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.haijiao-community-service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.3));
    pointer-events: none;
}

/* 服务卡片样式 */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
}

.service-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* 筛选标签 */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-tag.active {
    background: #10b981;
    color: white;
}

.filter-tag:not(.active) {
    background: rgba(55, 65, 81, 0.8);
    color: #d1d5db;
}

.filter-tag:not(.active):hover {
    background: #10b981;
    color: white;
}

/* 统计数据展示 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.5);
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(45deg, #10b981, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 表单样式增强 */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(55, 65, 81, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.8);
    border-radius: 0.75rem;
    color: white;
    font-family: 'Noto Sans SC', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: rgba(55, 65, 81, 0.9);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 600;
    font-family: 'Noto Sans SC', sans-serif;
}

/* 海角社区特效 */
.haijiao-community-hover {
    transition: all 0.3s ease;
}

.haijiao-community-hover:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(16, 185, 129, 0.2),
        0 5px 15px rgba(8, 145, 178, 0.1);
}