/* 通用样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #f5f5f5;
}

a {
    color: #333;
    text-decoration: none;
}

a:hover {
    color: #ff5722;
}

img {
    border: 0;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* 布局辅助类 */
.fl { float: left; }
.fr { float: right; }
.clear { clear: both; }
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

.hide { display: none; }
.show { display: block; }
.none { display: none !important; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

/* 间距类 */
.m-0 { margin: 0; }
.m-5 { margin: 5px; }
.m-10 { margin: 10px; }
.m-15 { margin: 15px; }
.m-20 { margin: 20px; }

.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }

.mb-5 { margin-bottom: 5px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }

.ml-5 { margin-left: 5px; }
.ml-10 { margin-left: 10px; }
.ml-15 { margin-left: 15px; }
.ml-20 { margin-left: 20px; }

.mr-5 { margin-right: 5px; }
.mr-10 { margin-right: 10px; }
.mr-15 { margin-right: 15px; }
.mr-20 { margin-right: 20px; }

.p-0 { padding: 0; }
.p-5 { padding: 5px; }
.p-10 { padding: 10px; }
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }

.pt-5 { padding-top: 5px; }
.pt-10 { padding-top: 10px; }
.pt-15 { padding-top: 15px; }
.pt-20 { padding-top: 20px; }

.pb-5 { padding-bottom: 5px; }
.pb-10 { padding-bottom: 10px; }
.pb-15 { padding-bottom: 15px; }
.pb-20 { padding-bottom: 20px; }

.pl-5 { padding-left: 5px; }
.pl-10 { padding-left: 10px; }
.pl-15 { padding-left: 15px; }
.pl-20 { padding-left: 20px; }

.pr-5 { padding-right: 5px; }
.pr-10 { padding-right: 10px; }
.pr-15 { padding-right: 15px; }
.pr-20 { padding-right: 20px; }

/* 字体大小类 */
.font-12 { font-size: 12px; }
.font-14 { font-size: 14px; }
.font-16 { font-size: 16px; }
.font-18 { font-size: 18px; }
.font-20 { font-size: 20px; }
.font-24 { font-size: 24px; }
.font-28 { font-size: 28px; }
.font-32 { font-size: 32px; }

/* 颜色类 */
.color-333 { color: #333; }
.color-666 { color: #666; }
.color-999 { color: #999; }
.color-ccc { color: #ccc; }
.color-white { color: #fff; }
.color-black { color: #000; }
.color-red { color: #f44336; }
.color-orange { color: #ff5722; }
.color-blue { color: #2196f3; }
.color-green { color: #4caf50; }

.bg-white { background-color: #fff; }
.bg-gray { background-color: #f5f5f5; }
.bg-dark { background-color: #333; }
.bg-red { background-color: #f44336; }
.bg-orange { background-color: #ff5722; }
.bg-blue { background-color: #2196f3; }
.bg-green { background-color: #4caf50; }

/* 边框类 */
.border { border: 1px solid #e0e0e0; }
.border-top { border-top: 1px solid #e0e0e0; }
.border-bottom { border-bottom: 1px solid #e0e0e0; }
.border-left { border-left: 1px solid #e0e0e0; }
.border-right { border-right: 1px solid #e0e0e0; }

.border-radius { border-radius: 4px; }
.border-radius-circle { border-radius: 50%; }

/* 阴影类 */
.shadow { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 4px 8px rgba(0,0,0,0.15); }

/* 按钮基础样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background-color: #ff5722;
    border-color: #ff5722;
    color: #fff;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.btn-light {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    color: #212529;
}

.btn-dark {
    background-color: #343a40;
    border-color: #343a40;
    color: #fff;
}

.btn-outline-primary {
    background-color: transparent;
    border-color: #ff5722;
    color: #ff5722;
}

.btn-outline-primary:hover {
    background-color: #ff5722;
    color: #fff;
}

/* 表单样式 */
.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #ff5722;
    box-shadow: 0 0 0 0.2rem rgba(255, 87, 34, 0.25);
}

/* 容器类 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-fluid {
    width: 100%;
    padding: 0 15px;
}

/* 网格系统 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* 响应式断点 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .row {
        margin: 0 -10px;
    }
    
    .col {
        padding: 0 10px;
    }
    
    /* 移动端下所有列都变成全宽 */
    [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 工具类 */
.w-100 { width: 100%; }
.h-100 { height: 100%; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-baseline { align-items: baseline; }
.align-items-stretch { align-items: stretch; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

.user-select-none { user-select: none; }

/* 动画类 */
.transition { transition: all 0.3s ease; }
.transition-fast { transition: all 0.15s ease; }
.transition-slow { transition: all 0.5s ease; }

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 87, 34, 0.3);
    border-radius: 50%;
    border-top-color: #ff5722;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 提示框样式 */
.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}
