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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

.header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

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

.nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #667eea;
}

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

.hero {
    text-align: center;
    padding: 60px 0 30px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.recommend-card {
    padding: 20px 0;
}

.card-featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
    position: relative;
    transition: transform 0.3s;
}

.card-featured:hover {
    transform: translateY(-5px);
}

.featured-badge {
    display: inline-block;
    background: #ff6b6b;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.card-featured h2 a {
    color: white;
    text-decoration: none;
}

.card-featured h2 a:hover {
    text-decoration: underline;
}

.filters {
    padding: 20px 0;
}

.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-bar input, .filter-bar select {
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    background: white;
    transition: box-shadow 0.3s;
}

.filter-bar input:focus, .filter-bar select:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(102,126,234,0.3);
}

.filter-bar input {
    flex: 1;
    min-width: 200px;
}

.tool-grid {
    padding: 20px 0;
}

#toolGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tag {
    background: #f0f0f5;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #667eea;
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd6;
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.2);
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.85rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.btn-sm:hover {
    background: #5a6fd6;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.star {
    font-size: 1.5rem;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
}

.star.active {
    color: #f1c40f;
}

.rating-text {
    font-size: 0.9rem;
    color: #888;
}

.reviews-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.reviews-section h4 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.review-item {
    background: #f9f9fc;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.review-item strong {
    display: block;
    font-size: 0.9rem;
}

.review-item p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.review-item small {
    color: #aaa;
    font-size: 0.8rem;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.review-form input, .review-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.9rem;
}

.review-form textarea {
    resize: vertical;
    min-height: 60px;
}

.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

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

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

.admin-form {
    max-width: 800px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-form input, .admin-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.admin-form textarea {
    font-family: monospace;
}

.admin-form .btn {
    align-self: flex-start;
}

.error {
    color: #e74c3c;
    background: #fde8e8;
    padding: 10px;
    border-radius: 10px;
}

.success {
    color: #27ae60;
    background: #e8f8e8;
    padding: 10px;
    border-radius: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        background: white;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    .nav.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    #toolGrid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
    }
}

/* 首页标题字数保证 */
.hero h1::after {
    content: " — 探索AI建站工具，快速搭建专业网站";
    display: none;
}