* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.logo {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-avatar-header {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
    background: transparent;
    padding: 2px;
}

.user-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid rgba(255,255,255,0.5);
    flex-shrink: 0;
    background: transparent;
    padding: 2px;
}

.header-right a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    color: #fff;
}

.user-info:hover {
    background: rgba(255,255,255,0.3);
}

.user-info .user-points,
.user-info .user-balance {
    font-size: 13px;
    white-space: nowrap;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1001;
    transition: left 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.side-menu.open {
    left: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.overlay.show {
    display: block;
}

.menu-header {
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.3);
}

.user-avatar img,
.user-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
}

.user-id {
    font-size: 12px;
    opacity: 0.8;
}

.menu-list {
    list-style: none;
    padding: 10px 0;
    padding-bottom: 0;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.menu-list li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.menu-list li a:hover,
.menu-list li a.active {
    background: #f5f7fa;
    color: #667eea;
}

.menu-list li a.logout {
    color: #dc3545;
}

.menu-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    margin-top: 10px;
    background: #f8f9fa;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    padding: 10px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    transition: all 0.3s;
}

.contact-link:hover {
    background: #667eea;
    color: #fff;
}

.contact-link .contact-icon {
    font-size: 18px;
}

.menu-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    transition: all 0.3s;
}

.menu-footer a:hover {
    background: #667eea;
    color: #fff;
}

.main-content {
    margin-top: 60px;
    padding: 20px;
    min-height: calc(100vh - 120px);
}

.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 24px;
    color: #333;
}

.page-header p {
    color: #666;
    margin-top: 5px;
}

.footer {
    text-align: center;
    padding: 20px;
    background: #fff;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f7fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
}

.auth-container {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
}

.section {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
}

.view-all {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.announcement-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.announcement-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.announcement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
}

.ann-type {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.ann-success { background: rgba(40, 167, 69, 0.3); }
.ann-warning { background: rgba(255, 193, 7, 0.3); }
.ann-info { background: rgba(255,255,255,0.2); }

.machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.machine-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.machine-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.machine-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machine-price .price {
    color: #dc3545;
    font-size: 18px;
    font-weight: 600;
}

.machine-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f5f7fa;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.quick-link:hover {
    background: #667eea;
    color: #fff;
}

.quick-link .icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.contact-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-box p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.contact-box a {
    color: #667eea;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    transition: all 0.3s;
}

.contact-box a:hover {
    background: #667eea;
    color: #fff;
}

.balance-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.balance-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.balance-item .label {
    color: #666;
    font-size: 14px;
}

.balance-item .value {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
    margin-top: 5px;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.package-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.package-card:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.package-amount {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
}

.package-get {
    color: #28a745;
    margin-top: 5px;
}

.package-bonus {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 8px;
}

.task-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-card.completed {
    opacity: 0.6;
}

.task-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.task-info p {
    color: #666;
    font-size: 14px;
}

.task-meta {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.badge {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.order-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}

.order-header {
    background: #f5f7fa;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.order-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.order-status.paid { background: #d4edda; color: #155724; }
.order-status.pending { background: #fff3cd; color: #856404; }
.order-status.expired { background: #f8d7da; color: #721c24; }

.order-body {
    padding: 20px;
}

.order-body h3 {
    margin-bottom: 10px;
}

.order-info {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.expire-time {
    margin-top: 10px;
    color: #dc3545;
    font-size: 14px;
}

.order-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}

.profile-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.profile-form {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.profile-form h3 {
    margin-bottom: 20px;
}

.seller-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #667eea;
    color: #fff;
}

.machine-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.machine-actions {
    display: flex;
    gap: 10px;
}

.pricing-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.pricing-row input {
    flex: 1;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkin-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.checkin-card h2 {
    margin-bottom: 10px;
}

.checkin-card p {
    margin-bottom: 20px;
}

#checkinStatus {
    margin-top: 15px;
    opacity: 0.8;
}

.cart-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.cart-summary .total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.total-price {
    font-size: 24px;
    font-weight: 600;
    color: #dc3545;
}

.points-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.points-value {
    font-size: 48px;
    font-weight: 600;
}

.points-label {
    display: block;
    margin-top: 10px;
    opacity: 0.8;
}

.mall-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.item-icon {
    font-size: 32px;
}

.item-name {
    flex: 1;
}

.success-box, .pending-box, .rejected-box, .apply-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.success-box { border: 2px solid #28a745; }
.pending-box { border: 2px solid #ffc107; }
.rejected-box { border: 2px solid #dc3545; }

.withdraw-form {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.withdraw-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.detail-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #667eea;
    text-decoration: none;
}

.detail-name {
    font-size: 24px;
    margin-bottom: 10px;
}

.detail-desc {
    color: #666;
    margin-bottom: 20px;
}

.detail-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item .label {
    color: #999;
    font-size: 12px;
}

.info-item .value {
    font-size: 16px;
    margin-top: 5px;
}

.pricing-section {
    margin-bottom: 30px;
}

.pricing-section h3 {
    margin-bottom: 15px;
}

.pricing-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.pricing-option {
    cursor: pointer;
}

.pricing-option input {
    display: none;
}

.pricing-option .option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.pricing-option input:checked + .option-content {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.pricing-option .days {
    font-weight: 600;
}

.pricing-option .price {
    color: #dc3545;
    margin-top: 5px;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.world-container {
    max-width: 800px;
    margin: 0 auto;
}

.chat-box {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.message {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
}

.message.user {
    background: #e3f2fd;
}

.message.system {
    background: #fff3cd;
}

.msg-user {
    font-weight: 600;
    margin-right: 10px;
}

.msg-content {
    display: block;
    margin: 5px 0;
}

.msg-time {
    font-size: 12px;
    color: #999;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

/* Toast 提示样式 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 9999;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast-success {
    background: #28a745;
    color: #fff;
}

.toast-error {
    background: #dc3545;
    color: #fff;
}

.toast-info {
    background: #333;
    color: #fff;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 试用按钮样式 */
.btn-trial {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
}

.btn-trial:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* 个人中心容器 */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

/* 待结算样式 */
.stat-item.pending .stat-value {
    color: #ffc107;
}

/* 管理后台移动端菜单按钮 */
.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .balance-card,
    .profile-stats,
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-info {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    /* 管理后台响应式 */
    .admin-menu-toggle {
        display: block;
    }
    
    .admin-sidebar {
        left: -220px;
        transition: left 0.3s;
        z-index: 1000;
    }
    
    .admin-sidebar.open {
        left: 0;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .admin-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .admin-overlay.show {
        display: block;
    }
    
    /* 购物车底部栏优化 */
    .cart-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
    }
}

@media (max-width: 480px) {
    .balance-card,
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .machine-grid {
        grid-template-columns: 1fr;
    }
    
    .package-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
