/* ========== 通用样式文件 common.css ========== */
/* ========== 基础重置 ========== */

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

html,
body {
    height: 100%;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== HTML标签重置 ========== */

ul,
li,
dl,
dt,
dd,
ol {
    list-style: none;
}

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

a:hover {
    color: #1E88E5;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: 100%;
    font-weight: normal;
}

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ========== 通用工具类 ========== */

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.fl {
    float: left;
}

.fr {
    float: right;
}

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

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

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

.mt10 {
    margin-top: 10px;
}

.mt20 {
    margin-top: 20px;
}

.mt30 {
    margin-top: 30px;
}

.mb10 {
    margin-bottom: 10px;
}

.mb20 {
    margin-bottom: 20px;
}

.mb30 {
    margin-bottom: 30px;
}

.ml10 {
    margin-left: 10px;
}

.mr10 {
    margin-right: 10px;
}

.pt10 {
    padding-top: 10px;
}

.pt20 {
    padding-top: 20px;
}

.pb10 {
    padding-bottom: 10px;
}

.pb20 {
    padding-bottom: 20px;
}

/* ========== 颜色类 ========== */

.text-blue {
    color: #1E88E5;
}

.text-green {
    color: #4CAF50;
}

.text-red {
    color: #F44336;
}

.text-gray {
    color: #999;
}

.text-white {
    color: #fff;
}

.bg-blue {
    background-color: #1E88E5;
}

.bg-green {
    background-color: #4CAF50;
}

.bg-red {
    background-color: #F44336;
}

.bg-white {
    background-color: #fff;
}

.bg-gray {
    background-color: #f5f5f5;
}

/* ========== 容器类 ========== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== 按钮样式 ========== */

.btn {
    display: inline-block;
    padding: 10px 30px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #1E88E5;
    color: #fff;
}

.btn-primary:hover {
    background-color: #1565C0;
}

.btn-success {
    background-color: #4CAF50;
    color: #fff;
}

.btn-success:hover {
    background-color: #388E3C;
}

.btn-danger {
    background-color: #F44336;
    color: #fff;
}

.btn-danger:hover {
    background-color: #D32F2F;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #1E88E5;
    color: #1E88E5;
}

.btn-outline:hover {
    background-color: #1E88E5;
    color: #fff;
}

/* ========== 卡片样式 ========== */

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ========== 阴影样式 ========== */

.shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ========== 圆角样式 ========== */

.radius {
    border-radius: 4px;
}

.radius-lg {
    border-radius: 8px;
}

.radius-full {
    border-radius: 50%;
}

/* ========== 过渡效果 ========== */

.transition {
    transition: all 0.3s ease;
}

/* ========== 图片悬停效果 ========== */

.img-hover {
    overflow: hidden;
}

.img-hover img {
    transition: transform 0.5s ease;
}

.img-hover:hover img {
    transform: scale(1.1);
}

/* ========== 标签样式 ========== */

.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 2px;
    background-color: #1E88E5;
    color: #fff;
}

.tag-hot {
    background-color: #F44336;
}

.tag-new {
    background-color: #4CAF50;
}

/* ========== 面包屑导航 ========== */

.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: #999;
}

.breadcrumbs a {
    color: #999;
}

.breadcrumbs a:hover {
    color: #1E88E5;
}

.breadcrumbs span {
    margin: 0 8px;
    color: #ddd;
}

/* ========== 分页样式 ========== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 34px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background-color: #1E88E5;
    border-color: #1E88E5;
    color: #fff;
}

/* ========== 加载动画 ========== */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 0;
}

.loading::before {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1E88E5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ========== 回到顶部按钮 ========== */

.back-to-top {
    position: fixed;
    bottom: 50px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #1E88E5;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #1565C0;
    transform: translateY(-5px);
}

/* ========== 广告样式 ========== */

.ad-banner {
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
}

.ad-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.ad-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.ad-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.ad-popup-close {
    position: absolute;
    top: -30px;
    right: 0;
    width: 30px;
    height: 30px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    color: #333;
}

.ad-float {
    position: fixed;
    width: 120px;
    z-index: 9999;
}

.ad-float-left {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.ad-float-right {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.ad-float-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

/* ========== 表格样式 ========== */

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
}

.table tr:hover {
    background-color: #f9f9f9;
}

/* ========== 输入框样式 ========== */

.input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: #1E88E5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* ========== 搜索框样式 ========== */

.search-box {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-box button {
    padding: 12px 30px;
    background-color: #1E88E5;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: #1565C0;
}

/* ========== 徽章样式 ========== */

.badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0 6px;
    font-size: 12px;
    background-color: #F44336;
    color: #fff;
    border-radius: 10px;
    text-align: center;
}

/* ========== 分割线 ========== */

.divider {
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}

.divider-dashed {
    border-top: 1px dashed #ddd;
    height: 0;
    margin: 20px 0;
}

/* ========== 工具提示 ========== */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 10px);
}

/* ========== 滚动条样式 ========== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* ========== 通用样式结束 ========== */