
/* 积分商城系统样式 - 基于RuoYi风格 */
:root {
    /* 主题颜色 */
    --primary-color: #409eff;
    --success-color: #67c23a;
    --warning-color: #e6a23c;
    --danger-color: #f56c6c;
    --info-color: #909399;
    
    /* 文本颜色 */
    --text-primary: #303133;
    --text-regular: #606266;
    --text-secondary: #909399;
    --text-placeholder: #c0c4cc;
    --text-disabled: #c0c4cc;
    
    /* 边框颜色 */
    --border-color: #dcdfe6;
    --border-light: #e4e7ed;
    --border-lighter: #ebeef5;
    --border-extra-light: #f2f6fc;
    
    /* 背景颜色 */
    --background: #f5f7fa;
    --background-light: #f9fafc;
    --background-lighter: #ffffff;
    
    /* 侧边栏颜色 */
    --sidebar-bg: #304156;
    --sidebar-text: #bfcbd9;
    --sidebar-active: #409eff;
    --sidebar-hover: #263445;
    --sidebar-submenu-bg: #1f2d3d;
    
    /* 阴影 */
    --box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    --box-shadow-base: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
    --box-shadow-dark: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .12);
    
    /* 字体大小 */
    --font-size-extra-large: 20px;
    --font-size-large: 18px;
    --font-size-medium: 16px;
    --font-size-base: 14px;
    --font-size-small: 13px;
    --font-size-extra-small: 12px;
    
    /* 圆角 */
    --border-radius-base: 4px;
    --border-radius-small: 2px;
    --border-radius-round: 20px;
    --border-radius-circle: 100%;
    
    /* 间距 */
    --spacing-mini: 4px;
    --spacing-small: 8px;
    --spacing-base: 12px;
    --spacing-medium: 16px;
    --spacing-large: 24px;
    --spacing-extra-large: 32px;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-regular);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
  }
  
  .container {
    display: flex;
    min-height: 100vh;
  }
  
  /* 管理员后台样式 */
  .sidebar {
    width: 220px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: width 0.3s;
    overflow-y: auto;
    box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
    z-index: 10;
  }
  
  .sidebar-logo {
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid #1f2d3d;
  }
  
  .sidebar-menu {
    padding: 10px 0;
  }
  
  .menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .menu-item:hover {
    background-color: #263445;
    color: #fff;
  }
  
  .menu-item.active {
    background-color: #263445;
    color: var(--sidebar-active);
    border-right: 3px solid var(--sidebar-active);
  }
  
  .menu-item i {
    margin-right: 10px;
    font-size: 16px;
  }
  
  .submenu {
    padding-left: 20px;
    background-color: #1f2d3d;
    overflow: hidden;
  }
  
  /* Main Content */
  .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
  }
  
  /* Header */
  .header {
    height: 50px;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    display: flex;
    align-items: center;
    padding: 0 15px;
    justify-content: space-between;
    position: relative;
  }
  
  .header-left {
    display: flex;
    align-items: center;
  }
  
  .toggle-btn {
    padding: 0 15px;
    cursor: pointer;
    font-size: 16px;
  }
  
  .breadcrumb {
    display: flex;
    align-items: center;
    margin-left: 10px;
  }
  
  .breadcrumb-item {
    display: flex;
    align-items: center;
  }
  
  .breadcrumb-item:not(:last-child):after {
    content: '/';
    margin: 0 8px;
    color: var(--text-secondary);
  }
  
  .header-right {
    display: flex;
    align-items: center;
  }
  
  .header-item {
    padding: 0 10px;
    cursor: pointer;
    position: relative;
  }
  
  .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ccc;
    margin-right: 8px;
  }
  
  /* Content */
  .content {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
  }
  
  .page-header {
    margin-bottom: 15px;
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  }
  
  .page-title {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 10px;
  }
  
  .page-content {
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  }
  
  /* Card */
  .card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    margin-bottom: 15px;
  }
  
  .card-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .card-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
  }
  
  .card-body {
    padding: 15px;
  }
  
  /* Form */
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-primary);
  }
  
  .form-control {
    width: 100%;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s;
  }
  
  .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
  }
  
  /* Button */
  .btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    outline: none;
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    color: #fff;
  }
  
  .btn-primary:hover {
    background-color: #66b1ff;
  }
  
  .btn-success {
    background-color: var(--success-color);
    color: #fff;
  }
  
  .btn-success:hover {
    background-color: #85ce61;
  }
  
  .btn-warning {
    background-color: var(--warning-color);
    color: #fff;
  }
  
  .btn-warning:hover {
    background-color: #ebb563;
  }
  
  .btn-danger {
    background-color: var(--danger-color);
    color: #fff;
  }
  
  .btn-danger:hover {
    background-color: #f78989;
  }
  
  .btn-info {
    background-color: var(--info-color);
    color: #fff;
  }
  
  .btn-info:hover {
    background-color: #a6a9ad;
  }
  
  /* 防止按钮文字换行 */
  .btn {
    white-space: nowrap;
  }
  
  /* Table */
  .table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-light);
  }
  
  .table th,
  .table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
  }
  
  .table th {
    background-color: #fafafa;
    color: var(--text-primary);
    font-weight: 500;
  }
  
  .table tr:hover {
    background-color: #f5f7fa;
  }
  
  /* 操作列样式 */
  .table .action-column {
    white-space: nowrap;
    min-width: 120px;
  }
  
  .table .action-column .btn {
    margin-right: 5px;
    margin-bottom: 2px;
  }
  
  /* Pagination */
  .pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 15px;
  }
  
  .page-item {
    margin: 0 5px;
  }
  
  .page-link {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .page-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
  }
  
  /* 移动端样式 */
  .mobile-container {
    max-width: 750px;
    margin: 0 auto;
    background-color: #f7f7f7;
    min-height: 100vh;
    position: relative;
  }
  
  .mobile-header {
    background-color: #fff;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    flex: 1;
  }
  
  .mobile-search {
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 8px 15px;
    margin: 10px 15px;
    display: flex;
    align-items: center;
  }
  
  .mobile-search i {
    color: #999;
    margin-right: 5px;
  }
  
  .mobile-search input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 14px;
  }
  
  .mobile-banner {
    padding: 10px 15px;
  }
  
  .mobile-banner img {
    width: 100%;
    border-radius: 8px;
  }
  
  .mobile-section {
    margin: 15px 0;
    background-color: #fff;
    padding: 15px;
  }
  
  .mobile-section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-section-more {
    font-size: 12px;
    color: #999;
  }
  
  .mobile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  
  .mobile-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .mobile-grid-item {
    text-align: center;
  }
  
  .mobile-grid-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #fff;
  }
  
  .mobile-grid-text {
    font-size: 12px;
    color: #333;
  }
  
  .mobile-product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .mobile-product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-product-img {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
  }
  
  .mobile-product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .mobile-product-info {
    padding: 10px;
  }
  
  .mobile-product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  .mobile-product-price {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 16px;
  }
  
  .mobile-product-price span {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
  }
  
  .mobile-product-item .mobile-product-exchanged {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    background-color: #ff6b6b !important;
    color: #fff !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    font-weight: bold !important;
    z-index: 10 !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }
  
  .mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    display: flex;
    border-top: 1px solid #eee;
    z-index: 100;
  }
  
  .mobile-footer-item {
      flex: 1;
      text-align: center;
      padding: 8px 0;
      color: #999;
      text-decoration: none;
  }
  
  .mobile-footer-item.active {
    color: var(--primary-color);
  }
  
  .mobile-footer-icon {
    font-size: 20px;
    margin-bottom: 2px;
  }
  
  .mobile-footer-text {
    font-size: 12px;
  }
  
  /* 用户中心 */
  .user-header {
    background-color: #409eff;
    padding: 20px 15px;
    color: #fff;
    display: flex;
    align-items: center;
  }
  
  .user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #fff;
    margin-right: 15px;
    overflow: hidden;
  }
  
  .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .user-info {
    flex: 1;
  }
  
  .user-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
  }
  
  .user-level {
    font-size: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
  }
  
  .user-menu {
    background-color: #fff;
    margin-bottom: 10px;
  }
  
  .user-menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
  }
  
  .user-menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #409eff;
  }
  
  .user-menu-title {
    flex: 1;
    font-size: 15px;
  }
  
  .user-menu-arrow {
    color: #ccc;
  }
  
  /* 订单状态 */
  .order-status {
    display: flex;
    background-color: #fff;
    padding: 15px 0;
    margin-bottom: 10px;
  }
  
  .order-status-item {
    flex: 1;
    text-align: center;
  }
  
  .order-status-icon {
    font-size: 24px;
    margin-bottom: 5px;
    color: #999;
  }
  
  .order-status-text {
    font-size: 12px;
  }
  
  /* 积分兑换 */
  .points-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .points-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .points-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ff9500;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin-right: 10px;
  }
  
  .points-info {
    flex: 1;
  }
  
  .points-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
  }
  
  .points-subtitle {
    font-size: 12px;
    color: #999;
  }
  
  .points-value {
    font-size: 24px;
    font-weight: bold;
    color: #ff9500;
  }
  
  .points-actions {
    display: flex;
    border-top: 1px solid #f5f5f5;
    padding-top: 15px;
    margin-top: 15px;
  }
  
  .points-action {
    flex: 1;
    text-align: center;
  }
  
  .points-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    margin: 0 auto 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #409eff;
  }
  
  .points-action-text {
    font-size: 12px;
  }
  
  /* 模态框样式 */
  .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease-out;
  }
  
  @keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: scale(0.9) translateY(-20px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
  }
  
  .modal-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
  }
  
  .modal-close {
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
  }
  
  .modal-close:hover {
    color: var(--text-primary);
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--border-light);
  }
  
  /* 图片上传样式 */
  .image-upload-container {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-base);
    padding: 15px;
    background-color: #fafafa;
  }
  
  .image-preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
  }
  
  .image-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-base);
    overflow: hidden;
    background-color: #fff;
  }
  
  .image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: rgba(245, 108, 108, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
  }
  
  .image-remove:hover {
    background-color: var(--danger-color);
  }
  
  .image-upload-placeholder {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.3s;
    color: var(--text-secondary);
  }
  
  .image-upload-placeholder:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #f0f9ff;
  }
  
  .image-upload-placeholder i {
    font-size: 24px;
    margin-bottom: 8px;
  }
  
  .image-upload-placeholder span {
    font-size: 12px;
    text-align: center;
  }
  
  .image-upload-info {
    color: var(--text-secondary);
    font-size: 12px;
  }
  
  /* 响应式设计 */
  @media (max-width: 768px) {
    .sidebar {
      width: 60px;
    }
    
    .sidebar-logo {
      justify-content: center;
      padding: 0;
    }
    
    .menu-item span {
      display: none;
    }
    
    .menu-item i {
      margin-right: 0;
    }
    
    .submenu {
      padding-left: 0;
    }
    
    .form-group {
      flex: 0 0 100% !important;
    }
    
    .card-header {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .card-header .btn-group {
      margin-top: 10px;
    }
    
    .table {
      display: block;
      overflow-x: auto;
    }
  }
  