:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Utils */
.hidden {
    display: none !important;
}
.mt-4 {
    margin-top: 1rem;
}
.error-msg {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* Buttons */
.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.2s;
    width: 100%;
}
.btn:hover {
    background-color: var(--primary-hover);
}
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}
.btn-secondary {
    background-color: #475569;
}
.btn-secondary:hover {
    background-color: #334155;
}
.btn-danger {
    background-color: var(--error-color);
}
.btn-danger:hover {
    background-color: #dc2626;
}

/* Login Screen */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: var(--bg-color);
}

.login-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}
.login-box p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.login-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.login-box input:focus {
    border-color: var(--primary-color);
}

/* Header actions */
.header-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Main Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.header-container {
    max-width: 800px;
    margin: 0 auto;
}
header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
header p {
    font-size: 1.1rem;
    opacity: 0.9;
}
.search-container {
    max-width: 500px;
    margin: 1.5rem auto 0;
}
#searchInput {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: box-shadow 0.2s;
}
#searchInput:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

/* Main */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    min-height: 50vh;
}
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.filter-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}
.filter-btn:hover {
    background-color: #f1f5f9;
}
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.link-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}
.card-icon {
    font-size: 2rem;
    background-color: #f1f5f9;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.card-content {
    flex: 1;
}
.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}
.card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.category-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background-color: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    margin-top: 0.5rem;
}
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Admin panel styles */
.admin-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.admin-panel-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.user-list {
    list-style: none;
}
.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.user-item:hover, .user-item.active {
    border-color: var(--primary-color);
    background: #f0fdf4;
}
.permissions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.permission-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
