  /* --- Global Styles & Reset --- */
        body {
            font-family: 'Inter', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #eef1f5; /* Very light, cool background */
            display: flex;
            justify-content: center;
            min-height: 100vh; 
        }

        .app-wrapper {
            width: 100%;
            max-width: 620px; /* Mobile size */
            min-height: 100vh; /* Full height of the screen */
            display: flex;
            flex-direction: column;
            background-color: white;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
            position: relative; /* Context for fixed bottom nav */
        }

        /* --- Header & Navigation --- */
        .feed-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            background-color: white;
            border-bottom: 1px solid #f0f0f0;
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .logo-text {
            font-size: 1.4em;
            font-weight: 800;
            color: #ff385c; /* A strong primary color */
            margin: 0;
        }

        .header-actions i {
            font-size: 1.2em;
            color: #555;
            margin-left: 20px;
            cursor: pointer;
        }

        /* --- Scrollable Feed --- */
        .discover-feed {
            flex-grow: 1;
            overflow-y: scroll;
            padding: 10px 0;
            /* Add padding at the bottom equal to the bottom nav height */
            padding-bottom: 70px; 
            -webkit-overflow-scrolling: touch;
        }

        .feed-card {
            position: relative;
            background-color: white;
            border-radius: 12px;
            margin: 15px 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            overflow: hidden;
            cursor: pointer; /* Indicate it's clickable */
            transition: transform 0.1s;
        }
        

        /* Card Image (Top Section) */
        .card-image {
            width: 100%;
            height: 300px; /* Fixed height for consistency */
            background-size: cover;
            background-position: center;
            background-color: #ccc; /* Placeholder */
          
        }

        /* Card Content (Bottom Section) */
        .card-content {
            padding: 15px 20px 20px;
        }

        .profile-name {
            font-size: 1.5em;
            font-weight: 700;
            color: #222;
            margin: 0 0 5px 0;
        }

        .match-info {
            font-size: 0.9em;
            font-weight: 600;
            color: #ff385c; /* Match percentage color */
            margin: 0 0 10px 0;
        }

        .location-text {
            font-size: 0.85em;
            color: #777;
            margin: 15px 0 0 0;
        }

        /* Interest Tags */
        .interests-tags {
            margin: 10px 0;
        }

        .tag {
            display: inline-block;
            background-color: #f7f7f7;
            color: #444;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 0.75em;
            font-weight: 500;
            margin-right: 5px;
            margin-bottom: 5px;
        }

        /* Card Action Buttons */
        .card-actions {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
        }

        .card-actions button {
            padding: 10px 25px;
            border: none;
            border-radius: 25px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.1s;
        }
        
        .card-actions button:active {
            transform: scale(0.98);
        }

        .action-pass {
            background-color: #eee;
            color: #555;
        }

        .action-connect {
            background-color: #ff385c; /* Primary action color */
            color: white;

        }
        
        /* New state for Connect Button after click */
        .action-connect.connected {
            background-color: #2ecc71; /* Green for success/sent */
            color: white;
        }

        /* --- FIXED Bottom Navigation --- */
        .bottom-nav {
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 15px 0;
            border-top: 1px solid #f0f0f0;
            background-color: white;
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 420px; /* Match app-wrapper max-width */
            height: 60px; 
            z-index: 50; 
        }

        .bottom-nav i {
            font-size: 1.5em;
            color: #aaa;
            cursor: pointer;
            transition: color 0.2s;
            padding: 5px;
        }

        /* Active icon styling */
        .bottom-nav .active {
            color: #ff385c;
        }

        /* Styling the 'Like' icon */
        .bottom-nav .fa-heart {
            font-size: 1.7em;
        }
        
        /* --- Profile Detail Modal (Temporary Simulation) --- */
        #profile-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #ff385c;
            color: white;
            padding: 20px 30px;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
            z-index: 100;
            opacity: 1;
            transition: opacity 0.3s ease-in-out;
            text-align: center;
            max-width: 80%;
        }

        #profile-modal.hidden {
            opacity: 0;
            pointer-events: none; /* Disable interaction when hidden */
        }
        
        #modal-name {
            font-size: 1.5em;
            font-weight: 700;
        }
        
        #modal-message {
            font-size: 1em;
            margin-top: 5px;
            opacity: 0.9;
        }

 /* ===================== NOTIFICATION BELL ===================== */
