/* ========================================
   COMPONENTS — Buttons, Cards, Badges, Nav
   ======================================== */

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    color: #fff;
    padding: 16px 32px;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 2s ease-in-out infinite;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: var(--shadow-glow-lg);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    color: #a78bfa;
    padding: 16px 32px;
    font-size: 1.125rem;
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: var(--radius-lg);
}
.btn-outline:hover {
    background: rgba(30, 27, 75, 0.5);
    color: #fff;
    border-color: rgba(139, 92, 246, 0.8);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
}

.btn-ghost {
    background: rgba(30, 41, 59, 0.8);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
}
.btn-ghost:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(139, 92, 246, 0.5);
}

/* --- Cards --- */
.card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    overflow: hidden;
}
.card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
}

.card-glass {
    background: rgba(30, 27, 75, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-purple {
    background: rgba(109, 40, 217, 0.1);
    border: 1px solid rgba(109, 40, 217, 0.3);
    color: #a78bfa;
}

.badge-status {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #fff;
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* --- Status Dots --- */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot--online { background: var(--color-green); animation: pulse 2s infinite; }
.status-dot--busy { background: var(--color-yellow); }
.status-dot--away { background: var(--color-text-dim); }

/* --- Text Gradient --- */
.text-gradient {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-alt {
    background: linear-gradient(135deg, #22d3ee, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Step Number --- */
.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    position: absolute;
    top: -16px;
    left: -8px;
}

/* --- Icon Box --- */
.icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: rgba(109, 40, 217, 0.1);
    border: 1px solid rgba(109, 40, 217, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.card:hover .icon-box,
.group:hover .icon-box {
    background: rgba(109, 40, 217, 0.2);
}
.icon-box svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary-light);
    transition: color var(--transition);
}
.card:hover .icon-box svg,
.group:hover .icon-box svg {
    color: var(--color-accent);
}

/* --- FAQ Accordion --- */
.faq-item {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: border-color var(--transition);
}
.faq-item.active {
    border-color: var(--color-border-hover);
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: color var(--transition);
}
.faq-question:hover {
    color: #a78bfa;
}
.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary-light);
    transition: transform var(--transition);
    flex-shrink: 0;
}
.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 24px 20px;
}
.faq-answer p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* --- Pricing Cards --- */
.pricing-card {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: all var(--transition);
}
.pricing-card--default {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--color-border);
}
.pricing-card--default:hover {
    border-color: var(--color-border-hover);
}
.pricing-card--highlighted {
    background: linear-gradient(180deg, rgba(109, 40, 217, 0.25), rgba(15, 23, 42, 0.6));
    border: 2px solid rgba(139, 92, 246, 0.5);
    box-shadow: var(--shadow-glow-lg);
}
.pricing-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6d28d9, #06b6d4);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 20px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-glow);
    white-space: nowrap;
}
.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}
.pricing-features li svg {
    width: 20px;
    height: 20px;
    color: var(--color-green);
    flex-shrink: 0;
    margin-top: 1px;
}

/* --- Reader Card --- */
.reader-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.reader-card__image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}
.reader-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card:hover .reader-card__image img {
    transform: scale(1.05);
}
.reader-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 1), transparent, transparent);
}
.reader-card__hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 27, 75, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.card:hover .reader-card__hover-overlay {
    opacity: 1;
}
.reader-card__content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.reader-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

/* --- Chat Demo --- */
.chat-demo {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.chat-demo__glow {
    position: absolute;
    inset: -16px;
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.2), rgba(6, 182, 212, 0.2));
    border-radius: 24px;
    filter: blur(24px);
    opacity: 0.6;
}
.chat-demo__container {
    position: relative;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(139, 92, 246, 0.3);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}
.chat-demo__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(30, 27, 75, 0.5);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}
.chat-demo__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d28d9, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.chat-demo__avatar svg {
    width: 20px;
    height: 20px;
    color: #fff;
}
.chat-demo__avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--color-green);
    border-radius: 50%;
    border: 2px solid rgba(15, 23, 42, 0.9);
    animation: pulse 2s infinite;
}
.chat-demo__messages {
    height: 320px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-msg {
    max-width: 85%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.6;
    animation: fadeInUp 0.3s ease;
}
.chat-msg--user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg--psychic {
    align-self: flex-start;
    background: rgba(30, 27, 75, 0.6);
    color: #e2e8f0;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-top-left-radius: 4px;
}
.chat-demo__input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.5);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}
.chat-demo__input-field {
    flex: 1;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}
.chat-demo__send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition);
}
.chat-demo__send:hover {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}
.chat-demo__send svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

/* --- Typing Indicator --- */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(30, 27, 75, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    border-top-left-radius: 4px;
}
.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary-light);
    animation: typing-dot 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* --- Stats Bar --- */
.stat-box {
    text-align: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--color-border);
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 1.875rem;
    }
}

/* --- Trust Signal --- */
.trust-signal {
    text-align: center;
    transition: all var(--transition);
}
.trust-signal:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}
.trust-signal:hover h3 {
    color: #a78bfa;
}
