.social-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px 0 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.social-sidebar:hover {
    transform: translateY(-50%) translateX(-5px);
}

.social-sidebar a {
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-sidebar a:hover {
    transform: scale(1.2);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Tooltip */
.social-sidebar a::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.social-sidebar a:hover::before {
    opacity: 1;
    visibility: visible;
    right: 55px;
}

.social-sidebar .youtube {
    background: linear-gradient(45deg, #FF0000, #CC0000);
}

.social-sidebar .facebook {
    background: linear-gradient(45deg, #1877F3, #42A5F5);
}

.social-sidebar .instagram {
    background: linear-gradient(45deg, #E1306C, #F56040);
}

.social-sidebar .twitter {
    background: linear-gradient(45deg, #000, #333);
}

.social-sidebar .throne {
    background: linear-gradient(45deg, #8a2be2, #ee5a24);
}

@media (max-width: 768px) {
    .social-sidebar {
        display: flex;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        transform: none;
        flex-direction: row;
        justify-content: space-evenly;
        width: 100%;
        border-radius: 20px 20px 0 0;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-bottom: none;
        padding: 15px 10px;
        background: rgba(26, 26, 46, 0.95);
        /* Dark background matching theme */
        backdrop-filter: blur(15px);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
        z-index: 10000;
        /* Ensure it's on top */
    }

    .social-sidebar:hover {
        transform: none;
    }

    .social-sidebar a {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    /* Hide tooltips on mobile */
    .social-sidebar a::before {
        display: none;
    }

    /* Adjust footer padding so content isn't hidden behind the bar */
    body {
        padding-bottom: 80px;
    }
}

/* Social Media Popup specific styles */
.social-popup-content {
    max-width: 400px;
    background: white;
    /* Ensure visibility if popup-modal doesn't set it */
    position: relative;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#socialPopupIcon i,
#socialPopupIcon svg {
    font-size: 3rem;
    /* Use gradient text if supported, else fallback color */
    background: -webkit-linear-gradient(45deg, #8a2be2, #ee5a24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #8a2be2;
}

/* Specific brand colors for the icon in popup */
#socialMediaPopup[data-platform="YouTube"] #socialPopupIcon i {
    background: -webkit-linear-gradient(45deg, #FF0000, #CC0000);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#socialMediaPopup[data-platform="Facebook"] #socialPopupIcon i {
    background: -webkit-linear-gradient(45deg, #1877F3, #42A5F5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #1877F3;
}

#socialMediaPopup[data-platform="Instagram"] #socialPopupIcon i {
    background: -webkit-linear-gradient(45deg, #E1306C, #F56040);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#socialMediaPopup[data-platform="X (Twitter)"] #socialPopupIcon svg {
    fill: black;
}

/* SVG handling might need direct fill */
#socialMediaPopup[data-platform="Send a Gift"] #socialPopupIcon i {
    background: -webkit-linear-gradient(45deg, #8a2be2, #ee5a24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popup-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.copy-feedback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10005;
}

.copy-feedback.show {
    opacity: 1;
}