/* General styles for the full-screen modal container */
.unlock-likes-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f2f5; /* Light grey background */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Allow scrolling for content */
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    font-family: "Inter", sans-serif;
    padding-bottom: 20px; /* Space at the bottom */
}

.unlock-likes-modal-container.open {
    opacity: 1;
    transform: translateY(0);
}

/* Header styles */
.unlock-likes-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    border-radius: 12px 12px 0 0; /* Match container border radius */
}

.unlock-likes-header .back-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: transform 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.unlock-likes-header .back-button:hover {
    transform: translateX(-5px);
    background-color: #eee;
}

.unlock-likes-header .back-button svg {
    width: 24px;
    height: 24px;
    stroke: #333;
}

.unlock-likes-title {
    flex-grow: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-right: 40px; /* Offset for back button */
}

/* Main content area */
.unlock-likes-content {
    flex-grow: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

/* Unlock Button */
.unlock-button {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFB6C1 100%); /* Light gradient */
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 9999px; /* Fully rounded */
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    width: 80%; /* Responsive width */
    max-width: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.unlock-button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 16px rgba(255, 107, 107, 0.4);
}

.unlock-button:disabled {
    background: linear-gradient(135deg, #ccc 0%, #eee 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

.unlock-button.unlocked-active {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%); /* Green for unlocked */
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

/* Likers Grid */
.likes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive grid */
    gap: 1rem;
    width: 100%;
    max-width: 900px; /* Max width for the grid */
    margin: 0 auto;
    padding: 1rem;
}

/* Liker Card */
.liker-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.3s ease;
    cursor: pointer;
    position: relative; /* For the blur overlay */
}

.liker-card.blurred .liker-photo {
    filter: blur(10px); /* Apply blur and grayscale */
    transition: filter 0.3s ease;
}

.liker-card.blurred .liker-name {
    color: transparent;
    /* text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); */
    background: linear-gradient(45deg, transparent 20%, black 50%, transparent 40%);
    background-clip: text;
}

.liker-card.unlocked {
    cursor: pointer;
}

.liker-card:hover:not(.blurred) {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.liker-photo {
    width: 100%;
    height: 150px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.liker-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 0.5rem;
}

.no-likers-message {
    text-align: center;
    width: 100%;
    padding: 2rem;
    color: #666;
    font-size: 1.2rem;
}

/* Dreamy Popup for individual likers */
.dreamy-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    backdrop-filter: blur(10px); /* Dreamy blur effect */
    z-index: 1001; /* Above main modal */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none; /* Make it unclickable when hidden */
    transition: opacity 0.3s ease;
}

.dreamy-popup.open {
    opacity: 1;
    pointer-events: all; /* Make it clickable when open */
}

.dreamy-popup-content {
    background-color: #fff;
    border-radius: 20px; /* More rounded for dreamy feel */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Bounce effect */
}

.dreamy-popup.open .dreamy-popup-content {
    transform: scale(1);
}

.dreamy-popup-image {
    width: 200px;
    height: 200px;
    border-radius: 50%; /* Circular image for dreamy look */
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid #FFDDC1; /* Soft border */
    box-shadow: 0 0 15px rgba(255, 200, 180, 0.6); /* Soft glow */
}

.dreamy-popup-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.dreamy-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-match, .btn-cancel {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 9999px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-match {
    background: linear-gradient(45deg, #76DE63, #4CAF50); /* Green gradient */
    color: white;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn-match:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
}

.btn-cancel {
    background: linear-gradient(45deg, #FF6B6B, #E57373); /* Red gradient */
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.4);
}


/* Reusing general popup styles from other modules for consistency */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002; /* Above unlock-likes and dreamy popup */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 350px;
    width: 90%;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.custom-modal-overlay.active .custom-modal {
    transform: translateY(0);
}

.custom-modal-message {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.custom-modal-button {
    background-color: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.custom-modal-button:hover {
    background-color: #0056b3;
}

/* Small Message Popup */
.small-message-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1003; /* Highest z-index */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.small-message-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .likes-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        padding: 0.5rem;
    }

    .liker-card {
        padding: 0.8rem;
    }

    .liker-photo {
        height: 120px;
    }

    .liker-name {
        font-size: 1rem;
    }

    .unlock-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 90%;
    }

    .dreamy-popup-content {
        padding: 1.5rem;
    }

    .dreamy-popup-image {
        width: 150px;
        height: 150px;
    }

    .dreamy-popup-name {
        font-size: 1.5rem;
    }

    .btn-match, .btn-cancel {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .likes-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .liker-card {
        padding: 0.6rem;
    }

    .liker-photo {
        height: 100px;
    }

    .liker-name {
        font-size: 0.9rem;
    }

    .unlock-likes-header .back-button {
        width: 36px;
        height: 36px;
    }

    .unlock-likes-title {
        font-size: 1.2rem;
        margin-right: 36px;
    }

    .unlock-button {
        width: 95%;
    }
}
