/* ============================================
   HeyGen Style - Membership Page
   Clean, minimal, professional
   ============================================ */

/* CSS Variables - HeyGen Color Palette */
:root {
    --primary: #8B5CF6;
    --primary-hover: #7C3AED;
    --primary-light: #EDE9FE;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border-light: #E5E7EB;
    --border-normal: #D1D5DB;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
}

/* Remove animated background */
.background {
    display: none;
}

.floating-ball {
    display: none;
}

/* ============================================
   Header - Clean Navigation
   ============================================ */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 1.25rem;
}

.nav-menu {
    display: flex;
    gap: var(--space-2);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.5rem 0.875rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-icon {
    font-size: 1rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-plan-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.5rem 0.875rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.user-plan-btn:hover {
    border-color: var(--border-normal);
}

.plan-badge {
    padding: 0.1875rem 0.625rem;
    background: var(--primary);
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.dropdown-arrow {
    font-size: 0.625rem;
    transition: transform 0.2s;
}

.user-plan-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-item .item-icon {
    font-size: 1rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.25rem 0;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* ============================================
   Main Container
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    text-align: center;
    padding: 2rem 0 3rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   Current Plan Card
   ============================================ */
.current-plan-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
}

.plan-status-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
}

.status-left {
    flex: 1;
}

.status-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.plan-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-right {
    display: flex;
    align-items: center;
}

.status-label {
    padding: 0.375rem 0.875rem;
    background: #DCFCE7;
    color: #16A34A;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
}

.plan-details {
    display: flex;
    gap: var(--space-6);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.detail-icon {
    font-size: 1.125rem;
}

.detail-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Legacy styles - keep for compatibility */
.current-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.current-plan-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.plan-status-badge {
    padding: 0.375rem 1rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
}

.current-plan-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.feature-stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing-section {
    margin-bottom: var(--space-8);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-6);
}

/* ============================================
   Billing Toggle
   ============================================ */
.billing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
    padding: 0.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.billing-btn {
    padding: 0.625rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.billing-btn:hover {
    color: var(--text-primary);
}

.billing-btn.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.discount-badge {
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Legacy Pricing Toggle */
.pricing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.toggle-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.toggle-label.active {
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    width: 3.5rem;
    height: 2rem;
    background: var(--border-normal);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-slider {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(1.5rem);
}

.save-badge {
    padding: 0.25rem 0.75rem;
    background: var(--success);
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   Pricing Cards
   ============================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.pricing-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.2s;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.pricing-card.popular,
.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.popular-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 1.25rem;
    background: var(--primary);
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.plan-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.plan-price {
    margin-bottom: 1.5rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-currency {
    font-size: 1.5rem;
}

.price-period {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.price-note {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
}

.plan-features {
    list-style: none;
    margin-bottom: var(--space-8);
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Feature Items (div based) */
.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item.disabled {
    color: var(--text-tertiary);
}

.feature-item.disabled .feature-icon {
    color: var(--text-tertiary);
}

.feature-icon {
    font-size: 1.125rem;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--success);
    width: 1.25rem;
    text-align: center;
}

.feature-text {
    flex: 1;
}

.feature-icon.check {
    color: var(--success);
}

.feature-icon.cross {
    color: var(--text-tertiary);
}

.plan-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.plan-button.primary {
    background: var(--primary);
    color: white;
}

.plan-button.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.plan-button.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-normal);
}

.plan-button.secondary:hover {
    background: var(--bg-tertiary);
}

.plan-button.current {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* ============================================
   Pricing Card Buttons (.btn-plan)
   ============================================ */
.btn-plan {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--primary);
    color: white;
}

.btn-plan:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-plan:active {
    transform: translateY(0);
}

.btn-plan.current {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    border: 1px solid var(--border-normal);
}

.btn-plan.current:hover {
    transform: none;
    box-shadow: none;
}

.btn-plan:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    border: 1px solid var(--border-normal);
}

.btn-plan:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-light);
}

.faq-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding: 0.75rem 0 0;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ============================================
   Usage Stats Section
   ============================================ */
.usage-stats-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
}

.usage-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.usage-items {
    display: grid;
    gap: 1.5rem;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.usage-info {
    flex: 1;
}

.usage-label {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.usage-bar {
    height: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.usage-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.usage-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ============================================
   Usage Section
   ============================================ */
.usage-section {
    margin-bottom: var(--space-8);
}

.usage-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
}

.usage-item {
    margin-bottom: var(--space-6);
}

.usage-item:last-child {
    margin-bottom: 0;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.usage-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.usage-count {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.usage-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: 999px;
    transition: width 0.3s ease;
}

.usage-hint {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

.usage-reset {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.reset-icon {
    font-size: 1.125rem;
}

.reset-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   Benefits / Comparison Section
   ============================================ */
.benefits-section {
    margin-bottom: var(--space-8);
}

.comparison-table {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-light);
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid var(--border-light);
}

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

.header-cell {
    padding: var(--space-4);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.header-cell.feature-col {
    text-align: left;
}

.table-cell {
    padding: var(--space-4);
    font-size: 0.875rem;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-cell.feature-col {
    font-weight: 600;
    text-align: left;
    justify-content: flex-start;
}

/* ============================================
   FAQ Grid
   ============================================ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-6);
}

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

.faq-answer {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-1rem);
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.success {
    background: var(--success);
    color: white;
}

.toast.error {
    background: var(--error);
    color: white;
}

.toast.info {
    background: var(--primary);
    color: white;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 1.5rem;
    }

    .container {
        padding: 1.5rem;
    }

    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .current-plan-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .pricing-card {
        padding: 1.5rem;
    }

    .current-plan-card {
        padding: 1.5rem;
    }

    .current-plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .header-content {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-icon {
        font-size: 1.125rem;
    }

    .container {
        padding: 1rem;
    }

    .page-header {
        padding: 1.5rem 0 2rem;
    }

    .page-title {
        font-size: 1.375rem;
    }

    .page-subtitle {
        font-size: 0.875rem;
    }

    .pricing-toggle {
        flex-direction: column;
        gap: 0.75rem;
    }

    .price-amount {
        font-size: 2rem;
    }

    .faq-section {
        padding: 1.5rem;
    }

    .comparison-table {
        overflow-x: auto;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        font-size: 0.8125rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}
