/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

header p {
    text-align: center;
    opacity: 0.8;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 1rem;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
}

.main-content {
    min-height: 70vh;
}

footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    border-top: 1px solid #ddd;
    color: #666;
}

/* 表单样式 */
.auth-forms {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.form-container {
    background: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.form-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    width: 100%;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

/* 后台仪表盘样式 */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item .label {
    font-weight: bold;
}

.info-item .value {
    color: #3498db;
}

.address-info {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.address-info p {
    margin-bottom: 0.5rem;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f4f4f4;
    font-weight: bold;
}

table tr:hover {
    background: #f9f9f9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-forms {
        flex-direction: column;
        align-items: center;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 5px 0;
    }
}


/* packages.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #2980b9;
}



/* forecast.php--添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}


/* member_info 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}


/* balance.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}


/* import_orders.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}

/* profile.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}


/* change_password.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}


/* recharge.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}


/* transaction.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}


/* points.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}

/* coupons.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}


/* sidebar.php 左侧菜单栏样式 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #34495e;
    text-align: center;
}

.sidebar-header h3 {
    margin: 0;
    color: white;
    font-size: 1.2rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-category {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
    color: #bdc3c7;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
}

.menu-category:first-child {
    margin-top: 0;
}

.menu-item {
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.menu-item:hover {
    background: #34495e;
    border-left-color: #3498db;
}

.menu-item.active {
    background: #34495e;
    border-left-color: #3498db;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
}

.menu-item a:hover {
    color: white;
}

.menu-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.menu-text {
    flex: 1;
}

.menu-item.logout {
    margin-top: 2rem;
    border-top: 1px solid #34495e;
}

.menu-item.logout a {
    color: #e74c3c;
}

.menu-item.logout:hover {
    background: #c0392b;
    border-left-color: #c0392b;
}

.menu-item.logout:hover a {
    color: white;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    z-index: 1100;
    font-size: 1.2rem;
}

/* 主要内容区域 */
.main-content-with-sidebar {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
    background: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content-with-sidebar {
        margin-left: 0;
        padding: 1rem;
    }
    
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .overlay.open {
        display: block;
    }
}

/* address.php 添加到现有的CSS文件中 */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: #2980b9;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}