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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    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;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

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

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    opacity: 0.8;
    border-bottom: 2px solid #fff;
}

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

.hamburger span {
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
}

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

.hero h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

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

.search-bar button {
    padding: 15px 30px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #ee5a5a;
}

/* Filters */
.filters {
    padding: 30px 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.filters h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #667eea;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

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

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

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

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

.card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 60px;
}

.card-body {
    padding: 20px;
}

.card-body h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

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

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

.badge {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #555;
}

.rating {
    color: #f39c12;
    margin-bottom: 15px;
    font-size: 14px;
}

.rating span {
    color: #999;
    margin-left: 8px;
}

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

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

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

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

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

.btn-secondary:hover {
    background: #ee5a5a;
}

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

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

.btn-sm {
    padding: 5px 15px;
    font-size: 12px;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

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

.recommend h3 {
    font-size: 32px;
    margin-bottom: 20px;
}

.recommend p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.recommend .btn {
    background: #ff6b6b;
    color: #fff;
    border: none;
    font-size: 18px;
    padding: 15px 40px;
}

.recommend .btn:hover {
    background: #ee5a5a;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    display: none;
    z-index: 3000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

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

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

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

/* Admin */
.admin-container {
    padding: 40px 20px;
}

.admin-container h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
}

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

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

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

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #667eea;
    color: #fff;
    font-weight: 600;
}

.admin-table tr:hover {
    background: #f5f5f5;
}

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

.login-form {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 400px;
}

.login-form h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

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

/* Static pages */
.page-content {
    padding: 60px 20px;
    background: #fff;
    min-height: 60vh;
}

.page-content h2 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

.page-content p {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 16px;
    color: #555;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #667eea;
        padding: 20px;
    }

    nav ul.show {
        display: flex;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .search-bar {
        flex-direction: column;
        align-items: center;
    }

    .search-bar input {
        width: 100%;
    }

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

    .form-row {
        flex-direction: column;
    }

    .admin-table {
        font-size: 14px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 24px;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        width: 100%;
        text-align: center;
    }
}