/* 公共样式文件 - 卡速网 */
/* 包含重置样式、通用工具类和基础组件 */

/* CSS Reset 和基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

/* 链接样式 */
a {
    color: #1677ff;
    text-decoration: none;
    transition: color 0.2s;
    background-color: transparent;
}

a:hover {
    color: #4096ff;
    text-decoration: underline;
}

a:active {
    color: #0958d9;
}

/* 图片 */
img {
    max-width: 100%;
    height: auto;
    border-style: none;
    vertical-align: middle;
}

/* 列表 */
ul, ol {
    list-style: none;
}

/* 表单元素 */
input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    outline: none;
}

button, input {
    overflow: visible;
}

button, select {
    text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button;
    appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:focus,
[type="button"]:focus,
[type="reset"]:focus,
[type="submit"]:focus {
    outline: 1px dotted;
    outline: 5px auto -webkit-focus-ring-color;
}

/* 表格 */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 实用工具类 */

/* 文本对齐 */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* 文本颜色 */
.text-primary { color: #1677ff; }
.text-success { color: #52c41a; }
.text-warning { color: #faad14; }
.text-danger { color: #ff4d4f; }
.text-info { color: #1890ff; }
.text-muted { color: #999; }
.text-white { color: #fff; }

/* 背景颜色 */
.bg-primary { background-color: #1677ff; }
.bg-success { background-color: #52c41a; }
.bg-warning { background-color: #faad14; }
.bg-danger { background-color: #ff4d4f; }
.bg-info { background-color: #1890ff; }
.bg-light { background-color: #f5f7fa; }
.bg-white { background-color: #fff; }

/* 边距 */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mr-0 { margin-right: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }

.m-1 { margin: 0.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mr-1 { margin-right: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.ml-1 { margin-left: 0.5rem; }

.m-2 { margin: 1rem; }
.mt-2 { margin-top: 1rem; }
.mr-2 { margin-right: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.ml-2 { margin-left: 1rem; }

.m-3 { margin: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }
.mr-3 { margin-right: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.ml-3 { margin-left: 1.5rem; }

/* 内边距 */
.p-0 { padding: 0; }
.pt-0 { padding-top: 0; }
.pr-0 { padding-right: 0; }
.pb-0 { padding-bottom: 0; }
.pl-0 { padding-left: 0; }

.p-1 { padding: 0.5rem; }
.pt-1 { padding-top: 0.5rem; }
.pr-1 { padding-right: 0.5rem; }
.pb-1 { padding-bottom: 0.5rem; }
.pl-1 { padding-left: 0.5rem; }

.p-2 { padding: 1rem; }
.pt-2 { padding-top: 1rem; }
.pr-2 { padding-right: 1rem; }
.pb-2 { padding-bottom: 1rem; }
.pl-2 { padding-left: 1rem; }

.p-3 { padding: 1.5rem; }
.pt-3 { padding-top: 1.5rem; }
.pr-3 { padding-right: 1.5rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pl-3 { padding-left: 1.5rem; }

/* 显示属性 */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

/* Flexbox 工具类 */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.align-stretch { align-items: stretch; }

/* 浮动 */
.float-left { float: left; }
.float-right { float: right; }
.float-none { float: none; }
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 位置 */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* 宽度和高度 */
.w-25 { width: 25%; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }
.h-25 { height: 25%; }
.h-50 { height: 50%; }
.h-75 { height: 75%; }
.h-100 { height: 100%; }

/* 边框 */
.border { border: 1px solid #e8e8e8; }
.border-top { border-top: 1px solid #e8e8e8; }
.border-right { border-right: 1px solid #e8e8e8; }
.border-bottom { border-bottom: 1px solid #e8e8e8; }
.border-left { border-left: 1px solid #e8e8e8; }
.border-0 { border: 0; }

/* 边框颜色 */
.border-primary { border-color: #1677ff; }
.border-success { border-color: #52c41a; }
.border-warning { border-color: #faad14; }
.border-danger { border-color: #ff4d4f; }
.border-info { border-color: #1890ff; }

/* 圆角 */
.rounded { border-radius: 4px; }
.rounded-circle { border-radius: 50%; }
.rounded-pill { border-radius: 50rem; }
.rounded-0 { border-radius: 0; }

/* 阴影 */
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }

/* 溢出 */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }

/* 光标 */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

/* 用户选择 */
.user-select-none { user-select: none; }
.user-select-auto { user-select: auto; }
.user-select-all { user-select: all; }

/* 响应式工具类 - 使用媒体查询 */
@media (max-width: 768px) {
    .d-sm-none { display: none; }
    .d-sm-block { display: block; }
    .d-sm-flex { display: flex; }
    
    .flex-sm-row { flex-direction: row; }
    .flex-sm-column { flex-direction: column; }
    
    .text-sm-left { text-align: left; }
    .text-sm-center { text-align: center; }
    .text-sm-right { text-align: right; }
}

@media (max-width: 992px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
    .d-md-flex { display: flex; }
}

@media (max-width: 1200px) {
    .d-lg-none { display: none; }
    .d-lg-block { display: block; }
    .d-lg-flex { display: flex; }
}

/* 打印样式 */
@media print {
    .no-print { display: none; }
    .print-only { display: block; }
}