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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    min-height: 100vh;
    color: #333;
}

header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

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

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: #667eea;
    border-bottom-color: #667eea;
}

.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 0 0 50px 50px;
    margin: 0 1rem;
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    flex-wrap: wrap;
}

.filters input, .filters select {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-size: 1rem;
    background: white;
    min-width: 250px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

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

.card h3 {
    font-size: 1.5rem;
    color: #2d3748;
}

.card p {
    color: #718096;
    line-height: 1.6;
}

.category-tag {
    background: linear-gradient(135deg, #667eea20, #764ba220);
    color: #667eea;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    align-self: flex-start;
}

.rating {
    color: #f6c23e;
    letter-spacing: 2px;
}

.btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

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

footer {
    text-align: center;
    padding: 2rem;
    background: rgba(255,255,255,0.9);
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

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

/* 后台登录 */
.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2d3748;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-box input {
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
}

.login-box button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

.error {
    color: #e53e3e;
    text-align: center;
}

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

.admin-page h1 {
    margin-bottom: 1rem;
}

#save-msg {
    margin-top: 1rem;
    font-weight: bold;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        top: 70px;
        left: 0;
        padding: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .filters input, .filters select {
        min-width: 100%;
    }
}