/* 基础变量 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background: #f5f6fa;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background: var(--background);
    position: relative;
    min-height: 100vh;
    padding-bottom: 60px; /* 防止页脚覆盖内容 */
}

/* 导航栏 */
.navbar {
    background: white;
    padding: 1rem 5%;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.auth-buttons button {
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

/* 主内容区 */
main {
    padding-top: 20px;
}

/* 首页区块 */
.hero {
    height: 60vh;
    background: linear-gradient(rgba(44,62,80,0.8), rgba(44,62,80,0.8)),
                url('https://example.com/hero-bg.jpg');
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cta-btn {
    background: var(--error-color);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    margin-top: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(231,76,60,0.4);
}

/* 新闻区块 */
.news {
    padding: 4rem 5%;
    background: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card {
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    background: white;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-date {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.load-more {
    display: block;
    margin: 2rem auto;
    padding: 0.8rem 2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.load-more:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 建议表单 */
.suggestions {
    padding: 4rem 5%;
    background: var(--background);
}

.suggestion-form {
    max-width: 800px;
    margin: 2rem auto;
}

#suggestionText {
    width: 100%;
    height: 150px;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.3s;
}

.char-count {
    text-align: right;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.submit-btn {
    background: var(--secondary-color);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    margin-top: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

/* 联系区块 */
.contact {
    padding: 4rem 5%;
}

.contact-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info p {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr));
    gap: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    color: white !important;
    text-decoration: none;
    transition: transform 0.3s;
}

/* 平台主题色 */
.douyin { background: #FE2C55; }
.bilibili { background: #00A1D6; }
.xiaohongshu { background: #FF2442; }
.kuaishou { background: #FF6600; }

/* 模态框 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal-content {
    background: white;
    width: 400px;
    padding: 2rem;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 侧边客服栏 */
.sidebar {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 1000;
}

.service-btn {
    background: var(--secondary-color);
    color: white;
    padding: 1.2rem;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
    cursor: pointer;
    transition: transform 0.3s;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }
}

/* 新增页脚样式 */
footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 5%;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* 新增登录注册样式 */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.error-tip {
    color: var(--error-color);
    font-size: 0.8rem;
    height: 1.2rem;
    margin-top: 0.3rem;
    text-align: left;
}

.captcha-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.auth-submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .captcha-btn {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        border-radius: 4px;
    }
}