/* css/style.css */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    color: #4a6bff;
    font-size: 28px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

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

.nav a {
    text-decoration: none;
    color: #666;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.nav a:hover {
    background: #f5f5f5;
    color: #333;
}

.nav a.active {
    background: #4a6bff;
    color: white;
}

.nav a.active:hover {
    background: #3a5bff;
}

.welcome-text {
    color: #666;
    margin-right: 10px;
    font-size: 14px;
}

.welcome-text strong {
    color: #333;
}

/* 按钮样式 */
.btn-primary, .btn-secondary, .btn-success, .btn-warning, .btn-error {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #4a6bff;
    color: white;
}

.btn-primary:hover {
    background: #3a5bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 107, 255, 0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

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

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

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* 英雄区域 */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 80px 30px;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    text-align: center;
}

/* 功能卡片 */
.features-grid, .modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 60px 30px;
}

.feature-card, .module-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover, .module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #4a6bff;
}

.feature-card::before, .module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #4a6bff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before, .module-card:hover::before {
    transform: scaleX(1);
}

.feature-card i, .module-card i {
    color: #4a6bff;
    margin-bottom: 25px;
}

.feature-card h3, .module-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p, .module-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 套餐卡片 */
.plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px;
}

.plan-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    position: relative;
    border: 2px solid #eaeaea;
    transition: all 0.3s ease;
    text-align: center;
}

.plan-card.recommended {
    border-color: #4a6bff;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(74, 107, 255, 0.1);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #4a6bff;
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-card h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.plan-card .price {
    font-size: 2.5rem;
    color: #4a6bff;
    margin: 25px 0;
    font-weight: 700;
}

.plan-card .price .amount {
    font-weight: bold;
}

.plan-card .price .period {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

.plan-card .daily-price {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
}

.plan-card .features {
    margin: 25px 0;
    text-align: left;
    padding-left: 0;
}

.plan-card .features div {
    padding: 8px 0;
    color: #555;
    display: flex;
    align-items: center;
}

.plan-card .features i {
    color: #28a745;
    margin-right: 10px;
    font-size: 14px;
}

.plan-card .btn-primary {
    width: 100%;
    margin-top: 20px;
}

/* 会员中心布局 */
.member-dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 100px);
}

.sidebar {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 30px 20px;
}

.user-info {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 25px;
}

.avatar {
    margin-bottom: 20px;
}

.avatar i {
    color: #4a6bff;
}

.user-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.user-type {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.forever-badge {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.membership-info {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #b8d4ff;
}

.membership-info p {
    margin-bottom: 10px;
    color: #0066cc;
    font-size: 14px;
}

.membership-info strong {
    font-size: 18px;
    color: #0056b3;
}

.membership-info.expired {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.membership-info.expired p {
    color: #856404;
}

.forever-text {
    color: #28a745 !important;
}

.side-nav {
    margin-top: 20px;
}

.side-nav h4 {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-item:hover {
    background: #e9ecef;
    color: #4a6bff;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.vip-badge {
    background: #ffc107;
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: auto;
}

.quick-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

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

.content-header {
    margin-bottom: 40px;
}

.content-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-description {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

/* 警告提示 */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

.empty-state i {
    color: #ddd;
    margin-bottom: 25px;
}

.empty-state h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.empty-state p {
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* 个人资料卡片 */
.profile-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.profile-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-info {
    flex: 1;
}

.info-item {
    display: flex;
    margin-bottom: 15px;
    font-size: 15px;
}

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

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

.info-item .value {
    color: #333;
}

/* 页脚 */
.footer {
    background: #343a40;
    color: white;
    padding: 40px 30px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #adb5bd;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
    color: #adb5bd;
}

.footer-section ul li i {
    margin-right: 10px;
    width: 20px;
}

.footer-section a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: 14px;
}

/* 后台管理样式 */
.admin-dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 100px);
}

.admin-sidebar {
    background: #2c3e50;
    color: white;
    padding: 30px 20px;
}

.admin-user-info {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 25px;
}

.admin-user-info .avatar i {
    color: #4a6bff;
    font-size: 40px;
}

.admin-user-info h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.admin-user-info p {
    color: #bdc3c7;
    font-size: 14px;
}

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

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #bdc3c7;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 14px;
}

.admin-nav a:hover {
    background: #34495e;
    color: white;
}

.admin-nav a.active {
    background: #4a6bff;
    color: white;
}

.admin-content {
    padding: 30px;
    background: #f8f9fa;
}

.admin-content-header {
    margin-bottom: 40px;
}

.admin-content-header h2 {
    font-size: 28px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #e7f3ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 24px;
    color: #4a6bff;
}

.stat-content h3 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 14px;
}

/* 表格样式 */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th, .user-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.user-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.user-table tbody tr:hover {
    background: #f8f9fa;
}

/* 徽章样式 */
.user-type-badge, .badge-success, .badge-secondary, .badge-error, .badge-current {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-type-badge.normal {
    background: #6c757d;
    color: white;
}

.user-type-badge.vip {
    background: #4a6bff;
    color: white;
}

.user-type-badge.special-vip {
    background: #28a745;
    color: white;
}

.user-type-badge.admin {
    background: #dc3545;
    color: white;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.badge-error {
    background: #f8d7da;
    color: #721c24;
}

.badge-current {
    background: #ffc107;
    color: #333;
    margin-left: 5px;
}

/* 批量操作 */
.batch-operations {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.batch-operations h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

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

.batch-operations label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.batch-operations input,
.batch-operations select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.batch-operations input:focus,
.batch-operations select:focus {
    outline: none;
    border-color: #4a6bff;
    box-shadow: 0 0 0 2px rgba(74, 107, 255, 0.1);
}

/* 登录/注册容器 */
.login-container, .register-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-header, .register-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2, .register-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.login-header p, .register-header p {
    color: #666;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4a6bff;
    box-shadow: 0 0 0 2px rgba(74, 107, 255, 0.1);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox input {
    width: auto;
}

.help-text {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.btn-login, .btn-register {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-top: 10px;
}

.login-footer, .register-footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
}

.login-footer a, .register-footer a {
    color: #4a6bff;
    text-decoration: none;
}

.login-footer a:hover, .register-footer a:hover {
    text-decoration: underline;
}

.password-strength {
    margin-top: 5px;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 60px 20px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .member-dashboard,
    .admin-dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar,
    .admin-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid,
    .modules-grid,
    .plans-container {
        grid-template-columns: 1fr;
        padding: 40px 20px;
    }
    
    .plan-card.recommended {
        transform: none;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        box-shadow: none;
    }
    
    .hero {
        padding: 40px 15px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .login-container,
    .register-container {
        margin: 50px auto;
        padding: 30px 20px;
    }
}