/**
 * 闲鱼运营助手 - 基础样式
 * Base Styles & Reset
 */

/* ===== CSS Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* 禁止双击缩放 */
    /* 全局一屏固定 */
    overflow: hidden;
    height: 100%;
    height: 100dvh;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background: linear-gradient(180deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


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

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

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

/* ===== 链接 ===== */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ===== 列表 ===== */
ul,
ol {
    list-style: none;
}

/* ===== 图片 ===== */
img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===== 按钮重置 ===== */
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
}

/* ===== 输入框重置 ===== */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
    -webkit-appearance: none;
}

/* ===== 辅助类 ===== */
.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;
}

.text-primary {
    color: var(--color-text-primary);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-tertiary {
    color: var(--color-text-tertiary);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ===== 布局容器 ===== */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    padding-top: var(--safe-area-top);
    padding-bottom: calc(var(--navbar-height) + var(--safe-area-bottom));
}


/* 子页面全屏模式（无底部Tab） */
.app-container.fullscreen {
    padding-bottom: env(safe-area-inset-bottom);
}

.page-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--spacing-md);
    padding-bottom: var(--spacing-xl);
}

/* ===== 页面标题 ===== */
.page-header {
    padding: var(--spacing-lg) var(--spacing-md);
    padding-top: calc(var(--spacing-lg) + var(--safe-area-top));
}

.page-title {
    font-size: var(--font-size-display);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.page-subtitle {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
}