@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root { --bg-body: #f3f4f6; --bg-card: #ffffff; --primary: #4f46e5; --text-main: #111827; --text-muted: #6b7280; --border: #e5e7eb; }
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body { background-color: var(--bg-body); color: var(--text-main); font-family: 'Inter', sans-serif; min-height: 100vh; }
.container { max-width: 1400px; margin: 0 auto; padding: 40px 20px; }
.top-bar { text-align: center; margin-bottom: 50px; }
.logo { font-size: 1.75rem; font-weight: 800; color: var(--text-main); }
.logo span { color: var(--primary); }
.search-wrapper { display: flex; justify-content: center; margin-bottom: 50px; }
#searchInput { width: 100%; max-width: 500px; padding: 16px 24px; border: 1px solid var(--border); border-radius: 99px; font-size: 1rem; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.grid { column-count: 4; column-gap: 24px; padding-bottom: 50px; }
@media(max-width:1280px){.grid{column-count:3;}} @media(max-width:1024px){.grid{column-count:2;}} @media(max-width:640px){.grid{column-count:1;}}
.card { background: var(--bg-card); border-radius: 12px; padding: 24px; margin-bottom: 24px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); border: 1px solid var(--border); break-inside: avoid; display: inline-block; width: 100%; transition: 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.card-header { display: flex; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

/* FIX: Image Sizing */
.cat-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #eef2ff; color: var(--primary); border-radius: 8px; margin-right: 16px; }
.cat-icon i { font-size: 1.25rem; }
.cat-icon svg, .cat-icon img { width: 22px; height: 22px; fill: var(--primary); object-fit: contain; }

.card-header h2 { font-size: 1.125rem; font-weight: 600; }
.link-btn { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-radius: 6px; text-decoration: none; color: var(--text-main); transition: 0.2s; margin-bottom: 8px; }
.link-btn:hover { background-color: #f9fafb; color: var(--primary); }
.link-name { font-weight: 600; font-size: 0.95rem; display: block; }
.link-desc { display: block; font-size: 0.8rem; color: var(--text-muted); }
.form-input { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; margin-bottom: 10px; }
.btn-action, .btn-admin { background: var(--primary); color: white; padding: 8px 16px; border-radius: 6px; border: none; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn-del { background: white; border: 1px solid #fee2e2; color: #ef4444; }
.site-footer { display: block; width: 100%; text-align: center; margin-top: 50px; padding: 20px 0; font-size: 0.8rem; color: var(--text-muted); }

/* --- CATEGORY PAGE SPECIFIC --- */

.nav-back {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 500;
}
.nav-back:hover {
    color: var(--primary);
    background: #f9fafb;
}

.cat-hero {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important;
}
.cat-hero-icon {
    background: #eef2ff !important;
    color: var(--primary) !important;
    border: none !important;
    border-radius: 8px !important;
}
.cat-hero-text h1 { color: var(--text-main) !important; font-weight: 700 !important; }

.link-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05) !important;
}
.link-card:hover {
    border-color: var(--border) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1) !important;
}
.link-card::before { display: none !important; }

.review-badge {
    background: #eef2ff !important;
    color: var(--primary) !important;
}
