* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(145deg, #f0f4ff 0%, #e6edf7 100%);
    min-height: 100vh;
    color: #1a2639;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    padding: 16px 40px;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: #1a2639;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 30px;
    transition: all 0.3s;
}

.nav-menu a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

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

.hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #e0e7ff, #f0e6ff);
    border-radius: 0 0 50px 50px;
    margin: 0 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #2d3561, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.search-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
}

.search-bar input {
    width: 60%;
    max-width: 500px;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 40px 0 0 40px;
    outline: none;
    font-size: 1rem;
    background: white;
}

.search-bar button {
    padding: 14px 24px;
    border: 2px solid #667eea;
    background: #667eea;
    color: white;
    border-radius: 0 40px 40px 0;
    cursor: pointer;
    transition: 0.3s;
}

.search-bar button:hover {
    background: #764ba2;
    border-color: #764ba2;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #b0bec5;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    color: #37474f;
}

.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.5);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #1a2639;
}

.card p {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.card-btn {
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: 0.3s;
}

.card-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

footer {
    text-align: center;
    padding: 30px 20px;
    background: #1a2639;
    color: #ccc;
    margin-top: 40px;
    border-radius: 30px 30px 0 0;
}

footer a {
    color: #a5b4fc;
    text-decoration: none;
}

.admin-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.login-form input, .login-form button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    border-radius: 30px;
    border: 2px solid #ddd;
}

.login-form button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    cursor: pointer;
}

.error {
    color: red;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }
    .nav-menu.show {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .search-bar input {
        width: 70%;
    }
}

/* 内页通用 */
.page-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    text-align: center;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-content textarea {
    width: 100%;
    min-height: 150px;
    margin: 20px 0;
    padding: 15px;
    border-radius: 20px;
    border: 2px solid #ddd;
    font-size: 1rem;
}

.page-content button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.3s;
}

.page-content button:hover {
    transform: scale(1.05);
}

.page-content .output {
    margin-top: 20px;
    padding: 20px;
    background: #f3f6ff;
    border-radius: 20px;
    text-align: left;
    white-space: pre-wrap;
}