/* 全局样式 */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 适配老年人的字体大小 */
body {
    font-size: 16px;
}

/* 年份按钮动画 */
.year-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.year-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.year-btn:active {
    transform: scale(0.98);
}

/* 省市卡片悬浮效果 */
.province-card {
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.province-card:hover > div {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.province-card:active > div {
    transform: scale(0.95);
}

/* 禁用状态的省市卡片 */
.province-card.disabled {
    cursor: not-allowed;
}

.province-card.disabled > div {
    position: relative;
}

.province-card.disabled:hover > div {
    transform: none;
    box-shadow: none;
}

/* 状态标签位置 */
.status-badge {
    position: relative;
}

/* 热门城市特殊样式 */
.province-card.popular > div {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.province-card.popular > div i,
.province-card.popular > div p {
    color: white !important;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Toast提示样式 */
.toast-message {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

.animate-slideDown {
    animation: slideDown 0.3s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.3s ease-out;
}

/* 输入框聚焦效果 */
input:focus {
    outline: none;
}

/* 结果展示动画 */
#resultSection {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 波纹效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 装饰性背景动画 */
.bg-decoration {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 确保在小屏幕上的可读性 */
@media (max-width: 375px) {
    .text-3xl {
        font-size: 2rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 底部广告位固定样式 */
.fixed.bottom-0 {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* 卡片进入动画 */
.province-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.province-card:nth-child(3n+1) {
    animation-delay: 0.1s;
}

.province-card:nth-child(3n+2) {
    animation-delay: 0.2s;
}

.province-card:nth-child(3n) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 