:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --success: #10b981;
    --danger: #ef4444;
    --border-radius: 16px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 60px rgba(99, 102, 241, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Link to Us Section */
.link-to-us {
    max-width: 800px;
    margin: 0 auto 60px;
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
}

.link-to-us h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
}

.info-box {
    background: var(--background);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--surface-light);
}

.info-box pre {
    font-family: 'Inter', monospace;
    font-size: 1rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    line-height: 2;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.category-btn {
    padding: 10px 24px;
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--surface-light);
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Horizontal Card Layout */
.link-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: inherit;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.link-card:hover::before {
    transform: scaleX(1);
}

.link-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.avatar {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.link-card:hover .avatar {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-content h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.link-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid #fbbf24;
}

.status-badge.approved {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Admin Styles */
.admin-container {
    max-width: 500px;
    margin: 100px auto;
}

.login-box {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--background);
    border: 2px solid var(--surface-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    margin-top: 10px;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    padding: 8px 16px;
    width: auto;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    padding: 8px 16px;
    width: auto;
    margin-right: 10px;
}

/* Admin Table */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h2 {
    font-size: 2rem;
}

.links-table {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th {
    text-align: left;
    padding: 15px;
    background: var(--surface-light);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--surface-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h3 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: #fca5a5;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: #6ee7b7;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .admin-header div {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .links-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.85rem;
        min-width: 800px;
    }

    th,
    td {
        padding: 8px;
        font-size: 0.8rem;
    }

    .avatar-small {
        width: 40px;
        height: 40px;
    }

    .btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .category-badge,
    .status-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}