* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* 顶部导航栏 */
.header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 50px;
    width: auto;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 5px;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 横幅区域 */
.banner {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 50%, #dc143c 100%);
    color: white;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/banner.png') center/cover no-repeat;
    opacity: 0.15;
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.banner h2 {
    font-size: 42px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease;
}

.banner p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.3s both;
}

.banner-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    animation: fadeInUp 1s ease 0.6s both;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 25px 40px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

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

.stat-item .number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: #ffd700;
}

.stat-item .label {
    display: block;
    font-size: 16px;
    margin-top: 8px;
    opacity: 0.9;
}

/* 资讯列表区域 */
.news-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: #c41e3a;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #c41e3a, #ffd700);
    border-radius: 2px;
}

.section-title p {
    color: #666;
    font-size: 18px;
    margin-top: 20px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.2);
    border-color: #c41e3a;
}

.news-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.08);
}

.price-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #c41e3a, #ff4500);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.news-content {
    padding: 25px;
}

.news-content h3 {
    font-size: 18px;
    color: #222;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 54px;
}

.preview-text {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pay-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #c41e3a 0%, #ff4500 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pay-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.pay-btn:hover::before {
    width: 300px;
    height: 300px;
}

.pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

/* 付费弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideInDown 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    color: #c41e3a;
    transform: rotate(90deg);
}

.modal-header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    padding: 30px 30px 25px;
    text-align: center;
}

.modal-header h3 {
    font-size: 26px;
    margin-bottom: 10px;
}

.modal-header p {
    font-size: 16px;
    opacity: 0.95;
}

.modal-body {
    padding: 35px 30px;
    text-align: center;
}

.price-info {
    margin-bottom: 30px;
}

.price-info .price {
    font-size: 48px;
    font-weight: bold;
    color: #c41e3a;
}

.price-info .unit {
    font-size: 20px;
    color: #666;
    margin-left: 5px;
}

.qr-code-container {
    margin: 30px auto;
    max-width: 280px;
}

.qr-code-container img {
    width: 100%;
    height: auto;
    border: 3px solid #f0f0f0;
    border-radius: 12px;
    padding: 15px;
    background: white;
}

.scan-tip {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.payment-info {
    background: #fff8f0;
    border-left: 4px solid #ff8c00;
    padding: 20px;
    margin-top: 25px;
    border-radius: 8px;
    text-align: left;
}

.payment-info p {
    margin-bottom: 10px;
    color: #333;
}

.payment-info ul {
    list-style: none;
    padding-left: 0;
}

.payment-info li {
    padding: 5px 0;
    color: #666;
    font-size: 14px;
    position: relative;
    padding-left: 20px;
}

.payment-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

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

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #ffd700;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #c41e3a;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 10px;
    line-height: 1.8;
    font-size: 14px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
    font-size: 14px;
}

.footer-section a:hover {
    color: #ffd700;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 25px;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 13px;
    margin-bottom: 8px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .banner h2 {
        font-size: 28px;
    }

    .banner p {
        font-size: 16px;
    }

    .banner-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-item {
        padding: 20px 30px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* 认证按钮组 */
.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-login,
.btn-register,
.btn-user-center,
.btn-logout {
    padding: 8px 20px;
    border: 2px solid white;
    border-radius: 25px;
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover,
.btn-register:hover {
    background: white;
    color: #c41e3a;
    transform: translateY(-2px);
}

.btn-user-center {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-user-center:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-logout {
    border-color: #ff6b6b;
    font-size: 13px;
    padding: 6px 16px;
}

.btn-logout:hover {
    background: #ff6b6b;
    color: white;
}

/* 弹窗尺寸变体 */
.modal-small {
    max-width: 450px;
}

.modal-large {
    max-width: 800px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 13px;
    color: #666;
}

.checkbox-group label a {
    color: #c41e3a;
    text-decoration: none;
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #c41e3a 0%, #ff4500 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.switch-auth {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.switch-auth a {
    color: #c41e3a;
    text-decoration: none;
    font-weight: bold;
}

.switch-auth a:hover {
    text-decoration: underline;
}

.agreement-text {
    margin-top: 15px;
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

.agreement-text a {
    color: #c41e3a;
    text-decoration: none;
}

.agreement-text a:hover {
    text-decoration: underline;
}

/* 个人中心样式 */
.user-center-body {
    max-height: 600px;
    overflow-y: auto;
    text-align: left;
}

.user-info-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid #ffd4d4;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c41e3a, #ff4500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.user-details h4 {
    font-size: 20px;
    color: #222;
    margin-bottom: 8px;
}

.user-details p {
    color: #666;
    font-size: 14px;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 25px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.tab-btn.active {
    color: #c41e3a;
    background: linear-gradient(to bottom, transparent, rgba(196, 30, 58, 0.05));
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 3px;
    background: #c41e3a;
}

.tab-btn:hover:not(.active) {
    background: #f5f5f5;
    color: #333;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 订单表格 */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.orders-table thead {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
}

.orders-table th,
.orders-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.orders-table th {
    font-weight: bold;
    font-size: 13px;
}

.orders-table tbody tr {
    transition: background-color 0.3s ease;
}

.orders-table tbody tr:hover {
    background-color: #fff8f0;
}

.status-paid {
    color: #28a745;
    font-weight: bold;
}

.status-pending {
    color: #ffc107;
    font-weight: bold;
}

/* 已购列表 */
.purchased-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.purchased-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #c41e3a;
    transition: all 0.3s ease;
}

.purchased-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.purchased-item h5 {
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
}

.purchased-item p {
    color: #999;
    font-size: 12px;
}

/* 协议内容样式 */
.agreement-body {
    max-height: 600px;
    overflow-y: auto;
    text-align: left;
    padding: 35px 40px;
}

.agreement-content h4 {
    color: #c41e3a;
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 12px;
}

.agreement-content h4:first-child {
    margin-top: 0;
}

.agreement-content p {
    color: #555;
    line-height: 1.9;
    margin-bottom: 12px;
    font-size: 14px;
    text-indent: 2em;
}

.agreement-content strong {
    color: #333;
}

.agreement-date {
    text-align: right !important;
    color: #999 !important;
    font-style: italic;
    margin-top: 30px !important;
    text-indent: 0 !important;
}

/* 页脚链接特殊样式 */
.footer-bottom a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #ffd700;
    text-decoration: underline;
}

/* 登录提示区域 */
.login-prompt {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 2px solid #ffc4c4;
    border-radius: 12px;
    display: none; /* 默认隐藏，通过JS控制 */
    animation: fadeInUp 0.4s ease;
}

.login-prompt-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-icon {
    display: none; /* 隐藏图标，移除emoji后不再需要 */
}

.login-prompt-text {
    color: #c41e3a;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
}

.login-prompt-btn {
    padding: 10px 30px;
    background: linear-gradient(135deg, #c41e3a 0%, #ff4500 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}