@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(to right, #4099ff, #73b4ff);
    --primary-color: #4099ff;
    --success-color: #2ed8b6;
    --warning-color: #ffb64d;
    --danger-color: #ff5370;
    --body-bg: #f6f7fb;
    --sidebar-bg: #ffffff;
    --header-bg: #ffffff;
    --text-dark: #37474f;
    --text-muted: #888;
    --card-bg: #ffffff;
    --border-color: #f1f1f1;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Layout */
.pc-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.pc-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 1px 0 20px 0 rgba(0, 0, 0, 0.05);
    z-index: 1025;
    transition: all 0.3s ease-in-out;
}

.pc-sidebar .sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid var(--border-color);
}

.pc-sidebar .logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pc-sidebar .sidebar-content {
    padding: 20px 0;
}

.pc-sidebar .nav-list {
    list-style: none;
}

.pc-sidebar .nav-item {
    margin-bottom: 5px;
}

.pc-sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.pc-sidebar .nav-link:hover,
.pc-sidebar .nav-item.active .nav-link {
    background: rgba(64, 153, 255, 0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.pc-sidebar .nav-link i {
    margin-right: 15px;
}

/* Main Content */
.pc-main-content {
    margin-left: var(--sidebar-width);
    margin-top: 0;
    padding: 30px;
    width: calc(100% - var(--sidebar-width));
}

.page-header {
    margin-bottom: 30px;
}

.page-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.category-section {
    margin-bottom: 50px;
}

.category-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.inner-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Link Card Styles */
.link-card-body {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.link-card-body:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(64, 153, 255, 0.15);
    border-color: var(--primary-color);
}

.link-title {
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    display: block;
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color 0.3s;
}

.link-title:hover {
    color: var(--primary-color);
}

.link-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

/* Buttons */
.btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3388ff;
    box-shadow: 0 10px 20px -10px rgba(64, 153, 255, 0.5);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Old Link List Styles removed or repurposed */
.link-footer {
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-url-text {
    color: #bbb;
    font-size: 12px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 991px) {
    .pc-sidebar {
        left: -var(--sidebar-width);
    }

    .pc-header {
        left: 0;
    }

    .pc-main-content {
        margin-left: 0;
        width: 100%;
    }
}

.btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #f8f9fa;
    color: var(--text-dark);
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
}

.btn-icon.delete:hover {
    background: var(--danger-color);
}