/* 公用样式 */
.upload-area {
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}

.upload-area.dragover {
    border-color: #16a34a;
    background-color: #f0fdf4;
}

/* Hero区域上传样式 */
.upload-area-hero {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.upload-area-hero:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.upload-area-hero.dragover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.02);
}

/* Hero按钮样式 */
.btn-hero {
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Hero区域加载动画 */
.loading-spinner-hero {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #16a34a;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

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

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

/* 功能卡片悬停效果 */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 英雄区域渐变背景增强 - 更改为深森林绿主题 */
.hero-gradient {
    background: linear-gradient(135deg, #166534 0%, #15803d 25%, #16a34a 75%, #22c55e 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .hero-gradient h1 {
        font-size: 2.5rem;
    }
    
    .upload-area, .upload-area-hero {
        padding: 2rem 1rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }

    .upload-area-hero .space-y-4 {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .upload-area-hero .space-y-4 button {
        width: 100%;
        margin: 0 !important;
    }
}

/* 按钮样式增强 - 更新为深绿色主题 */
.btn-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* 结果显示动画 */
.result-fade-in {
    animation: resultFadeIn 0.6s ease-out;
}

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

/* 进度条样式 - 更新颜色 */
.progress-bar {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    transition: width 0.3s ease;
}

/* 导航栏下拉菜单优化 */
.nav-dropdown {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* 页脚样式 */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #16a34a;
}

/* 语言切换器样式 */
.language-switcher {
    position: relative;
}

.language-switcher .nav-dropdown {
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
}

.language-switcher .nav-dropdown.opacity-0 {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.language-switcher .nav-dropdown:not(.opacity-0) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 语言切换项悬停效果 */
.nav-dropdown a {
    position: relative;
    overflow: hidden;
}

.nav-dropdown a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.1), transparent);
    transition: left 0.3s ease;
}

.nav-dropdown a:hover::before {
    left: 100%;
}

/* 当前语言标识 */
.nav-dropdown a.bg-green-50 {
    position: relative;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.nav-dropdown a.bg-green-50::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #22c55e;
}

/* 移动端语言切换样式 */
#mobile-menu .border-t {
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: center top;
}

/* 语言切换动画 */
.language-switch-fade {
    animation: languageSwitchFade 0.5s ease-in-out;
}

@keyframes languageSwitchFade {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 语言图标动画 */
.language-switcher button:hover .fa-globe {
    animation: globeRotate 0.6s ease-in-out;
}

@keyframes globeRotate {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

/* 下拉箭头动画 */
.language-switcher button:hover .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

/* 统计数据样式 */
.stats-card {
    transition: all 0.3s ease;
    cursor: default;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-card .stats-icon {
    transition: all 0.3s ease;
}

.stats-card:hover .stats-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.counter {
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.counter:hover {
    color: #3B82F6;
}

/* 状态指示器动画 */
.status-indicator {
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* 轮播组件样式 */
.examples-carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.examples-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: fit-content;
}

.example-card {
    /* 不设置固定宽度，让响应式CSS控制 */
    flex: 0 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    /* 默认桌面端样式 */
    width: 320px;
    margin: 0 16px;
}

.example-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.example-card img {
    width: 100%;
    height: 192px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.example-card:hover img {
    transform: scale(1.1);
}

/* 轮播控制按钮 */
#prev-btn, #next-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
}

#prev-btn:hover, #next-btn:hover {
    background: #f9fafb;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

#prev-btn:active, #next-btn:active {
    transform: scale(0.95);
}

/* 轮播指示点 */
#carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #10b981;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: #6b7280;
    transform: scale(1.1);
}

/* 手机端指示点调整 */
@media (max-width: 768px) {
    #carousel-dots {
        gap: 12px;
        margin-top: 1.5rem;
    }
    
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
    
    .nav-dropdown {
        position: fixed !important;
        top: auto !important;
        right: 1rem !important;
        left: 1rem !important;
        width: auto !important;
        max-width: none !important;
        margin-top: 0.5rem;
    }

    .language-switcher .nav-dropdown {
        transform: translateY(-5px);
    }

    .examples-carousel-container {
        overflow: hidden !important;
        padding: 0 8px !important;
    }

    /* 手机端卡片宽度调整，确保能显示2个 */
    .examples-carousel-track .example-card {
        width: calc((100vw - 32px) / 2 - 16px) !important;
        min-width: calc((100vw - 32px) / 2 - 16px) !important;
        max-width: calc((100vw - 32px) / 2 - 16px) !important;
        margin: 0 8px !important;
        flex: 0 0 calc((100vw - 32px) / 2 - 16px) !important;
    }

    #prev-btn, #next-btn {
        width: 40px;
        height: 40px;
    }
}

/* 小屏手机端响应式调整 */
@media (max-width: 640px) {
    /* 小屏手机端也显示2个卡片 */
    .examples-carousel-track .example-card {
        width: calc((100vw - 24px) / 2 - 12px) !important;
        min-width: calc((100vw - 24px) / 2 - 12px) !important;
        max-width: calc((100vw - 24px) / 2 - 12px) !important;
        margin: 0 6px !important;
        flex: 0 0 calc((100vw - 24px) / 2 - 12px) !important;
    }
    
    .examples-carousel-container {
        padding: 0 6px !important;
    }
}

@media (max-width: 480px) {
    /* 超小屏手机端 */
    .examples-carousel-track .example-card {
        width: calc((100vw - 16px) / 2 - 8px) !important;
        min-width: calc((100vw - 16px) / 2 - 8px) !important;
        max-width: calc((100vw - 16px) / 2 - 8px) !important;
        margin: 0 4px !important;
        flex: 0 0 calc((100vw - 16px) / 2 - 8px) !important;
    }
    
    .examples-carousel-container {
        padding: 0 4px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* 平板端显示2个卡片 */
    .examples-carousel-track .example-card {
        width: calc(50% - 20px) !important;
        min-width: calc(50% - 20px) !important;
        max-width: calc(50% - 20px) !important;
        margin: 0 10px !important;
        flex: 0 0 calc(50% - 20px) !important;
    }
}

@media (min-width: 1025px) {
    /* 桌面端显示3个卡片 */
    .examples-carousel-track .example-card {
        width: 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
        margin: 0 16px !important;
        flex: 0 0 320px !important;
    }
} 