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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 140px);
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    color: #fff;
    padding: 0;
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
    letter-spacing: 0.5px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo::before {
    content: '🛍️';
    font-size: 32px;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav a:hover::before {
    width: 300px;
    height: 300px;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav a:active {
    transform: translateY(0);
}

/* 登录/退出按钮特殊样式 */
.nav a[href*="login"],
.nav a[href*="logout"] {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.nav a[href*="login"]:hover,
.nav a[href*="logout"]:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 个人中心按钮特殊样式 */
.nav a[href*="profile"] {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.nav a[href*="profile"]:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 响应式设计 - 汉堡菜单 */
@media (max-width: 768px) {
    .header-content {
        height: 60px;
        padding: 0 15px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo::before {
        font-size: 22px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
        flex-direction: column;
        align-items: stretch;
        padding: 20px 0;
        gap: 0;
        box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav.active {
        transform: translateX(0);
    }
    
    .nav a {
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 0;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        display: block;
    }
    
    .nav a:last-child {
        border-bottom: none;
    }
    
    .nav a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
    }
    
    .nav a::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-content {
        height: 55px;
        padding: 0 12px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo::before {
        font-size: 20px;
    }
    
    .hamburger {
        width: 26px;
        height: 26px;
    }
    
    .nav {
        top: 55px;
    }
    
    .nav a {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* 底部样式 */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* 搜索栏 */
.search-bar {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
}

.search-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.3);
}

.search-btn:hover {
    background: linear-gradient(135deg, #ff8a8e 0%, #febfef 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.4);
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.category-tab {
    padding: 8px 20px;
    background-color: #fff;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}

.category-tab:hover,
.category-tab.active {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.3);
}

/* 产品列表 */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.product-category {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price {
    color: #ff9a9e;
    font-size: 20px;
    font-weight: bold;
}

.original-price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
}

/* 产品详情 */
.product-detail {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
}

.product-swiper {
    margin-bottom: 20px;
}

.swiper {
    width: 100%;
    height: 400px;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.product-info h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.product-info .product-category {
    color: #999;
    margin-bottom: 15px;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.text {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
}

/* 富文本内容样式 */
.rich-text {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    min-height: 50px;
}

.rich-text:empty::before {
    content: "暂无商品详情";
    color: #999;
    font-style: italic;
}

.rich-text p {
    margin-bottom: 15px;
}

.rich-text p:last-child {
    margin-bottom: 0;
}

.rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

.rich-text img[src^="data:image"] {
    max-width: 100%;
    height: auto;
}

.rich-text img[src^="uploads/"],
.rich-text img[src^="/uploads/"],
.rich-text img[src^="../uploads/"] {
    max-width: 100%;
    height: auto;
    display: block;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
    margin-top: 20px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.rich-text h1 { font-size: 28px; }
.rich-text h2 { font-size: 24px; }
.rich-text h3 { font-size: 20px; }
.rich-text h4 { font-size: 18px; }
.rich-text h5 { font-size: 16px; }
.rich-text h6 { font-size: 14px; }

.rich-text ul,
.rich-text ol {
    margin: 15px 0;
    padding-left: 30px;
}

.rich-text li {
    margin-bottom: 8px;
}

.rich-text a {
    color: #ff9a9e;
    text-decoration: none;
}

.rich-text a:hover {
    text-decoration: underline;
}

.rich-text strong {
    font-weight: bold;
}

.rich-text em {
    font-style: italic;
}

.rich-text u {
    text-decoration: underline;
}

/* 商家信息 */
.merchant-info .merchant-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.merchant-info .merchant-item:last-child {
    border-bottom: none;
}

.merchant-info .label {
    width: 120px;
    font-weight: 500;
    color: #666;
}

.merchant-info .value {
    flex: 1;
    color: #333;
}

.merchant-info .value.link {
    color: #ff9a9e;
    text-decoration: none;
}

.merchant-info .value.link:hover {
    text-decoration: underline;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-favorite,
.btn-share {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-favorite {
    background-color: #f5f5f5;
    color: #666;
}

.btn-favorite.active {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
}

.btn-share {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
}

.btn-favorite:hover,
.btn-share:hover {
    opacity: 0.9;
}

/* 个人中心 */
.user-header {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #fff;
}

.user-avatar-wrapper {
    position: relative;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    transition: all 0.3s ease;
}

.user-avatar:hover .avatar-upload-overlay {
    display: flex;
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.upload-text {
    font-size: 12px;
    font-weight: 500;
}

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

.user-desc {
    opacity: 0.9;
}

.menu-list {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.menu-item {
    border-bottom: 1px solid #f5f5f5;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.menu-item a:hover {
    background-color: #f5f5f5;
}

.menu-icon {
    width: 40px;
    font-size: 24px;
    margin-right: 15px;
}

.menu-text {
    flex: 1;
    font-size: 16px;
}

.menu-badge {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-right: 10px;
}

.arrow {
    color: #ccc;
}

.stats-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
}

.stats-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.stats-list {
    display: flex;
    justify-content: space-around;
}

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

.stats-value {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #ff9a9e;
    margin-bottom: 5px;
}

.stats-label {
    font-size: 14px;
    color: #999;
}

/* 分类列表 */
.category-list {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.category-item {
    border-bottom: 1px solid #f5f5f5;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item a {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.category-item a:hover {
    background-color: #f5f5f5;
}

.category-icon {
    width: 50px;
    height: 50px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #ff9a9e;
}

.category-info {
    flex: 1;
}

.category-name {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.category-count {
    font-size: 14px;
    color: #999;
}

/* 收藏列表 */
.favorites-list {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.favorites-list .product-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.favorites-list .product-item:last-child {
    border-bottom: none;
}

.favorites-list .product-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    margin-right: 15px;
}

.favorites-list .product-info {
    flex: 1;
    padding: 0;
}

.remove-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 管理员页面 */
.admin-header {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #fff;
}

.admin-header h1 {
    font-size: 32px;
}

.admin-menu {
    margin-bottom: 20px;
}

.admin-menu .menu-item {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-menu .menu-content {
    flex: 1;
}

.menu-title {
    display: block;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.menu-desc {
    display: block;
    font-size: 14px;
    color: #999;
}

.stats-section {
    margin-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stats-grid .stats-card {
    text-align: center;
    padding: 30px;
}

.stats-grid .stats-value {
    font-size: 36px;
    color: #ff9a9e;
}

/* 产品管理 */
.header-actions {
    margin-bottom: 20px;
}

.btn-add {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.3);
}

.btn-add:hover {
    background: linear-gradient(135deg, #ff8a8e 0%, #febfef 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.4);
}

.product-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
}

.btn-edit,
.btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-edit {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #ff8a8e 0%, #febfef 100%);
    transform: translateY(-2px);
}

.btn-delete {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #ff5b5b 0%, #ff7e7e 100%);
    transform: translateY(-2px);
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    color: #fff;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    opacity: 0.9;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    max-height: calc(90vh - 200px);
    background-color: #fafafa;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.form-item {
    margin-bottom: 20px;
}

.form-item:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-item-half {
    flex: 1;
}

.form-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-required {
    color: #ff9a9e;
    margin-left: 2px;
}

.form-optional {
    color: #999;
    font-weight: normal;
    font-size: 12px;
    margin-left: 4px;
}

.form-item input,
.form-item select,
.form-item textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: #fff;
}

.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
    outline: none;
    border-color: #ff9a9e;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
    appearance: none;
    cursor: pointer;
}

.form-item textarea {
    min-height: 100px;
    resize: vertical;
}

/* 文件上传样式 */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.file-label:hover {
    border-color: #ff9a9e;
    background-color: #f5f7ff;
}

.file-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.file-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.file-hint {
    font-size: 12px;
    color: #999;
}

.file-input:focus + .file-label {
    border-color: #ff9a9e;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 当前图片预览 */
.current-image-preview {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.preview-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.preview-image-wrapper {
    text-align: center;
    margin: 10px 0;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-hint {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    text-align: center;
}

/* 复选框样式 */
.checkbox-wrapper {
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.checkbox-input:checked + .checkbox-custom {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-color: #ff9a9e;
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #f5f5f5;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
}

.btn-cancel,
.btn-save {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    min-height: 44px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-cancel {
    background-color: #f5f5f5;
    color: #666;
}

.btn-cancel:hover {
    background-color: #e0e0e0;
}

.btn-save {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 154, 158, 0.3);
}

.btn-save:hover {
    background: linear-gradient(135deg, #ff8a8e 0%, #febfef 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.4);
}

/* 用户管理 */
.user-list {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.user-item:last-child {
    border-bottom: none;
}

.user-item .user-avatar {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

.user-item .user-info {
    flex: 1;
}

.user-item .user-name {
    font-size: 18px;
    margin-bottom: 5px;
}

.user-item .user-time {
    font-size: 14px;
    color: #999;
}

.user-item .user-actions {
    display: flex;
    gap: 10px;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.login-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-box h2 {
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

/* 登录标签页 */
.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 16px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: #ff9a9e;
    border-bottom-color: #ff9a9e;
}

.tab-btn:hover {
    color: #ff9a9e;
}

.auth-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

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

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.login-tip {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 14px;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #2e7d32;
}

.message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 16px;
}

/* 幻灯片轮播 */
.slideshow-container {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.slides-swiper {
    width: 100%;
    height: 400px;
}

.slides-swiper .swiper-slide {
    width: 100%;
    height: 100%;
}

.slides-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slides-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.slides-swiper .swiper-pagination {
    bottom: 20px;
}

.slides-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.8);
    opacity: 1;
}

.slides-swiper .swiper-pagination-bullet-active {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.slides-swiper .swiper-button-next,
.slides-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.slides-swiper .swiper-button-next:after,
.slides-swiper .swiper-button-prev:after {
    font-size: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .slides-swiper {
        height: 250px;
    }
    
    .slides-swiper .swiper-button-next,
    .slides-swiper .swiper-button-prev {
        display: none;
    }
}

