﻿/* ============================================
   POPUP И FLOATING BUTTON - POPUP.CSS
   ============================================ */

/* FLOATING BUTTON */
.floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #7ED321, #5CB51B);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(126, 211, 33, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    border: 3px solid rgba(255, 255, 255, 0.1);
    animation: pulse 2s infinite;
    overflow: hidden;
}

.floating-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.floating-button:hover::before {
    left: 100%;
}

.floating-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(126, 211, 33, 0.6);
}

.floating-button:active {
    transform: scale(0.95);
}

.floating-button-icon {
    font-size: 28px;
    color: white;
    animation: bounce 1.5s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0% { 
        box-shadow: 0 8px 25px rgba(126, 211, 33, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(126, 211, 33, 0.8);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: 0 8px 25px rgba(126, 211, 33, 0.4);
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    40% { 
        transform: translateY(-5px) rotate(-5deg); 
    }
    60% { 
        transform: translateY(-3px) rotate(3deg); 
    }
}

/* POPUP OVERLAY */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 20px;
    box-sizing: border-box;
}

.popup-overlay.active {
    display: flex;
    opacity: 1;
}

/* POPUP CONTAINER */
.popup-container {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    position: relative;
    border: 2px solid rgba(126, 211, 33, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.7) translateY(50px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.popup-overlay.active .popup-container {
    transform: scale(1) translateY(0);
}

/* POPUP HEADER */
.popup-header {
    background: linear-gradient(135deg, #7ED321, #5CB51B);
    padding: 25px 20px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.popup-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px),
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px, 40px 40px;
    animation: floatingDots 20s linear infinite;
}

@keyframes floatingDots {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 50px 50px, -30px 30px, 40px -40px; }
}

.popup-title {
    font-size: 1.9rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.popup-title .title-icon {
    font-size: 1.8rem;
    animation: titleIconSpin 3s ease-in-out infinite;
}

@keyframes titleIconSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

.popup-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* CLOSE BUTTON */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* POPUP CONTENT */
.popup-content {
    padding: 30px 25px 25px;
}

.bonus-card {
    background: linear-gradient(135deg, #333333, #2a2a2a);
    border-radius: 15px;
    padding: 25px 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(126, 211, 33, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bonus-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(126, 211, 33, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.bonus-amount {
    font-size: 2.8rem;
    font-weight: bold;
    color: #7ED321;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(126, 211, 33, 0.5);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bonus-amount .currency-icon {
    font-size: 2.4rem;
    animation: currencyFloat 2s ease-in-out infinite;
}

@keyframes currencyFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.bonus-text {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    color: #fff;
    font-weight: 500;
}

.features-list {
    list-style: none;
    margin: 25px 0;
    padding: 0;
}

.features-list li {
    padding: 10px 0;
    font-size: 1rem;
    opacity: 0.85;
    position: relative;
    padding-left: 35px;
    color: #fff;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.features-list li:hover {
    opacity: 1;
    transform: translateX(5px);
}

.features-list li::before {
    position: absolute;
    left: 0;
    top: 10px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #7ED321, #5CB51B);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f00c"; /* Font Awesome check icon */
    color: white;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(126, 211, 33, 0.3);
}

/* POPUP BUTTONS */
.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.popup-btn {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.popup-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.popup-btn:hover::before {
    left: 100%;
}

.popup-btn.primary {
    background: linear-gradient(135deg, #7ED321, #5CB51B);
    color: white;
    box-shadow: 0 4px 15px rgba(126, 211, 33, 0.3);
    border: 2px solid transparent;
}

.popup-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(126, 211, 33, 0.5);
}

.popup-btn.primary:active {
    transform: translateY(-1px);
}

.popup-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.popup-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.popup-btn-icon {
    font-size: 1rem;
}

/* LOADING STATE */
.popup-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.popup-btn.loading .popup-btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .floating-button {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .floating-button-icon {
        font-size: 22px;
    }
    
    .popup-overlay {
        padding: 15px;
    }
    
    .popup-container {
        width: 100%;
        max-width: none;
    }
    
    .popup-header {
        padding: 20px 15px 15px;
    }
    
    .popup-title {
        font-size: 1.6rem;
    }
    
    .popup-subtitle {
        font-size: 0.9rem;
    }
    
    .popup-content {
        padding: 25px 20px 20px;
    }
    
    .bonus-amount {
        font-size: 2.2rem;
    }
    
    .bonus-amount .currency-icon {
        font-size: 1.8rem;
    }
    
    .popup-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .popup-btn {
        padding: 14px 18px;
        font-size: 1rem;
    }
    
    .features-list li {
        font-size: 0.9rem;
        padding: 8px 0;
        padding-left: 30px;
    }
    
    .features-list li::before {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .floating-button {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }
    
    .floating-button-icon {
        font-size: 20px;
    }
    
    .popup-overlay {
        padding: 10px;
    }
    
    .popup-title {
        font-size: 1.4rem;
    }
    
    .bonus-amount {
        font-size: 2rem;
    }
    
    .popup-content {
        padding: 20px 15px 15px;
    }
    
    .bonus-card {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    .floating-button {
        animation: none;
    }
    
    .floating-button-icon {
        animation: none;
    }
    
    .popup-title .title-icon {
        animation: none;
    }
    
    .bonus-amount .currency-icon {
        animation: none;
    }
    
    .bonus-card::before {
        animation: none;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .popup-container {
        border: 3px solid #7ED321;
    }
    
    .popup-btn.primary {
        border: 2px solid white;
    }
    
    .popup-btn.secondary {
        border: 2px solid #ccc;
    }
}

/* DARK THEME PREFERENCE */
@media (prefers-color-scheme: dark) {
    .popup-container {
        background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
        border-color: rgba(126, 211, 33, 0.4);
    }
    
    .bonus-card {
        background: linear-gradient(135deg, #252525, #1a1a1a);
        border-color: rgba(126, 211, 33, 0.4);
    }
}
