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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* 登录页面样式 - 已移至 login.css */

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* 顶部导航栏 */
.top-header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
}

.logo svg {
    color: #007bff;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-switch {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

.search-box svg {
    position: absolute;
    right: 10px;
    color: #666;
}

.header-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-icons span {
    font-size: 18px;
    cursor: pointer;
}

/* 用户下拉菜单 */
.user-menu-wrapper {
    position: relative;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown-menu.show {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.user-dropdown-menu a:hover {
    background: #f5f5f5;
    color: #007bff;
}

/* 主容器 */
.main-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: #f8f9fa;
    padding: 20px;
    min-height: calc(100vh - 70px);
}

.sidebar-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-group {
    margin-bottom: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 4px;
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.nav-item:hover {
    background: #e9ecef;
    color: #007bff;
}

.nav-item.active {
    background: #007bff;
    color: white;
}

.nav-item.active:hover {
    background: #0056b3;
    color: white;
}

.nav-item-level1 {
    font-weight: 500;
}

.nav-item-level2 {
    padding-left: 30px;
    font-size: 14px;
    font-weight: normal;
}

.nav-item-level2:hover {
    background: #e9ecef;
    color: #007bff;
}

.nav-item-level2.active {
    background: #e3f2fd;
    color: #007bff;
    font-weight: 500;
}

.nav-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Font Awesome 图标尺寸类 */
.fs-16 {
    font-size: 16px !important;
}

/* Material Icons 样式 */
.nav-icon .material-icons {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

/* 侧边栏图标居中对齐 */
.nav-icon i {
    display: inline-block;
    line-height: 1;
}

.nav-arrow {
    margin-left: auto;
    font-size: 12px;
    color: #666;
    transition: transform 0.2s;
}

.nav-submenu {
    background: #f0f0f0;
    border-radius: 4px;
    margin-top: 2px;
    padding: 5px 0;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 30px;
}

/* 推广横幅 */
.promo-banner {
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    color: white;
    flex-wrap: wrap;
    gap: 15px;
}

.promo-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.promo-item.highlight {
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 4px;
}

.promo-badge {
    background: #ff6b6b;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}

.contact-btn {
    background: #ff9800;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-btn:hover {
    background: #e68900;
}

.download-btn {
    background: #4caf50;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-left: 15px;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #45a049;
}

/* 信息卡片 */
.info-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-card h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item label {
    display: block;
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-value {
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance {
    color: #dc3545;
    font-size: 24px;
}

.recharge-btn {
    background: #dc3545;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.recharge-btn:hover {
    background: #c82333;
}

.more-btn {
    background: #ff9800;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.more-btn:hover {
    background: #e68900;
}

/* 产品网格 */
.products-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.product-card {
    background: white;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.product-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

/* Font Awesome 图标样式 */
.product-icon i {
    font-size: 20px;
    color: white;
}

/* 背景色类 */
.product-icon.bg-share-alt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-icon.bg-random {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.product-icon.bg-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.product-icon.bg-apple {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
}

.product-icon.bg-facebook {
    background: linear-gradient(135deg, #4267B2 0%, #385898 100%);
}

.product-icon.bg-twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
}

.product-icon.bg-android {
    background: linear-gradient(135deg, #3DDC84 0%, #07C160 100%);
}

.product-card h3 {
    font-size: 13px;
    margin: 0;
    line-height: 1.3;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-points {
    color: #dc3545;
    font-size: 11px;
    margin: 0;
    flex: 1;
}

.use-btn {
    padding: 5px 12px;
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 4px;
    font-size: 11px;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.use-btn:hover {
    background: #dc3545;
    color: white;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* 响应式 */
@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        transition: left 0.3s;
        z-index: 999;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

