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

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

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}

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

.nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

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

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box button {
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    background: #ffd700;
    color: #1a202c;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

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

/* Filters */
.filters {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-label {
    font-weight: 600;
    min-width: 80px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 16px;
    border: 2px solid #667eea;
    border-radius: 20px;
    background: transparent;
    color: #667eea;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: #667eea;
    color: #fff;
}

/* Grid */
.tool-grid {
    padding: 40px 0;
}

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

.card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

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

.rating {
    background: #ffd700;
    color: #1a202c;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-desc {
    color: #4a5568;
    margin-bottom: 15px;
    flex: 1;
}

.card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: #e2e8f0;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #2d3748;
}

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

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

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

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #48bb78;
    color: #fff;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: #fff;
}

.user-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.stars {
    display: flex;
    gap: 2px;
}

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

.star.active {
    color: #ffd700;
}

.avg-rating {
    font-weight: 600;
    color: #4a5568;
}

.reviews {
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}

.reviews h4 {
    font-size: 0.9rem;
    color: #2d3748;
    margin-bottom: 5px;
}

.review-item {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 5px;
}

/* Recommend */
.recommend {
    background: linear-gradient(135deg, #ffd700 0%, #f6ad55 100%);
    padding: 40px 0;
    text-align: center;
    color: #1a202c;
}

.recommend a {
    color: #667eea;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #2d3748;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

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

/* Admin */
.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2d3748;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.error {
    color: #e53e3e;
    margin-bottom: 15px;
    text-align: center;
}

.success {
    color: #38a169;
    margin-bottom: 15px;
}

.admin-page .header {
    position: static;
}

.admin-form {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.admin-form h2 {
    margin-bottom: 15px;
    color: #2d3748;
}

.admin-form input,
.admin-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.admin-form textarea {
    height: 80px;
    resize: vertical;
}

.admin-form button {
    padding: 10px 30px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.admin-tool-list {
    display: grid;
    gap: 10px;
}

.admin-tool-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        padding: 20px;
        gap: 15px;
    }
    .nav.open {
        display: flex;
    }
    .hamburger {
        display: flex;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.3rem;
    }
    .search-box {
        flex-direction: column;
    }
}