/* ================================================
   Omini 官网 - 公共样式 (omninPublic.css)
   包含：全局重置、自适应配置、CSS变量、工具类
   设计稿基准：2560px
   前缀规范：ominit-
   ================================================ */

/* ========== 1. 全局重置 ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* 
        自适应核心：
        以 2560px 设计稿为基准
        公式：1rem = calc(100vw / 2560 * 16)
        即：2560px屏 → 16px/rem, 1920px屏 → 12px/rem, 1280px屏 → 8px/rem
    */
    font-size: calc(100vw / 2560 * 16);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #ffffff;
    background-color: #000000;
    line-height: 1.6;
    overflow-x: hidden;
}

ul, ol {
    list-style: none;
}

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

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
}

input, textarea, select {
    font: inherit;
    color: inherit;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 0.5rem;
    height: 0.5rem;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 0.25rem;
    transition: background 0.3s ease;
}

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

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #333333 #0a0a0a;
}

/* ========== 2. CSS 变量 - 设计令牌 ========== */
:root {
    /* 背景色 */
    --ominit-bg: #000000;
    --ominit-bg-light: #ffffff;

    /* 文字颜色 */
    --ominit-text: #ffffff;
    --ominit-text-secondary: rgba(255, 255, 255, 0.7);
    --ominit-text-muted: rgba(255, 255, 255, 0.5);

    /* 间距 */
    --ominit-space-xs: 0.25rem;   /* 4px */
    --ominit-space-sm: 0.5rem;    /* 8px */
    --ominit-space-md: 1rem;      /* 16px */
    --ominit-space-lg: 2rem;      /* 32px */
    --ominit-space-xl: 4rem;      /* 64px */

    /* 圆角 */
    --ominit-radius-sm: 0.25rem;
    --ominit-radius-md: 0.5rem;
    --ominit-radius-lg: 1rem;

    /* 字体大小 */
    --ominit-font-xs: 0.75rem;    /* 12px */
    --ominit-font-sm: 0.875rem;   /* 14px */
    --ominit-font-md: 1rem;       /* 16px */
    --ominit-font-lg: 1.25rem;    /* 20px */
    --ominit-font-xl: 1.5rem;     /* 24px */
    --ominit-font-2xl: 2rem;      /* 32px */
    --ominit-font-3xl: 3rem;      /* 48px */
    --ominit-font-4xl: 4rem;      /* 64px */
    --ominit-font-5xl: 6rem;      /* 96px */
}

/* 英文环境字体 */
body.lang-en {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========== 3. 工具类 ========== */

/* 文字对齐 */
.ominit-text-center { text-align: center; }
.ominit-text-left   { text-align: left; }
.ominit-text-right  { text-align: right; }

/* Flex 布局 */
.ominit-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ominit-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 图片容器 - 防止变形溢出 */
.ominit-img-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ominit-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}
