:root {
    --bg-color: #0d0d12;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent: #6c5ce7;
    --accent-hover: #5649c0;
    --font-main: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 107, 107, 0.05) 0%, transparent 20%);
    min-height: 100vh;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: white;
    margin-bottom: 16px;
    font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    text-align: center;
}

.grid-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
    padding: 24px;
    height: 100vh;
}

.sidebar {
    height: 100%;
    overflow-y: auto;
}

.main-content {
    overflow-y: auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.link-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s;
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.favicon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.hidden {
    display: none;
}

/* List View Styles */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link-list .link-card {
    display: grid;
    grid-template-columns: fit-content(350px) 1fr 140px;
    /* Title | Description | Actions */
    align-items: center;
    padding: 24px;
    height: auto;
    gap: 20px;
}

.link-list .card-header {
    margin-bottom: 0;
    max-width: 100%;
}

.link-list .card-title {
    white-space: normal;
    /* Allow title wrap in list view */
    overflow: visible;
    word-break: break-word;
}

.link-list .card-desc {
    margin-bottom: 0;
    /* Show full description */
    display: block;
    overflow: visible;
}

/* Responsive List View */
@media (max-width: 900px) {
    .link-list .link-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .link-list .card-header {
        margin-bottom: 8px;
    }
}