/* style.css - Premium Glassmorphism Design */

:root {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --accent-color: #38bdf8;
    --card-bg: rgba(30, 41, 59, 0.4);
    /* More transparent */
    --card-border: rgba(148, 163, 184, 0.1);
    --hover-bg: rgba(56, 189, 248, 0.15);
    --glow-color: rgba(56, 189, 248, 0.5);
}

@keyframes bg-animation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    /* Animated Deep Space Gradient */
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #0f172a);
    background-size: 400% 400%;
    animation: bg-animation 15s ease infinite;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 60px 0 40px;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #38bdf8, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

header p {
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 300;
}

.search-container {
    max-width: 600px;
    margin: 30px auto;
    position: relative;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea {
    width: 100%;
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    /* Ultra glass */
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    font-family: inherit;
}

input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    transform: scale(1.02);
}

/* --- Categories & Links --- */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 50px;
    margin-bottom: 25px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
    position: relative;
}

.section-title i {
    color: var(--accent-color);
    filter: drop-shadow(0 0 5px var(--accent-color));
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 18px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

/* Glass Edge Highlight */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    background: var(--hover-bg);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.2);
}

.card img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin-right: 15px;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.default-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin-right: 15px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.card-content {
    overflow: hidden;
}

.card-title {
    font-weight: 600;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f1f5f9;
}

.card-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* --- Admin Elements --- */
.admin-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    z-index: 1000;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.admin-btn:hover {
    background: var(--accent-color);
    color: #0f172a;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 30px var(--accent-color);
}

/* Login Modal & Admin Tables */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1e293b;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.btn {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2.2rem;
    }

    .card {
        padding: 15px;
    }
}