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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fc;
    color: #333;
    line-height: 1.6;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
}

.navbar {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links li a {
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s;
}

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

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.hero p {
    font-size: 1.2rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-actions .btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    margin: 0 0.5rem;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary {
    background: #1e3c72;
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #1e3c72;
    border: 2px solid #1e3c72;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.features, .templates-preview, .stats {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2, .templates-preview h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e3c72;
}

.feature-grid, .template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card, .template-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.feature-card:hover, .template-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.feature-card i {
    font-size: 2.5rem;
    color: #2a5298;
    margin-bottom: 1rem;
}

.template-card h3 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.template-category {
    display: inline-block;
    background: #e3f2fd;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #1e3c72;
    margin-top: 0.5rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    background: #1e3c72;
    color: #fff;
    border-radius: 16px;
    margin: 2rem auto;
    padding: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
}

.stat-label {
    display: block;
    font-size: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    background: #1e3c72;
    color: #fff;
}

footer a {
    color: #ffd700;
}

.no-data {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
}

/* 后台登录 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.login-box {
    background: #fff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 2rem;
    color: #1e3c72;
}

.login-box input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.login-box button {
    width: 100%;
    padding: 0.8rem;
    background: #1e3c72;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-box button:hover {
    background: #2a5298;
}

.error {
    color: #d32f2f;
    margin-bottom: 1rem;
}

.success {
    color: #2e7d32;
    margin-bottom: 1rem;
}

.admin-main {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.admin-section {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.admin-section h2 {
    color: #1e3c72;
    margin-bottom: 1.5rem;
}

.admin-section form label {
    display: block;
    margin: 0.8rem 0 0.3rem;
    font-weight: 600;
}

.admin-section form input, .admin-section form select, .admin-section form textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.admin-section form button {
    background: #1e3c72;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.admin-section form button:hover {
    background: #2a5298;
}

.template-item, .history-item {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0;
    border-left: 4px solid #2a5298;
}

.template-item h4 {
    color: #1e3c72;
}

.category {
    display: inline-block;
    background: #e3f2fd;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #1e3c72;
}

.generate-main, .keywords-form {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.generate-form {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.generate-form label {
    display: block;
    margin: 0.8rem 0 0.3rem;
    font-weight: 600;
}

.generate-form input, .generate-form select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.generate-form button {
    background: #1e3c72;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.generate-form button:hover {
    background: #2a5298;
}

.result-box {
    margin-top: 2rem;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 1.5rem;
    white-space: pre-wrap;
}

.keywords-form textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.keywords-form button {
    background: #1e3c72;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
}

/* 响应式 */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: #1e3c72;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 1rem 0;
    }

    .nav-links.show {
        display: flex;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }
}