/* Floating Social Media Button - Always Left Position */
.social-float-container {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    right: auto !important;
    z-index: 9999;
    direction: ltr !important; /* Force LTR for consistent positioning */
}

/* Force left positioning - override any RTL/LTR attempts */
/* Responsive positioning */
@media (max-width: 768px) {
    .social-float-container {
        bottom: 20px;
        left: 20px; /* Fixed to bottom-left on mobile */
    }
}

/* Main floating button */
.social-float-btn {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(118, 75, 162, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
    animation: float 4s ease-in-out infinite, glow-pulse 3s ease-in-out infinite alternate;
}

.social-float-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 50%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 50%;
}

.social-float-btn:hover::before {
    opacity: 1;
}

.social-float-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6), 0 0 0 8px rgba(118, 75, 162, 0.2);
}

.social-float-btn i {
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.social-float-btn:hover i {
    transform: scale(1.2) rotate(-10deg);
}

/* Enhanced floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(2deg); }
    50% { transform: translateY(-15px) rotate(0deg); }
    75% { transform: translateY(-8px) rotate(-2deg); }
}

/* Glow pulse animation */
@keyframes glow-pulse {
    0% {
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(118, 75, 162, 0.3);
    }
    100% {
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6), 0 0 0 4px rgba(118, 75, 162, 0.4);
    }
}

/* Social media menu - Always positioned from left */
.social-menu {
    position: absolute;
    bottom: 80px;
    left: 0 !important;
    right: auto !important;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.8) rotateY(-15deg);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    perspective: 1000px;
}

/* Force left-positioned arrow */
.social-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1) rotateY(0deg);
}

.social-menu::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25px !important;
    right: auto !important;
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
    transform: rotate(45deg);
    border-right: 2px solid rgba(102, 126, 234, 0.3);
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    z-index: -1;
}

/* Arrow positioning for mobile screens */
@media (max-width: 768px) {
    .social-menu::before {
        left: 40px !important; /* Adjust arrow position for mobile menu */
    }
}

@media (max-width: 480px) {
    .social-menu::before {
        left: 35px !important; /* Adjust arrow position for small screens */
    }
}

/* Override any attempts to change positioning */
.social-float-container,
.social-menu {
    left: auto !important;
    right: auto !important;
}

/* Force left positioning regardless of parent direction */
body[dir="rtl"] .social-float-container,
body[dir="ltr"] .social-float-container,
html[dir="rtl"] .social-float-container,
html[dir="ltr"] .social-float-container,
.rtl .social-float-container,
.ltr .social-float-container {
    left: 30px !important;
    right: auto !important;
    direction: ltr !important;
}

/* Force left positioning on mobile regardless of direction */
@media (max-width: 768px) {
    body[dir="rtl"] .social-float-container,
    body[dir="ltr"] .social-float-container,
    html[dir="rtl"] .social-float-container,
    html[dir="ltr"] .social-float-container,
    .rtl .social-float-container,
    .ltr .social-float-container {
        left: 20px !important;
        right: auto !important;
    }
}

@media (max-width: 480px) {
    body[dir="rtl"] .social-float-container,
    body[dir="ltr"] .social-float-container,
    html[dir="rtl"] .social-float-container,
    html[dir="ltr"] .social-float-container,
    .rtl .social-float-container,
    .ltr .social-float-container {
        left: 15px !important;
        right: auto !important;
    }
}

.social-menu h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    position: relative;
}

.social-menu h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    border-radius: 15px;
    text-decoration: none;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-weight: 500;
    font-size: 14px;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.8s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    transform: translateX(8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.social-link i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
    position: relative;
    z-index: 2;
    border-radius: 10px;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

/* Remove RTL support for consistent positioning */

.social-link:hover i {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-link span {
    flex: 1;
    font-weight: 600;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
}

/* Enhanced platform-specific styles */
.social-link.facebook {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.15), rgba(24, 119, 242, 0.05));
    border-color: rgba(24, 119, 242, 0.3);
}

.social-link.facebook:hover {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.25), rgba(24, 119, 242, 0.15));
    box-shadow: 0 8px 30px rgba(24, 119, 242, 0.4);
    border-color: rgba(24, 119, 242, 0.5);
}

