* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #e2e8f0;

    /* Dark Theme Variables (Default to Light) */
    --bg-body: linear-gradient(135deg, var(--primary), var(--secondary));
    --bg-card: #ffffffde;
    --text-main: var(--dark);
    --text-muted: var(--gray);
    --border-color: var(--light-gray);
    --input-bg: white;
}

[data-theme="dark"] {
    --light: #1e293b;
    /* Invert light/dark for text/bg logic if needed, but better to use semantic names */
    --dark: #f8fafc;
    --gray: #94a3b8;
    --light-gray: #334155;

    --bg-body: #111111;
    --bg-card: #1a1a1ab3;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --input-bg: #0f0f0f;
}

body {
    background: var(--bg-body);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    zoom: 0.9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: small;
}

.btn-primary {
    background-color: var(--primary);
    color: white;

    &:hover {
        background-color: var(--primary-dark);
    }
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);

    &:hover {
        background-color: var(--light);
        border-color: var(--light);
        color: var(--primary);
    }
}

.btn-success {
    background-color: var(--success);
    color: white;

    &:hover {
        opacity: 0.9;
    }
}

.btn-danger {
    background-color: var(--danger);
    color: white;

    &:hover {
        opacity: 0.9;
    }
}

.btn-warning {
    background-color: var(--warning);
    color: white;

    &:hover {
        opacity: 0.9;
    }
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-bottom: 24px;
    color: var(--text-main);
}

.item-card[data-wishlist-id] {
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: var(--input-bg);
    color: var(--text-main);

    &:focus {
        outline: none;
        border-color: var(--primary);
    }
}

.view {
    display: none;
    min-height: 100vh;
}

.view.active {
    display: block;
}

/* Welcome Page */
.welcome-page {
    color: white;
    text-align: center;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 100vh;
}

.welcome-content {
    max-width: 800px;
    margin: 0 auto;
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: pulse 2s infinite;
}

.welcome-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.welcome-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--gray);
}

/* Dashboard */
.dashboard-header {
    background: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.logo i {
    color: var(--primary);
    margin-right: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-only {
    display: none;
}

/* Wishlist Detail Page Cover Image */
#wishlist-cover-image-container,
#public-wishlist-cover-image-container {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin-bottom: 30px;
    margin-top: 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

#wishlist-cover-image-container::before,
#public-wishlist-cover-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%);
    border-radius: 12px;
}

#wishlist-cover-image-container.no-cover-image,
#public-wishlist-cover-image-container.no-cover-image {
    background: var(--dark);
    height: auto;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 30px;
    padding-bottom: 30px;
}

#wishlist-cover-image-container.no-cover-image::before,
#public-wishlist-cover-image-container.no-cover-image::before {
    display: none;
}

.page-header {
    margin: 30px 0;
    position: relative;
    /* For cover image text */
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--light-gray);
    opacity: 0.9;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* View Toggle */
.view-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--border-color);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--gray);
    border-radius: 6px;
    font-size: 16px;
    line-height: 1;
}

.view-btn.active {
    background-color: var(--bg-card);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.item-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;

    &:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    .item-image {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .item-content {
        padding: 20px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;

        .item-info-wrapper {
            flex-grow: 1;
        }
    }

    .item-name {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 8px;
        color: var(--text-main);
    }

    .item-description {
        color: var(--gray);
        margin-bottom: 16px;
        font-size: 0.95rem;
        display: none;
        /* Hidden by default as per request */
    }



    .item-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: auto;
        /* Push actions to the bottom */
        padding-top: .5rem;
    }
}

/* Global Status Styles */
.item-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.status-unpublished {
    background-color: var(--light-gray);
    color: var(--gray);
}

