/* ===============================
   Subscription Plans Styles (CSS)
   =============================== */

.subscription-section {
    padding: 100px 0 80px;
    background: #f8f9fa;
    min-height: 90vh;
}

.subscription-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    overflow: visible;
}

.subscription-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 3rem;
    font-weight: 700;
}

.subscription-container h2 .highlight {
    color: #e91e63;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Plans container */
#plans-container {
    display: flex;
    justify-content: center; /* center horizontally */
    flex-wrap: wrap;         /* wrap to next row if needed */
    gap: 30px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Plan card styles */
.plan-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    min-width: 280px;
    max-width: 320px;
    flex: 1 1 300px; /* flexible width, wraps nicely */
    border: 2px solid #f0f0f0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border-color: #e91e63;
}

.plan-card.current {
    border: 3px solid #e91e63;
    background: linear-gradient(135deg, #fff 0%, #fef7f7 100%);
    margin-top: 20px;
}

.plan-card.current:hover {
    transform: translateY(-10px);
}

.plan-card h3 {
    margin: 20px 0 30px 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.price-section {
    margin: 30px 0;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.price {
    font-size: 24px;
    font-weight: 700;
    color: #e91e63;
}

.price s {
    color: #999;
    margin-right: 15px;
    font-size: 18px;
}

.features-section {
    text-align: left;
    margin: 30px 0;
}

.features-title {
    font-size: 18px;
    font-weight: 600;
    color: #e91e63;
    margin-bottom: 20px;
    text-align: center;
}

.plan-card ul {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.plan-card ul li {
    padding: 12px 0 12px 30px;
    position: relative;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    border-bottom: 1px solid #f8f8f8;
}

.plan-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #e91e63;
    font-weight: bold;
    font-size: 16px;
}

.plan-card ul li:last-child {
    border-bottom: none;
}

.buy-button {
    margin-top: 30px;
    padding: 15px 40px;
    background: #e91e63;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.buy-button:hover {
    background: #d81b60;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

/* Badge */
.plan-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #e91e63;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Loading spinner */
#loading {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px 0;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #e91e63;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 0.8s linear infinite;
}

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

/* ===============================
   Responsive Design
   =============================== */

/* Tablet & Mobile: Vertical layout */
@media (max-width: 1024px) {
    #plans-container {
        justify-content: center;
        flex-wrap: wrap;
        gap: 25px;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    #plans-container {
        flex-direction: column;  /* vertical stack */
        padding: 0 10px;
    }

    .plan-card {
        width: 100%;
        max-width: none;
        min-width: auto;
        padding: 30px 20px;
    }

    .subscription-container h2 {
        font-size: 2.2rem;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .subscription-container h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .plan-card {
        padding: 25px 15px;
    }
}
main {
        position: relative;
    }
    
    .user-info-container {
        position: fixed;
        top: 10px;
        right: 20px;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        padding: 20px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.5);
        min-width: 280px;
        max-width: 320px;
        text-align: center;
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        cursor: pointer;
        transform-origin: top right;
        overflow: hidden;
    }
    
    .user-info-container.collapsed {
        padding: 8px;
        min-width: 60px;
        max-width: 60px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .profile-icon {
        width: 55px;
        height: 55px;
        background: linear-gradient(135deg, #e91e63, #f06292, #ff4081);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 18px auto;
        color: white;
        font-size: 24px;
        font-weight: 700;
        text-transform: uppercase;
        box-shadow: 0 6px 20px rgba(233, 30, 99, 0.5), 0 2px 8px rgba(233, 30, 99, 0.3);
        transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        flex-shrink: 0;
    }
    
    .user-info-container.collapsed .profile-icon {
        margin: 0;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .user-details {
        margin-bottom: 18px;
        opacity: 1;
        transform: translateY(0) scale(1);
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        max-height: 100px;
        overflow: hidden;
    }
    
    .user-info-container.collapsed .user-details {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
        max-height: 0;
        margin-bottom: 0;
        pointer-events: none;
    }
    
    .user-name {
        font-weight: 600;
        font-size: 16px;
        color: #333;
        margin-bottom: 6px;
        word-break: break-word;
        text-align: center;
        line-height: 1.3;
    }
    
    .user-email {
        font-size: 13px;
        color: #666;
        margin-bottom: 0;
        word-break: break-all;
        text-align: center;
        line-height: 1.3;
    }
    
    .logout-button {
        background: linear-gradient(135deg, #dc3545, #c82333);
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 10px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        width: 100%;
        display: block;
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 60px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
    }
    
    .user-info-container.collapsed .logout-button {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
        max-height: 0;
        padding: 0;
        margin: 0;
        pointer-events: none;
    }
    
    .logout-button:hover {
        background: linear-gradient(135deg, #c82333, #a71e2a);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }
    
    .user-info-loading {
        text-align: center;
        color: #666;
        font-size: 14px;
        opacity: 1;
        transition: opacity 0.3s ease;
    }
    
    .user-info-container.collapsed .user-info-loading {
        opacity: 0;
        pointer-events: none;
    }
    
    /* Add a subtle pulse animation for the collapsed state */
    .user-info-container.collapsed:hover .profile-icon {
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 8px 30px rgba(233, 30, 99, 0.6), 0 0 20px rgba(233, 30, 99, 0.3);
    }
    
    .user-info-container:hover {
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25), 0 6px 15px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }
    
    .user-info-container.collapsed:hover {
        transform: translateY(-3px) scale(1.05);
    }
    
    /* Tablet View - Adjust positioning */
    @media (max-width: 768px) and (min-width: 481px) {
        .user-info-container {
            top: 10px;
            right: 15px;
            min-width: 260px;
            max-width: 280px;
        }
        
        .user-info-container.collapsed {
            width: 55px;
            height: 55px;
        }
        
        .user-info-container.collapsed .profile-icon {
            width: 42px;
            height: 42px;
            font-size: 18px;
        }
        
        .profile-icon {
            width: 50px;
            height: 50px;
            font-size: 22px;
        }
    }
    
    /* Mobile View - Adjust for smaller screens */
    @media (max-width: 480px) {
        .user-info-container {
            top: 8px;
            right: 10px;
            min-width: 240px;
            max-width: 260px;
            padding: 15px;
        }
        
        .user-info-container.collapsed {
            width: 50px;
            height: 50px;
            padding: 3px;
        }
        
        .user-info-container.collapsed .profile-icon {
            width: 40px;
            height: 40px;
            font-size: 16px;
        }
        
        .profile-icon {
            width: 48px;
            height: 48px;
            font-size: 20px;
            margin-bottom: 12px;
        }
        
        .user-name {
            font-size: 15px;
            margin-bottom: 5px;
        }
        
        .user-email {
            font-size: 12px;
        }
        
        .logout-button {
            font-size: 13px;
            padding: 8px 16px;
        }
    }
    
    /* Extra small mobile devices */
    @media (max-width: 360px) {
        .user-info-container {
            right: 5px;
            top: 5px;
            min-width: 220px;
            max-width: 240px;
        }
        
        .user-info-container.collapsed {
            width: 45px;
            height: 45px;
        }
        
        .user-info-container.collapsed .profile-icon {
            width: 35px;
            height: 35px;
            font-size: 14px;
        }
    }
    
    /* Add smooth transitions for content visibility */
    .expandable-content {
        transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* Ensure the profile is always visible and accessible */
    .user-info-container {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .user-info-container.collapsed {
        justify-content: center;
        align-items: center;
    }
    
    /* Plan Name Font Size - Slightly Increased */
    .plan-card h3 {
        font-size: 18px !important;
        font-weight: 600;
        margin-bottom: 15px;
        color: #333;
        line-height: 1.2;
        text-align: center;
    }
    
    /* Responsive font sizes for plan names */
    @media (min-width: 769px) {
        .plan-card h3 {
            font-size: 20px !important;
        }
    }
    
    @media (max-width: 768px) and (min-width: 481px) {
        .plan-card h3 {
            font-size: 19px !important;
        }
    }
    
    @media (max-width: 480px) {
        .plan-card h3 {
            font-size: 17px !important;
        }
    }