/**
 * 陪练猫网站 - 基础样式重置
 * 版本: v2.0
 * 日期: 2026-05-22
 */

/* ==================== 基础重置 ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: var(--text-base);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--light);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Section scroll offset */
section[id] {
    scroll-margin-top: 80px;
}

/* ==================== 排版 ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--easing-smooth);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==================== 选中 ==================== */
::selection {
    background: var(--primary);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary);
    color: var(--white);
}

/* ==================== 焦点 ==================== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==================== 动画类 ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 102, 255, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 102, 255, 0.2); }
}

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

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

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-slow) var(--easing-smooth),
                transform var(--duration-slow) var(--easing-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