.status-available {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-reserved {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-received {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Modal Actions */
#view-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-right: auto;
    /* Push to left */
}

@media (max-width: 768px) {
    #view-item-actions {
        width: 100%;
        margin-bottom: 10px;
        justify-content: flex-start;
    }

    .modal-footer {
        flex-wrap: wrap;
    }
}

.action-btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.action-edit {
    background-color: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
}

.action-edit:hover {
    background-color: #cbd5e1;
}

.action-move {
    background-color: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
}

.action-move:hover {
    background-color: #cbd5e1;
}

.action-delete {
    background-color: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.action-delete:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.action-received {
    background-color: transparent;
    border: 1px solid var(--success);
    color: var(--success);
}

.action-received:hover {
    background-color: rgba(16, 185, 129, 0.2);
}

.action-share {
    background-color: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

.action-share:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.action-view {
    background-color: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    text-decoration: none;
    /* For anchor tags */
}

.action-view:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.action-contribute {
    background-color: transparent;
    border: 1px solid var(--success);
    color: var(--success);
}

.action-contribute:hover {
    background-color: rgba(16, 185, 129, 0.2);
}

.action-claim {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.action-claim:hover {
    background-color: rgba(139, 92, 246, 0.2);
}

/* List View */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 12px;

    .item-card {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 16px;

        &:hover {
            transform: none;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }

        .item-image {
            width: 120px;
            height: 120px;
            flex-shrink: 0;
            border-radius: 8px;
        }



        .item-content {
            padding: 0;
            flex-grow: 1;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            gap: 16px;

            &>div:first-child,
            .item-info-wrapper {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 4px;
                flex-grow: 1;
            }
        }

        .item-name,
        .item-description,
        .item-status {
            margin-bottom: 0;
        }

        .item-actions {
            flex-direction: column;
            align-items: flex-end;
            gap: 8px;
            flex-shrink: 0;
            padding-top: 0;
            margin-top: 0;

            .action-btn,
            .btn {
                min-width: 140px;
                justify-content: center;
            }
        }
    }
}

@media (max-width: 768px) {
    .list-view:not(#my-wishlists-container):not(#shared-wishlists-container) .item-card .item-image {
        width: 80px;
        height: 80px;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    color: var(--light-gray);
    margin-bottom: 20px;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.empty-text {
    color: var(--gray);
    margin-bottom: 24px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 40, 0.7);
    backdrop-filter: blur(20px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal.no-blur-backdrop {
    backdrop-filter: none;
    background-color: rgba(20, 20, 40, 0.85);
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 24px 0;
        margin-bottom: 20px;
    }

    .modal-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--dark);
    }

    .close-modal {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: var(--gray);
        transition: color 0.3s;

        &:hover {
            color: var(--text-main);
        }
    }

    .modal-body {
        padding: 0 24px;
    }

    .modal-footer {
        padding: 20px 24px;
        display: flex;
        justify-content: flex-end;
        gap: 12px;
    }
}

/* Admin Panel */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.toggle-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-enabled {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.toggle-enabled:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.toggle-disabled {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.toggle-disabled:hover {
    background-color: rgba(16, 185, 129, 0.2);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th {
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--border-color);
}

.role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.role-admin {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.role-user {
    background-color: var(--border-color);
    color: var(--text-muted);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-inactive {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Burger menu hidden for desktop */
.burger-menu-btn {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex-grow: 1;
        overflow-y: auto;
    }

    .modal-footer {
        border-top: 1px solid var(--light-gray);
    }

    .card {
        padding: 16px;
    }
}





/* Partner Section */
.partner-section {
    background: var(--light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.partner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.partner-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.claimed-items {
    margin-top: 15px;
}

/* Updated Partner Claimed Item Layout */
.claimed-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    /* Name | Details | Button */
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.claimed-item-name {
    font-weight: 500;
    color: var(--dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.claimed-by-details {
    width: 250px;
    font-size: 0.9rem;
    color: var(--gray);
}

.claimed-by-details ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.claimed-by-details ul li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.claimed-item .item-actions {
    justify-self: end;
}


/* Gift Note styling */
.item-note {
    margin-top: 5px;
    font-style: italic;
    color: var(--gray);
    font-size: 0.9rem;
    padding: 0;
    background: transparent;
}


/* SortableJS Drag and Drop Styles */
.sortable-ghost {
    opacity: 0.4;
    background: #e0f2fe;
}

.sortable-chosen {
    cursor: grabbing;
}

.item-card.sortable-drag {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px) scale(1.02);
}

/* Public View Avatar */
#public-wishlist-owner-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    display: none;
    /* Hidden by default */
}


@media (max-width: 768px) {
    .container {
        padding: 0;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-subtitle {
        font-size: 1.2rem;
        padding: 0 20px;
    }

    .features {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .items-grid {
        grid-template-columns: 1fr;
        gap: 1px;
        /* Minimal gap for separation if using full width */
    }

    /* Hide view toggle on mobile */
    .view-toggle {
        display: none !important;
    }

    /* Screen-wide cards on mobile */
    .card,
    .item-card {
        border-radius: 0;
        box-shadow: none;
        border-bottom: none !important;
        margin-bottom: 0;
    }

    .card {
        margin-bottom: 20px;
        /* Space between major sections */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        /* Restore shadow for main containers */
    }

    /* Specific adjustment for item cards inside grids to be truly flat and list-like if desired,
       OR keep them as cards but full width.
       Let's go with full width cards with spacing. */
    .items-grid .item-card {
        margin-bottom: 16px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    /* EXCEPTION: Show text for specific buttons on mobile */
    .btn-text-mobile-visible {
        display: inline !important;
    }

    /* Ensure icons are centered and visible */
    .action-btn i,
    .btn i {
        margin-right: 0;
    }

    /* Restore margin for icons when text is visible */
    .action-btn:has(.btn-text-mobile-visible) i,
    .btn:has(.btn-text-mobile-visible) i {
        margin-right: 6px;
    }

    /* Modal Mobile Styles */
    .modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        margin: 0;
    }

    .modal-body {
        flex-grow: 1;
        overflow-y: auto;
        padding: 20px;
    }

    .modal-header {
        padding: 20px;
        border-bottom: 1px solid var(--light-gray);
    }

    .modal-footer {
        padding: 20px;
        border-top: 1px solid var(--light-gray);
        background: var(--light);
    }

    .navbar {
        flex-direction: row;
        /* Keep row for logo and burger */
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        padding: 10px 20px;
        position: relative;
    }

    .logo span {
        display: none;
        /* Hide App Title on mobile */
    }

    #dashboard .page-header {
        display: none;
        /* Hide Dashboard Title & Subtitle on mobile */
    }

    /* Ensure "Back to Dashboard" button remains visible */
    #wishlist-detail-page .nav-links,
    #admin-panel .nav-links,
    #settings-view .nav-links {
        display: block;
        width: auto;
        border: none;
        padding: 0;
        margin: 0;
    }

    /* Sticky Header on Mobile */
    .dashboard-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--bg-body);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
    }

    .dashboard-header .logo,
    .dashboard-header .burger-menu-btn,
    .dashboard-header .nav-link,
    .dashboard-header #user-name-display {
        color: white;
    }

    .dashboard-header .btn-outline {
        color: white;
        border-color: white;
    }

    .dashboard-header .btn-outline:hover {
        color: var(--primary);
        background-color: white;
    }

    .dashboard-header #theme-toggle {
        color: white !important;
    }

    /* List Header Screen Wide on Mobile */
    .list-header-card {
        border-radius: 0;
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
        border-left: none;
        border-right: none;
    }

    /* Hide specific subtitle in list header on mobile */
    .list-header-card p {
        display: none;
    }

    .burger-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary);
        cursor: pointer;
        padding: 5px;
    }

    .nav-links {
        width: 100%;
        display: none;
        /* Hidden by default on mobile */
        flex-direction: column;
        gap: 15px;
        padding-top: 15px;
        margin-top: 10px;
    }

    .nav-links.active {
        display: flex;
        /* Show when active */
    }

    .nav-links .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-header {
        padding: 0 20px;
        text-align: center;
    }

    /* Public Wishlist Specifics */
    #public-wishlist .list-view .item-card {
        flex-direction: column;
    }

    #public-wishlist .list-view .item-image {
        width: 100%;
        height: 200px;
    }

    #public-wishlist .list-view .item-actions {
        align-items: stretch;
    }

    /* Admin Dashboard Mobile Fixes */
    .users-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .users-table th,
    .users-table td {
        padding: 10px;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/*
 * Public Wishlist Item Card Layouts
 */

/* Grid View Layout */
#public-wishlist .items-grid .item-card {
    display: flex;
    flex-direction: column;
}

#public-wishlist .items-grid .item-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#public-wishlist .items-grid .item-content .item-info-wrapper {
    flex-grow: 1;
}