.notification-bell {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell i {
    font-size: 1.3rem;
    color: var(--text-dark, #212529);
    transition: color 0.2s ease, transform 0.2s ease;
}

.notification-bell:hover i {
    color: var(--primary-plum, #5D196B);
    transform: scale(1.1);
}

/* Notification count bubble */
.notif-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: crimson;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    line-height: 1;
    display: none; /* shown only when notifications exist */
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* ===================== NOTIFICATION MODAL ===================== */
.notif-modal {
    display: none; /* toggled via JS */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in-out;
}

/* Inner modal content */
.notif-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    padding: 20px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    animation: slideUp 0.25s ease-out;
}

/* Each notification request */
.notif-request {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-request:last-child {
    border-bottom: none;
}

.notif-request p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-dark, #212529);
}

/* Buttons */
.notif-request button {
    margin-left: 10px;
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

.accept-btn {
    background-color: var(--primary-plum, #5D196B);
    color: #fff;
}

.accept-btn:hover {
    background-color: #711f81;
    transform: scale(1.03);
}

.reject-btn {
    background-color: #ccc;
    color: #333;
}

.reject-btn:hover {
    background-color: #b3b3b3;
    transform: scale(1.03);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* ===================== SEARCH CONTAINER ===================== */
.search-container {
    position: relative; 
    display: flex;
    align-items: center;
    
    justify-content: flex-end; /* Align icon to the right when input is hidden */
    width: 35px; /* Initial width is just the icon size */
    transition: width 0.3s ease-in-out;
    z-index: 999; 
}

/* When active, expand the container and position it absolutely/fixed 
   to overlay other header content for a cleaner animation */
.search-container.active {
    position: absolute; /* Allows it to overlap the logo/bell for full expansion */
    right: 0px; /* Aligns to the right padding of the header */
    top: 15px; /* Aligns to the top padding of the header */
    width: calc(100% - 40px); /* Fill the entire width minus padding */
    max-width: 330px;
}

/* ===================== SEARCH ICON ===================== */
#searchIcon {
    font-size: 1.4rem;
    color: var(--text-dark, #212529);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 1001; /* Ensure icon is on top */
}

#searchIcon:hover {
    color: var(--primary-plum, #5D196B);
    transform: scale(1.1);
}

/* ===================== SEARCH INPUT ===================== */
.search-input {
    position: absolute; /* Allows it to expand under the icon */
    right: 0;
    width: 80%; 
    height: 35px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    font-size: 1rem;
    color: var(--text-dark, #212529);
    background: #fff;
    opacity: 0; /* Hidden initially */
    visibility: hidden; 
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1000;
}

/* ===================== WHEN SEARCH IS ACTIVE ===================== */
.search-container.active #searchInput {
    opacity: 1;
    visibility: visible;
}

/* ===================== SEARCH FILTER TAGS (Dropdown) ===================== */
.search-filters {
    display: none; 
    flex-direction: column;
    gap: 10px;
    padding: 15px 20px; /* Added horizontal padding to align with header */
    width: calc(100% + 40px); /* Widen to cover the padding area */
    position: absolute;
    top: 45px; 
 
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 990; 
    border-radius: 0 0 10px 10px;
}

/* When the search is active, show the filter tags */
.search-container.active #searchFilters {
    display: flex;
}

/* ===================== FILTER LABEL AND TAGS ===================== */
.filter-container {
    margin-bottom: 10px;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--text-dark, #212529);
    font-weight: bold;
}

.tags-container {
    display: flex;
    
    flex-direction: row; 
    gap: 10px;
    flex-wrap: wrap; 
    margin-top: 8px;
}

.tag {
    display: inline-block;
    padding: 8px 14px;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 25px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.tag:hover {
    background-color: var(--primary-plum, #5D196B);
    color: white;
}

.tag.selected {
    background-color: var(--primary-plum, #5D196B);
    color: white;
    font-weight: bold;
}

/* ===================== RESPONSIVE DESIGN ===================== */
@media (max-width: 768px) {
    .search-container.active {
        right: 0; 
        width: 320px; /* Take full viewport width */
        left: 0;
        padding: 0 20px;
    }
    .search-container.active #searchFilters {
         max-width: 380px;
        left: 0;
    }
    .tags-container {
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
    }
}


/* Force popup to overlay the entire viewport */
.popup-message {
    position: fixed !important; /* Force it to escape feed */
    inset: 0; /* top:0; right:0; bottom:0; left:0; shorthand */
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    opacity: 0;
    z-index: 99999; /* Stay above everything */
    pointer-events: none; /* Prevent accidental clicks behind fade */
    transition: opacity 0.3s ease-in-out;
}

.popup-message.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Inner popup box */
.popup-message .popup-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 36px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    text-align: center;
    font-size: 17px;
    font-weight: 500;
    color: #333;
    animation: popIn 0.3s ease forwards;
    max-width: 80%;
}

/* Color accent based on message type */
.popup-message.success .popup-content {
    border-top: 6px solid #28a745;
}
.popup-message.error .popup-content {
    border-top: 6px solid #dc3545;
}
.popup-message.info .popup-content {
    border-top: 6px solid #007bff;
}

/* Popup animation */
@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.bottom-nav {
    position: fixed;
    bottom: 0;
    max-width: 620px;
    width: 100%;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.icon-container {
    position: relative;
    display: inline-block;
}

.badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #FF3B3B;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.notification-popup {
    position: absolute; /* relative to icon-container */
    bottom: 60px;       /* popup appears above the heart icon */
    left: 50%;

    width: 250px;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}

.popup-header {
    background: #f5f5f5;
    padding: 10px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.popup-content {
    padding: 10px;
}

.notification-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f9f9f9;
}

.empty-text {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 10px 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Notification popup image */
.notification-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f9f9f9;
}

.notif-img {
    width: 40px;          /* fixed width */
    height: 40px;         /* fixed height */
    border-radius: 50%;   /* round image */
    object-fit: cover;    /* crop properly */
    margin-right: 10px;   /* space between image and text */
}

.notif-info {
    display: flex;
    flex-direction: column;
}

.notif-name {
    font-weight: bold;
    font-size: 14px;
}

.notif-location {
    font-size: 12px;
    color: #666;
}
.feed-section-title {
    margin: 20px 10px;
    color: #5D196B;
    font-weight: bold;
}

.matched-card {
    border: 2px solid #e91e63;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.2);
}

.matched-card .match-info {
    color: #e91e63;
    font-weight: 600;
}
/* Two-photo match layout */
.card-image-pair {
    position: relative;
    display: flex;
    width: 100%;
    height: 230px;
    border-radius: 1.2rem;
    overflow: hidden;
}

/* Half images */
.half-image {
    width: 50%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.half-image.left {
    border-right: 2px solid rgba(255,255,255,0.6);
}

.half-image.right:hover {
    transform: scale(1.05);
}

/* Glowing divider 💞 */
.match-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 100%;
    background: radial-gradient(circle, #ff38c9, transparent 70%);
    animation: glowPulse 2.5s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes glowPulse {
    0% { opacity: 0.7; transform: translateX(-50%) scaleX(1); }
    100% { opacity: 1; transform: translateX(-50%) scaleX(1.4); }
}

/* Floating heart animation ❤️ */
.big-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    font-size: 7rem;
    color: #ff0057;
    opacity: 0.9;
    animation: heartPulse 2s infinite ease-in-out;
    z-index: 5;
}

@keyframes heartPulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
}

/* Matched card visual theme */
.matched-card {
    border: 2px solid rgba(255,105,180,0.6);
    box-shadow: 0 0 15px rgba(255,105,180,0.4);
}
.verified-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #3b82f6; /* Blue background */
  border-radius: 50%;
  width: 18px;
  height: 18px;
  margin-left: 6px;
}

.check-icon {
  width: 12px;
  height: 12px;
}
.action-like {
    background: #1DA1F2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.action-like:hover {
    background: #0d8ddb;
}
.action-like.liked {
    background: #0cae0c;
    color: #fff;
}
.risk-badge {
    color: #ff3b3b;
    font-weight: bold;
    margin-left: 5px;
}
.search-filters {
    position: absolute;
    top: 45px; 
    left: 0;
    width: 100%;
    max-width: 400px;
    padding: 10px;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 900;

    /* --- CRITICAL ADDITIONS FOR SCROLLING --- */
    /* 1. Define a maximum height */
    max-height: 250px; /* Adjust this value (e.g., 250px) based on your design */
    
    /* 2. Enable scrollbars for vertical overflow */
    overflow-y: auto; 
    /* 3. Improve mobile scrolling experience (optional) */
    -webkit-overflow-scrolling: touch; 
    /* ---------------------------------------- */
    
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.search-container.active #searchFilters {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}
/* ======================================= */
/* 🔑 CSS for Toast Notifications */
/* ======================================= */

#notification-toast {
    position: fixed;
    bottom: -60px; /* Start position: hidden off-screen */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000; /* Ensure it's above everything else */
    
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 0.95em;
    text-align: center;
    min-width: 250px;
    max-width: 90%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    
    transition: bottom 0.5s ease-out, background-color 0.3s;
}

/* Styles for success/error states */
#notification-toast.success {
    background-color: #4CAF50; /* Green for success */
}
#notification-toast.error {
    background-color: #F44336; /* Red for error */
}

/* Class to make the toast visible */
#notification-toast.show {
    bottom: 20px; /* Slide into view */
}
/* Floating Message Button */
.message-btn {
  bottom: 25px;
  right: 25px;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 1000;
}


/* Unread counter badge */
.msg-badge {
  position: absolute;
  top: 10px;
  background: #ff1744;
  color: white;
  font-size: 11px;
  font-weight: bold;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

/* Hide badge when count is zero */
.msg-badge.hidden {
  display: none;
}

/* Add a gentle entrance animation */
@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.message-btn {
  animation: popIn 0.3s ease;
}

.modal { display: none; position: fixed; z-index: 9999; left:0; top:0; width:100%; height:100%; background-color: rgba(0,0,0,0.5); }
.modal-content { background:#fff; margin: 10% auto; padding:20px; border-radius: 10px; width: 400px; position: relative; }
.modal .close { position: absolute; top:10px; right:15px; font-size:24px; cursor:pointer; }
#report-reason { width: 100%; padding: 10px; margin-top:10px; margin-bottom:15px; border-radius:6px; border:1px solid #ccc; }
#report-form button { background:#f33; color:#fff; border:none; padding:10px 15px; border-radius:6px; cursor:pointer; }
#report-form button:hover { background:#d00; } 