/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #337ab7;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

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

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}

.form-control:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

.btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

.btn-primary {
    color: #fff;
    background-color: #337ab7;
    border-color: #2e6da4;
}

.btn-success {
    color: #fff;
    background-color: #5cb85c;
    border-color: #4cae4c;
}

.btn-danger {
    color: #fff;
    background-color: #d9534f;
    border-color: #d43f3a;
}

.btn-info {
    color: #fff;
    background-color: #5bc0de;
    border-color: #46b8da;
}

.btn:hover {
    opacity: 0.9;
}

.label {
    display: inline;
    padding: 0.2em 0.6em 0.3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25em;
}

.label-success {
    background-color: #5cb85c;
}

.label-default {
    background-color: #777;
}

.input-group {
    position: relative;
    display: flex;
    border-collapse: separate;
}

.input-group-addon {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #555;
    text-align: center;
    background-color: #eee;
    border: 1px solid #ccc;
    white-space: nowrap;
}

.input-group-addon:first-child {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-addon:last-child {
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .form-control:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* 表格样式 */
.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 8px;
    line-height: 1.42857143;
    vertical-align: top;
    border-top: 1px solid #ddd;
    text-align: left;
}

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

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

.table-hover > tbody > tr:hover {
    background-color: #f5f5f5;
}

/* 管理系统样式 */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background-color: #263544;
    color: #fff;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.sidebar-header {
    padding: 15px;
    background-color: #222;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #333;
}

.sidebar-menu {
    padding: 15px 0;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 10px 15px;
    color: #a7b1c2;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: #fff;
    background-color: #1f2c39;
    border-left: 4px solid #1ab394;
}

.sidebar-menu li a i {
    margin-right: 10px;
}

.main-content {
    margin-left: 220px;
    padding: 15px;
    width: calc(100% - 220px);
}

.page-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    margin: 0;
    font-size: 24px;
}

.card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
}

.card-body {
    padding: 15px;
}

/* 仪表盘样式 */
.dashboard-stats {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.stat-card {
    flex: 1 1 200px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    margin: 10px;
    padding: 20px;
    text-align: center;
}

.stat-card h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.stat-card p {
    color: #777;
    margin: 0;
}

.stat-card.primary {
    border-top: 3px solid #337ab7;
}

.stat-card.success {
    border-top: 3px solid #5cb85c;
}

.stat-card.info {
    border-top: 3px solid #5bc0de;
}

.stat-card.warning {
    border-top: 3px solid #f0ad4e;
}

/* 分页样式 */
.pagination {
    display: inline-block;
    padding-left: 0;
    margin: 20px 0;
    border-radius: 4px;
}

.pagination li {
    display: inline;
}

.pagination li a,
.pagination li span {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #337ab7;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
}

.pagination li.active a,
.pagination li.active span {
    z-index: 2;
    color: #fff;
    cursor: default;
    background-color: #337ab7;
    border-color: #337ab7;
}

.pagination li.disabled a,
.pagination li.disabled span {
    color: #777;
    cursor: not-allowed;
    background-color: #fff;
    border-color: #ddd;
}

/* 警告框样式 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

.alert-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

/* 用户端移动样式 */
.user-mobile {
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px; /* 为底部导航栏留出空间 */
}

.user-header {
    background-color: #337ab7;
    color: #fff;
    padding: 15px;
    text-align: center;
}

.user-content {
    padding: 15px;
}

.user-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 10px 0;
}

.nav-item.active {
    color: #337ab7;
}

.nav-item i {
    display: block;
    font-size: 20px;
    margin-bottom: 5px;
}

/* 用户信息卡片 */
.user-card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    padding: 15px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: block;
    object-fit: cover;
}

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

.user-info h2 {
    margin-bottom: 5px;
}

.user-points {
    font-size: 24px;
    color: #f0ad4e;
    margin: 10px 0;
}

.user-level {
    display: inline-block;
    padding: 3px 8px;
    background-color: #5bc0de;
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .dashboard-stats {
        flex-direction: column;
    }
}