#public-wishlist .items-grid .item-content .item-actions {
    margin-top: auto;
    padding-top: 1rem;
}

#public-wishlist .items-grid .item-actions .btn,
#public-wishlist .items-grid .item-actions a.btn {
    width: 100%;
}

/* List view for public items */
#public-wishlist .list-view .item-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px;
}

#public-wishlist .list-view .item-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
}

#public-wishlist .list-view .item-content {
    padding: 0;
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

#public-wishlist .list-view .item-info-wrapper {
    flex-grow: 1;
}

#public-wishlist .list-view .item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 150px;
}

#public-wishlist .list-view .item-actions .btn,
#public-wishlist .list-view .item-actions a.btn {
    width: 100%;
}


/* Add space between stacked buttons in public grid view */
#public-wishlist .items-grid .item-actions>.btn:not(:last-child),
#public-wishlist .items-grid .item-actions>a.btn:not(:last-child) {
    margin-bottom: 10px;
}

.collaborator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: var(--light);
    border-radius: 6px;
    margin-bottom: 8px;
}


/* Contribution styles */
.contribution-progress-bar {
    width: 100%;
    background-color: var(--light-gray);
    border-radius: 6px;
    overflow: hidden;
    height: 12px;
    margin-bottom: 8px;
}

.contribution-progress {
    height: 100%;
    background-color: var(--success);
    border-radius: 6px;
    transition: width 0.3s ease-in-out;
}