.social-link.facebook i {
    background: linear-gradient(135deg, #1877f2, #0d5dc7);
    color: white;
    box-shadow: 0 2px 10px rgba(24, 119, 242, 0.3);
}

.social-link.discord {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(88, 101, 242, 0.05));
    border-color: rgba(88, 101, 242, 0.3);
}

.social-link.discord:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.25), rgba(88, 101, 242, 0.15));
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.4);
    border-color: rgba(88, 101, 242, 0.5);
}

.social-link.discord i {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    color: white;
    box-shadow: 0 2px 10px rgba(88, 101, 242, 0.3);
}

.social-link.youtube {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.15), rgba(255, 0, 0, 0.05));
    border-color: rgba(255, 0, 0, 0.3);
}

.social-link.youtube:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.25), rgba(255, 0, 0, 0.15));
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.4);
    border-color: rgba(255, 0, 0, 0.5);
}

.social-link.youtube i {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

.social-link.instagram {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.15), rgba(225, 48, 108, 0.05));
    border-color: rgba(225, 48, 108, 0.3);
}

.social-link.instagram:hover {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.25), rgba(225, 48, 108, 0.15));
    box-shadow: 0 8px 30px rgba(225, 48, 108, 0.4);
    border-color: rgba(225, 48, 108, 0.5);
}

.social-link.instagram i {
    background: linear-gradient(135deg, #e1306c, #fd1d1d, #fcb045);
    color: white;
    box-shadow: 0 2px 10px rgba(225, 48, 108, 0.3);
}

/* Enhanced chat indicator */
.chat-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: bold;
    animation: pulse-enhanced 2s infinite, bounce-gentle 3s infinite;
    border: 3px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

@keyframes pulse-enhanced {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.5), 0 0 0 0 rgba(0, 255, 136, 0.7);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.8), 0 0 0 8px rgba(0, 255, 136, 0.2);
    }
}

@keyframes bounce-gentle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

/* Remove old mobile responsive section and replace with enhanced version */

/* Force left positioning in all responsive breakpoints */
@media (max-width: 768px) {
    .social-float-container {
        bottom: 20px !important;
        left: 20px !important;
        right: auto !important;
    }

    .social-float-btn {
        width: 58px;
        height: 58px;
        font-size: 24px;
    }

    .social-menu {
        min-width: 280px;
        left: 0 !important; /* Changed from negative to 0 to keep menu visible */
        right: auto !important;
        padding: 18px;
    }

    .social-link {
        padding: 12px 15px;
        font-size: 13px;
    }

    .social-link i {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .social-float-container {
        bottom: 15px !important;
        left: 15px !important;
        right: auto !important;
    }

    .social-float-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .social-menu {
        min-width: 250px; /* Reduced width to fit better on small screens */
        left: 0 !important; /* Changed from negative to 0 to keep menu visible */
        right: auto !important;
        padding: 16px;
        max-width: calc(100vw - 30px); /* Ensure menu doesn't exceed screen width */
    }

    .social-link {
        padding: 10px 12px;
        font-size: 12px;
    }

    .social-link i {
        width: 28px;
        height: 28px;
        font-size: 15px;
        margin-right: 12px;
    }

    .chat-indicator {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    .social-menu {
        min-width: 220px !important;
        max-width: calc(100vw - 20px) !important;
        padding: 12px !important;
    }

    .social-link span {
        font-size: 11px !important;
    }
}/* Close button animation */
.social-float-btn.active {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.social-float-btn.active:hover {
    transform: rotate(45deg) scale(1.1);
}

/* Entrance animation */
@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.social-float-container {
    animation: slideInFromBottom 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Enhanced stagger animation for menu items */
.social-link {
    opacity: 0;
    transform: translateY(20px) translateX(10px);
    animation: slideInUp 0.4s ease forwards;
}

.social-menu.active .social-link:nth-child(1) { animation-delay: 0.1s; }
.social-menu.active .social-link:nth-child(2) { animation-delay: 0.2s; }
.social-menu.active .social-link:nth-child(3) { animation-delay: 0.3s; }
.social-menu.active .social-link:nth-child(4) { animation-delay: 0.4s; }
.social-menu.active .social-link:nth-child(5) { animation-delay: 0.5s; }
.social-menu.active .social-link:nth-child(6) { animation-delay: 0.6s; }

/* Remove RTL animation adjustments for consistent behavior */

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Simplified direction transitions */
.social-float-container {
    transition: all 0.3s ease;
}

.social-menu {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
