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

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

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.admin-link {
    background: #ff6b6b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

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

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

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

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

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.search-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.search-bar input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-bar button {
    padding: 0.8rem 2rem;
    background: #f5576c;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s;
}

.search-bar button:hover {
    transform: scale(1.05);
}

.daily-recommend {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.daily-recommend h3 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.recommend-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
}

.recommend-card h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.recommend-card a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
}

.categories {
    margin-bottom: 2rem;
}

.categories h3 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.category-btn {
    padding: 0.6rem 1.5rem;
    background: white;
    border: 2px solid #667eea;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.category-btn:hover, .category-btn.active {
    background: #667eea;
    color: white;
}

.tools-grid {
    margin-bottom: 2rem;
}

.tools-grid h3 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

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

.tool-card h4 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.description {
    color: #666;
    margin-bottom: 1rem;
    flex: 1;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.2rem;
}

.star {
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.star:hover {
    color: #ffc107;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.actions .btn {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background 0.3s;
}

.actions .btn:hover {
    background: #764ba2;
}

.btn-fav, .btn-compare, .btn-comment {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-fav {
    background: #ff6b6b;
    color: white;
}

.btn-fav.fav-active {
    background: #e74c3c;
}

.btn-compare {
    background: #48dbfb;
    color: white;
}

.btn-comment {
    background: #ffc107;
    color: #333;
}

.comments-section {
    margin-top: 1rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.comments-list {
    margin-bottom: 0.5rem;
    max-height: 100px;
    overflow-y: auto;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
}

.comment-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 25px;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

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

/* 管理后台样式 */
.admin-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin-bottom: 2rem;
}

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

.admin-form button {
    padding: 0.8rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.login-form {
    max-width: 400px;
    margin: 4rem auto;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.login-form button {
    width: 100%;
    padding: 0.8rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

th, td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #667eea;
    color: white;
}

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

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

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

    .hero h2 {
        font-size: 1.8rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .search-bar {
        flex-direction: column;
    }
}