:root {
    --brand: #16a34a;
    --brand-soft: #dcfce7;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --border: #e2e8f0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--brand);
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.9; }

/* Custom Switch for Toggling features */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
/* Ensure the link box and buttons are always visible */
.card {
    background: white !important;
    display: block !important;
    visibility: visible !important;
}

.link-box {
    background-color: #f1f5f9 !important; /* light gray */
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px !important;
    border-radius: 12px !important;
}

.copy-btn, .visit-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
}
/* --- MOBILE RESPONSIVENESS FIX --- */

@media (max-width: 768px) {
    /* 1. Stack the sidebar and main content */
    .min-h-screen {
        flex-direction: column !important;
    }

    /* 2. Make sidebar scrollable horizontally or compact */
    aside {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border);
        padding: 1rem !important;
    }

    /* 3. Ensure the grid expands to full width */
    main {
        padding: 1.5rem !important;
        width: 100% !important;
    }

    #links-grid {
        grid-template-columns: 1fr !important; /* Force cards to single column */
        gap: 1rem !important;
        display: grid !important;
    }

    /* 4. Fix Header for Mobile */
    header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1.5rem;
        margin-bottom: 2rem !important;
    }

    header button {
        width: 100%; /* Make Create button full width on mobile */
        justify-content: center;
    }
}
/* Ensure the grid doesn't squash cards on mobile */
@media (max-width: 640px) {
    #links-grid {
        grid-template-columns: 1fr !important; /* One card per row on mobile */
        gap: 1rem !important;
    }
    
    /* Hide scrollbar for the horizontal nav on mobile */
    nav::-webkit-scrollbar {
        display: none;
    }
    nav {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}