* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fb;
    color: #333;
    line-height: 1.6;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    letter-spacing: 1px;
}
nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: opacity 0.3s;
}
nav a:hover {
    opacity: 0.8;
}
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 140px 20px 80px;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}
.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}
.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}
.search-bar {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.search-bar input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
}
.search-bar button {
    background: #ff6b6b;
    border: none;
    color: #fff;
    padding: 0 25px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}
.search-bar button:hover {
    background: #ee5a5a;
}
.categories {
    padding: 30px 0;
}
.cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.cat-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    color: #555;
}
.cat-btn.active, .cat-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}
.tool-grid-section {
    padding: 40px 0;
}
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.tool-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}
.tool-card .card-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}
.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #333;
}
.tool-card p {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 15px;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 15px;
}
.card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.visit-btn {
    background: #667eea;
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}
.visit-btn:hover {
    background: #5a6fd6;
}
.fav-btn, .share-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    font-size: 1rem;
    color: #999;
}
.fav-btn:hover, .share-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}
footer {
    background: #2d3436;
    color: #ccc;
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
}
footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
}
footer a:hover {
    color: #fff;
}
.login-form, .tool-form {
    max-width: 450px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.login-form h2, .tool-form h2 {
    margin-bottom: 20px;
    text-align: center;
}
.login-form input, .tool-form input, .tool-form textarea, .tool-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}
.tool-form textarea {
    height: 80px;
    resize: vertical;
}
.login-form button, .tool-form button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}
.login-form button:hover, .tool-form button:hover {
    background: #5a6fd6;
}
.error {
    color: #e74c3c;
    text-align: center;
}
.success {
    color: #2ecc71;
    text-align: center;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}
table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
table th {
    background: #667eea;
    color: #fff;
}
table tr:hover {
    background: #f0f2ff;
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .nav-menu { display: none; flex-direction: column; background: #667eea; position: absolute; top: 60px; right: 20px; border-radius: 12px; padding: 20px; }
    .nav-menu.active { display: flex; }
    .hamburger { display: block; }
    .tool-grid { grid-template-columns: 1fr; }
}