/* CSS Reset - 重置样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    /* iOS Safari 视口修复 */
    height: 100vh;
    height: -webkit-fill-available;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: #333;
    font-size: 16px; /* 增大基础字体 */
    line-height: 1.6;
    /* iOS Safari 特殊处理 */
    -webkit-text-size-adjust: 100%;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* iOS Safari 视口变量 */
:root {
    --vh: 1vh;
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-right: env(safe-area-inset-right);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
}

/* 移除默认样式 */
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

input, textarea {
    border: none;
    outline: none;
    font-family: inherit;
    transition: all 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 选择文本样式 */
::selection {
    background: rgba(7, 193, 96, 0.2);
    color: #333;
}

::-moz-selection {
    background: rgba(7, 193, 96, 0.2);
    color: #333;
}

/* 焦点样式 */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(7, 193, 96, 0.5);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
