/* 舒汐小程序基础样式 */

/* 呼吸动画 */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes breathe-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.6;
    }
}

.animate-breathe {
    animation: breathe 4s ease-in-out infinite;
}

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

/* 卡片悬浮效果 */
.card-hover {
    transition: all 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 140, 160, 0.25);
}

.card-hover:active {
    transform: scale(0.98);
    box-shadow: 0 4px 16px rgba(249, 140, 160, 0.2);
}

/* 按钮交互效果 */
.btn-interactive {
    transition: all 0.2s ease-in-out;
}

.btn-interactive:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-interactive:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 渐变背景动画 */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* 淡入动画 */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 脉冲动画 */
@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(249, 140, 160, 0.3);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 140, 160, 0.5);
}

/* 文本选择样式 */
::selection {
    background: rgba(249, 140, 160, 0.2);
    color: #2E2E2E;
}

/* 焦点样式 */
.focus-ring:focus {
    outline: 2px solid #F28FA6;
    outline-offset: 2px; /* 这个属性是标准的，可以实现 offset 效果 */
}

/* 加载状态 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 响应式工具类 */
@media (max-width: 393px) {
    .container-padding {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1a1a1a;
        color: #ffffff;
    }
}

/* 无障碍支持 */
.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;
}

/* 高对比度模式 */
@media (prefers-contrast: more) {
    .high-contrast {
        border-width: 2px;
        font-weight: 600;
    }
}

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

/* 备案号样式 - 确保在手机容器下方垂直居中 */
.icp-record {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding: 10px 0;
    margin-top: 1.5rem;
    width: 100%;
    display: block;
    clear: both;
}

.icp-record a {
    color: #666;
    text-decoration: none;
}

.icp-record a:hover {
    text-decoration: underline;
}