/* Premium Popup Styles */
.premium-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.premium-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.premium-popup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s ease;
    position: relative;
}

.premium-popup-overlay.active .premium-popup {
    transform: scale(1) translateY(0);
}

/* Close Button - GUARANTEED TO WORK */
.premium-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    font-size: 1.5em;
    transition: all 0.3s ease;
    z-index: 10001;
}

.premium-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.premium-popup-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    padding: 30px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    color: #333;
}

.premium-popup-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
}

.gamepad-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
    animation: bounce 2s infinite;
    color: #333;
}

.premium-popup-header p {
    margin: 0;
    font-size: 1.2em;
    opacity: 0.8;
}

.premium-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
}

.plan-column {
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.plan-column.basic {
    background: #f8f9fa;
    border-right: 2px solid #e9ecef;
}

.plan-column.premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.plan-column.premium::before {
    content: "RECOMMENDED";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffd700;
    color: #333;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 1px;
}

.plan-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 5px;
    color: #ffd700;
}

.plan-column.basic .plan-price {
    color: #28a745;
}

.plan-period {
    font-size: 1em;
    opacity: 0.8;
    margin-bottom: 30px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}

.plan-features li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    font-size: 1.1em;
}

.plan-column.basic .plan-features li {
    border-bottom: 1px solid #e9ecef;
    color: #333;
}

.plan-features li i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 1.2em;
}

.plan-features li.unavailable {
    opacity: 0.5;
    text-decoration: line-through;
}

.plan-features li.unavailable i {
    color: #dc3545;
}

.plan-features li.available i {
    color: #28a745;
}

.plan-column.premium .plan-features li.available i {
    color: #ffd700;
}

.plan-cta {
    margin-top: auto;
}

.plan-btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-btn.basic-btn {
    background: #6c757d;
    color: white;
}

.plan-btn.basic-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.plan-btn.premium-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.plan-btn.premium-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.premium-benefits {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    color: #333;
}

.premium-benefits h3 {
    margin: 0 0 20px 0;
    font-size: 1.5em;
    color: #667eea;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.benefit-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-item i {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 10px;
}

.benefit-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #333;
}

.benefit-item p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .premium-popup {
        width: 95%;
        margin: 20px;
    }
    
    .premium-comparison {
        grid-template-columns: 1fr;
    }
    
    .plan-column.basic {
        border-right: none;
        border-bottom: 2px solid #e9ecef;
    }
    
    .premium-popup-header h2 {
        font-size: 2em;
    }
    
    .plan-price {
        font-size: 2.5em;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* Payment Form */
.payment-form {
    background: white;
    padding: 0;
    border-radius: 0 0 20px 20px;
}

.payment-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) translateX(-2px);
}

.payment-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    font-weight: 600;
}

.payment-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1em;
}

.payment-details {
    padding: 30px;
}

.order-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.order-summary h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #666;
    font-size: 1em;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 0 0;
    margin-top: 15px;
    border-top: 2px solid #e9ecef;
    font-weight: 700;
    font-size: 1.2em;
    color: #333;
}

.order-total span:last-child {
    color: #667eea;
    font-size: 1.3em;
}

.payment-method {
    margin-bottom: 30px;
}

.payment-method h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

#card-element {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
}

#card-element:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#card-errors {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
    display: flex;
    align-items: center;
}

.pay-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.pay-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.pay-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Payment Processing */
.payment-processing {
    display: none;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 0 0 20px 20px;
}

.payment-processing.active {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive for Payment Form */
@media (max-width: 768px) {
    .payment-header {
        padding: 20px;
    }
    
    .back-btn {
        left: 15px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .payment-header h3 {
        font-size: 1.5em;
    }
    
    .payment-details {
        padding: 20px;
    }
    
    .order-summary {
        padding: 15px;
    }
    
    .pay-btn {
        padding: 15px 25px;
        font-size: 1.1em;
    }
}