.contribution-info {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 16px;
    font-weight: 500;
}

#contribution-partner-info {
    margin-top: 15px;
    padding: 12px;
    background-color: var(--light);
    /* Light indigo background */
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--dark);
}

#contribution-partner-info i {
    margin-right: 8px;
    color: var(--primary);
}


.percentage-slider {
    display: flex;
    align-items: center;
    gap: 15px;
}

.percentage-slider input[type="range"] {
    flex-grow: 1;
    accent-color: var(--primary);
}

.percentage-slider-value {
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
    text-align: right;
}

#received-from-contributors-list .contributor-entry {
    background-color: var(--light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

#received-from-contributors-list .contributor-name {
    font-weight: bold;
    color: var(--dark);
}

#received-from-contributors-list .contributor-note {
    font-style: italic;
    color: var(--gray);
    margin-top: 4px;
    display: block;
}

/* App Footer */
.app-footer {
    background-color: var(--dark);
    color: var(--light-gray);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Share URL Styling */
.share-url-input {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Settings View */
.settings-layout {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.settings-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--light-gray);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: left;
}

.settings-tab:hover {
    background-color: var(--bg-card);
    color: var(--text-main);
}

.settings-tab.active {
    background-color: var(--primary);
    color: white;
}

.settings-content {
    flex-grow: 1;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Burger Menu Button (Desktop - Hidden) */
.burger-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
    margin-right: 15px;
}

@media (max-width: 768px) {
    .settings-layout {
        flex-direction: column;
    }

    .settings-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .settings-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Mobile Navigation */
    .burger-menu-btn {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .mobile-only {
        display: flex !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100vw;
        width: 100vw;
        /* Full width for better mobile experience */
        height: 100vh;
        background-color: var(--bg-body);
        /* Opaque background */
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 20px;
        transition: left 0.3s ease-in-out;
        z-index: 999;
        box-shadow: none;
        /* Remove shadow as it's full screen/opaque */
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links .nav-link {
        width: 100%;
        padding: 15px 0;
        /* Increased padding */
        border-bottom: 1px solid var(--border-color);
        font-size: 1.2rem;
        /* Larger font */
        color: var(--text-main);
    }

    .user-info {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
        gap: 0;
        /* Remove gap, use padding/border instead */
        margin-top: 0;
        /* Remove margin, flow naturally */
    }

    /* Style buttons to look exactly like nav links */
    .user-info .btn {
        width: 100%;
        justify-content: flex-start;
        background: none;
        border: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        padding: 15px 0;
        font-size: 1.2rem;
        color: var(--text-main);
        font-weight: 500;
        /* Match nav-link weight */
    }

    .user-info .btn:hover {
        background-color: transparent;
        color: var(--primary);
    }
}

/* Image List (Add/Edit Item) */
.image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.image-list-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.image-list-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-list-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Carousel (View Item) */
.carousel {
    width: 100%;
    height: 300px;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-dot.active {
    background: white;
}

/* Nav Group for Public View */
.nav-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

@media (max-width: 768px) {
    .nav-group {
        flex-direction: column;
        width: 100%;
        gap: 0;
        align-items: flex-start;
    }

    .nav-group .btn {
        width: 100%;
        justify-content: flex-start;
        border: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        padding: 15px 0;
        font-size: 1.2rem;
        color: var(--text-main);
        font-weight: 500;
    }

    /* Specific override for guest buttons to look like links or keep button style? 
       The user wants uniform style. The authenticated buttons look like links.
       Guest buttons (Login/Register) might be better as buttons or links?
       Let's make them look like links for consistency in the menu.
    */
    #public-guest-nav .btn {
        /* Reset button styles to match nav links */
        background: none;
        border: none;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-main);
    }

    #public-guest-nav .btn:hover {
        color: var(--primary);
    }
}