/* ============================================
   MusiEQ — Pricing Styles
   ============================================ */

/* Pricing Hero */
.pricing-hero {
    padding: 100px 0 50px;
    text-align: center;
    position: relative;
}

.pricing-hero h2 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-hero>.container>p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Plan Toggle */
.plan-type-toggle {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 4px;
    border-radius: var(--radius-full);
    gap: 4px;
}

.toggle-btn {
    padding: 10px 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.toggle-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

/* Pricing Sections */
.pricing-section {
    display: none;
    padding: 40px 0 100px;
}

.pricing-section.active {
    display: block;
}

.pricing-section>.container>.section-subtitle {
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Pricing Controls (Toggle + Currency) */
.pricing-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 32px;
}

.currency-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 6px 16px;
    border-radius: var(--radius-full);
}

.currency-picker label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.currency-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    padding-right: 4px;
}

.currency-select option {
    background: #1e1b29;
    color: white;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}


.pricing-grid.user-plans {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
}

/* Pricing Card */
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    position: relative;
    transition: all var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

/* Featured card — gradient border */
.pricing-card.featured {
    border-color: transparent;
    background-clip: padding-box;
    position: relative;
    transform: scale(1.03);
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--radius-xl) + 1px);
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.pricing-card.featured:hover {
    transform: scale(1.03) translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

/* Popular Badge */
.popular-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 5px 20px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
}

/* Plan Header */
.plan-header {
    text-align: center;
    margin-bottom: 24px;
}

.plan-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 14px;
}

.plan-icon.free {
    background: rgba(100, 116, 139, 0.15);
}

.plan-icon.pro {
    background: rgba(139, 92, 246, 0.15);
}

.plan-icon.premium {
    background: rgba(244, 114, 182, 0.15);
}

.plan-icon.vip {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(244, 114, 182, 0.3));
}

.plan-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.plan-description {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Price */
.plan-price {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.plan-price .price {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.plan-price .period {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Features List */
.plan-features {
    list-style: none;
    margin-bottom: 28px;
}

.plan-features li {
    padding: 9px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li.included {
    color: var(--text-secondary);
}

.plan-features li.included::before {
    content: '';
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.plan-features li.excluded {
    color: var(--text-muted);
    opacity: 0.5;
}

.plan-features li.excluded::before {
    content: '';
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

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

.current-plan-badge {
    display: block;
    text-align: center;
    padding: 12px;
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-glass);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.faq-item {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.faq-chevron {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary-light);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer-inner {
    padding: 0 28px 24px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.925rem;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

/* ============================================
   Modal Styles
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(22, 17, 33, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    position: relative;
    backdrop-filter: blur(20px);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition-fast);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Order Summary */
.order-summary {
    background: var(--bg-elevated);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid var(--border-glass);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.9rem;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-light);
    padding-top: 14px;
}

/* Loading & Error */
.payment-loading,
.payment-error,
.auth-required {
    text-align: center;
    padding: 20px;
}

.payment-loading .spinner,
.guilds-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.payment-error {
    color: var(--danger);
}

.auth-required p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Guild Selection */
.guilds-list {
    max-height: 300px;
    overflow-y: auto;
}

.guilds-list::-webkit-scrollbar {
    width: 4px;
}

.guilds-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 2px;
}

.guild-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1.5px solid transparent;
}

.guild-item:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.guild-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    overflow: hidden;
}

.guild-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guild-info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.guild-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.guilds-loading,
.guilds-error,
.no-guilds {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.no-guilds a {
    display: inline-block;
    margin-top: 15px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .pricing-grid.user-plans {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 768px) {
    .pricing-hero h2 {
        font-size: 2rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 28px 20px;
    }

    .faq-question {
        padding: 20px 22px;
    }

    .faq-answer-inner {
        padding: 0 22px 20px;
    }
}

@media (max-width: 380px) {
    .plan-type-toggle {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        border-radius: var(--radius-lg);
        padding: 6px;
    }

    .toggle-btn {
        width: 100%;
        padding: 10px 0;
        text-align: center;
    }

    .pricing-card {
        padding: 30px 20px;
    }

    .popular-badge {
        font-size: 0.75rem;
        padding: 4px 16px;
    }
}