/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.user-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.user-info a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.user-info a:hover {
    color: #3498db;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主内容区样式 */
main {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    min-height: calc(100vh - 160px);
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    text-decoration: none;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
}

/* 认证页面样式 */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.auth-container p {
    text-align: center;
    margin-top: 1.5rem;
}

/* 项目中心样式 */
.project-center {
    text-align: center;
    padding: 2rem 0;
}

.projects-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    width: 300px;
    text-align: left;
}

.project-card h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.project-btn {
    display: inline-block;
    margin-top: 1rem;
}

/* 个人中心样式 */
.profile-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.profile-section:last-child {
    border-bottom: none;
}

.profile-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.recharge-methods {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.recharge-method {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
}

.qr-code-container {
    margin-top: 1rem;
    text-align: center;
}

.qr-code {
    max-width: 200px;
    height: auto;
}

.pending-codes {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fff3cd;
    border-radius: 4px;
}

/* 余额明细表格样式 */
.balance-records {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.balance-records th,
.balance-records td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.balance-records th {
    background-color: #f5f7fa;
    font-weight: 500;
}

.positive {
    color: #27ae60;
}

.negative {
    color: #e74c3c;
}

/* 提示消息样式 */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    display: block;
    padding: 1rem;
    background-color: #dff0d8;
    color: #3c763d;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: opacity 0.5s ease;
}

/* 错误消息样式 */
.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
}

/* 底部样式 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 标签页样式 */
.tabs-container {
    margin-top: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: #e9ecef;
    color: #495057;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background-color: white;
}

.tab-content {
    display: none;
    padding: 25px;
    background-color: white;
}

.tab-content.active {
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .recharge-methods {
        flex-direction: column;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid #e1e5e9;
        border-right: none;
    }
    
    .tab-button.active {
        border-bottom: 3px solid #3498db;
    }
}