/* Enhanced Dark Theme Landing Page Styles */
body {
    background: #0a0a0a;
    color: #ffffff;
}

.hero-gradient {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b69 50%, #8b5cf6 100%);
    position: relative;
}

.feature-card {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.2);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.floating-elements::before,
.floating-elements::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    pointer-events: none;
}

.floating-elements::before {
    top: 10%;
    right: 10%;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.floating-elements::after {
    bottom: 20%;
    left: 5%;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    animation: float 4s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-15px) rotate(120deg);
    }

    66% {
        transform: translateY(-5px) rotate(240deg);
    }
}

/* Enhanced Chat Styles */
#chat-messages {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid rgba(147, 51, 234, 0.1);
    padding: 20px 0; /* remove horizontal padding */
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* For iOS smooth scrolling */
    scrollbar-width: thin;
    /* For Firefox */
    scrollbar-color: rgba(147, 51, 234, 0.3) transparent;
    /* For Firefox */
}

/* Custom scrollbar for webkit browsers */
#chat-messages::-webkit-scrollbar {
    width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
    background: rgba(147, 51, 234, 0.1);
    border-radius: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(147, 51, 234, 0.3);
    border-radius: 4px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 51, 234, 0.5);
}

/* Button Hover Effects */
.transform {
    transition: transform 0.2s ease;
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 3px solid #3498db;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

#loading-animation {
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}

/* Add to existing styles */
body {
    background-color: #f0f2f5;
}

#chat-messages {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 18px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    animation: fadeIn 0.5s ease-out;
    word-wrap: break-word;
    line-height: 1.4;
    transition: box-shadow 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.user-message {
    max-width: 80%;
    align-self: flex-end;
    margin-left: auto;
}

.ai-message {
    width: 100%;
    align-self: flex-start;
    margin-right: auto;
}

.message:hover {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

.message p {
    margin-bottom: 0.5em;
    margin-top: 0;
}

.message-avatar {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.message-avatar svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.message:hover .message-avatar {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message strong {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* Link preview card */
.link-preview-card {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255, 255, 255, 0.85);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    width: 100%;
}

.ai-message .link-preview-card {
    border-color: rgba(139, 92, 246, 0.25);
    background: rgba(250, 250, 255, 0.9);
}

.link-preview-card .lp-wrap { display:flex; align-items: stretch; width:100%; gap:12px; text-decoration:none; color:inherit; }
.link-preview-card .lp-thumb { width: 96px; min-width:96px; height: 96px; background: #e5e7eb; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.link-preview-card .lp-thumb img { width:100%; height:100%; object-fit: cover; }
.link-preview-card .lp-body { padding: 10px 12px; display:flex; flex: 1 1 auto; min-width:0; flex-direction:column; gap:6px; }
.link-preview-card .lp-title { font-weight: 600; color: #111827; overflow:hidden; display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.link-preview-card .lp-desc { font-size: 0.9rem; color:#374151; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.link-preview-card .lp-domain { font-size: 0.8rem; color:#6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Skeleton state */
.link-preview-card.is-loading .lp-title,
.link-preview-card.is-loading .lp-desc {
    background: linear-gradient(90deg, rgba(0,0,0,0.06), rgba(0,0,0,0.1), rgba(0,0,0,0.06));
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 6px;
}
.link-preview-card.is-loading .lp-title { height: 16px; width: 220px; }
.link-preview-card.is-loading .lp-desc { height: 14px; width: 320px; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .link-preview-card .lp-wrap { flex-direction: column; }
    .link-preview-card .lp-thumb { width: 100%; min-width: 0; height: auto; aspect-ratio: 16 / 9; }
    .link-preview-card .lp-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .link-preview-card .lp-body { padding: 10px; }
    .link-preview-card .lp-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 1rem; max-width: none; }
    .link-preview-card .lp-desc { -webkit-line-clamp: 3; font-size: 0.9rem; max-width: none; }
    .link-preview-card .lp-domain { font-size: 0.8rem; }
}

@media (max-width: 400px) {
    .link-preview-card .lp-title { -webkit-line-clamp: 2; font-size: 0.95rem; }
    .link-preview-card .lp-desc { -webkit-line-clamp: 2; font-size: 0.85rem; }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1023px) {
    .link-preview-card .lp-thumb { width: 120px; min-width: 120px; height: 120px; }
    .link-preview-card .lp-title { -webkit-line-clamp: 2; font-size: 1.05rem; }
    .link-preview-card .lp-desc { -webkit-line-clamp: 2; }
}

/* Desktop and larger */
@media (min-width: 1024px) {
    .link-preview-card .lp-thumb { width: 140px; min-width: 140px; height: 140px; }
    .link-preview-card .lp-title { -webkit-line-clamp: 2; font-size: 1.06rem; }
    .link-preview-card .lp-desc { -webkit-line-clamp: 3; }
}

.user-message {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.4), 0 0 20px rgba(124, 58, 237, 0.2);
    animation: userAvatarPulse 3s ease-in-out infinite;
}

@keyframes userAvatarPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(109, 40, 217, 0.4), 0 0 20px rgba(124, 58, 237, 0.2);
    }
    50% {
        box-shadow: 0 4px 12px rgba(109, 40, 217, 0.6), 0 0 25px rgba(124, 58, 237, 0.4);
    }
}

.user-message strong {
    color: rgba(255, 255, 255, 0.9);
}

.ai-message {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: black;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4), 0 0 20px rgba(244, 114, 182, 0.3);
    animation: aiAvatarGlow 3s ease-in-out infinite;
}

@keyframes aiAvatarGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4), 0 0 20px rgba(244, 114, 182, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(236, 72, 153, 0.6), 0 0 30px rgba(244, 114, 182, 0.5);
    }
}

.ai-message strong {
    color: white;
}

/* Copy button on AI messages */
.ai-message .copy-btn {
    position: absolute;
    right: 10px;
    bottom: 8px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.1s ease;
}
.ai-message .copy-btn:hover { background: rgba(0,0,0,0.5); }
.ai-message .copy-btn:active { transform: scale(0.98); }
.ai-message .copy-btn svg { display: block; }
.ai-message .copy-btn.copied { background: rgba(16,185,129,0.6); }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#user-input {
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#user-input:focus {
    outline: none;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

/* Disabled state for typing animation */
#user-input:disabled {
    background-color: rgba(107, 114, 128, 0.3) !important;
    color: rgba(156, 163, 175, 0.8) !important;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Typing animation placeholder styling */
#user-input:disabled::placeholder {
    color: rgba(139, 92, 246, 0.8) !important;
    font-style: italic;
    animation: typingPulse 1s ease-in-out infinite alternate;
}

/* Subtle pulsing animation for typing indicator */
@keyframes typingPulse {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

/* Disabled button state */
#chat-form button:disabled {
    background-color: rgba(107, 114, 128, 0.5) !important;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
}

#chat-form button {
    background-color: #8e44ad;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#chat-form button:hover {
    background-color: #9b59b6;
}

#chat-form button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* ==================== AMAZING LOADING ANIMATIONS ==================== */

/* Loading overlay container */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Main loading container */
.loading-container {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 40px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(20px);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.loading-overlay.active .loading-container {
    transform: scale(1);
}

/* Animated brain/thinking icon */
.loading-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.brain-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6, #a855f7, #ec4899);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    animation: brainPulse 2s ease-in-out infinite;
}

.brain-icon::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: synapseFlash 1.5s ease-in-out infinite;
}

.brain-icon::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 15%;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: neuronSpark 2.5s ease-in-out infinite;
}

/* Floating particles around the brain */
.loading-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #8b5cf6;
    border-radius: 50%;
    animation: particleOrbit 4s linear infinite;
}

.particle:nth-child(1) {
    animation-delay: 0s;
    background: #8b5cf6;
}

.particle:nth-child(2) {
    animation-delay: -1s;
    background: #a855f7;
}

.particle:nth-child(3) {
    animation-delay: -2s;
    background: #ec4899;
}

.particle:nth-child(4) {
    animation-delay: -3s;
    background: #f59e0b;
}

/* Loading text with typewriter effect */
.loading-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

#loading-text-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid #8b5cf6;
    white-space: nowrap;
    animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* Progress bar */
.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a855f7, #ec4899);
    border-radius: 2px;
    width: 0%;
    animation: progressFill 6s ease-in-out infinite;
}

/* Subtle message */
.loading-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    animation: fadeInOut 3s ease-in-out infinite;
}

/* ==================== KEYFRAME ANIMATIONS ==================== */

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes brainPulse {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

@keyframes synapseFlash {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes neuronSpark {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    25% {
        opacity: 1;
        transform: scale(1.5);
    }

    75% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

@keyframes particleOrbit {
    0% {
        transform: rotate(0deg) translateX(60px) rotate(0deg);
        opacity: 1;
    }

    25% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.6;
    }

    75% {
        opacity: 0.8;
    }

    100% {
        transform: rotate(360deg) translateX(60px) rotate(-360deg);
        opacity: 1;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: #8b5cf6;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
    }

    33% {
        width: 30%;
    }

    66% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* Additional visual effects */
.loading-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8b5cf6, #a855f7, #ec4899, #f59e0b, #8b5cf6);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
    background-size: 400% 400%;
}

@keyframes borderGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Pulsing background effect */
.loading-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: backgroundPulse 4s ease-in-out infinite;
}

@keyframes backgroundPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.1;
    }
}

/* Enhanced particle effects */
.particle {
    box-shadow: 0 0 10px currentColor;
    animation: particleOrbit 4s linear infinite, particleGlow 2s ease-in-out infinite alternate;
}

@keyframes particleGlow {
    from {
        box-shadow: 0 0 5px currentColor;
        transform: scale(1);
    }

    to {
        box-shadow: 0 0 15px currentColor;
        transform: scale(1.2);
    }
}

/* Loading text glow effect */
.loading-text {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    }

    to {
        text-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 35px rgba(139, 92, 246, 0.3);
    }
}

/* Animated dots for loading text */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {

    0%,
    20% {
        content: '';
    }

    40% {
        content: '.';
    }

    60% {
        content: '..';
    }

    80%,
    100% {
        content: '...';
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .loading-container {
        max-width: 320px;
        padding: 30px 20px;
        position: relative;
    }

    .loading-icon {
        width: 60px;
        height: 60px;
    }

    .loading-text {
        font-size: 20px;
        min-height: 50px;
    }

    .loading-particles {
        width: 100px;
        height: 100px;
    }

    .loading-overlay::before {
        width: 200px;
        height: 200px;
    }
}

/* Login page specific styles */
.bg-purple-600 {
    background-color: #8e44ad;
}

.bg-gray-100 {
    background-color: #f0f2f5;
}

.bg-white {
    background-color: #ffffff;
}

.text-purple-600 {
    color: #8e44ad;
}

.hover\:bg-purple-700:hover {
    background-color: #9b59b6;
}

.hover\:text-purple-800:hover {
    color: #7d3c98;
}

/* New CSS rule for homepage navigation */
header h1 a {
    text-decoration: none;
    color: white !important;
}

.floating-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.floating-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0 auto;
}

/* Pulse animation for attention */
@keyframes backToTopPulse {
    0% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    }

    50% {
        box-shadow: 0 4px 30px rgba(139, 92, 246, 0.6);
    }

    100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    }
}

.back-to-top.pulse {
    animation: backToTopPulse 2s infinite;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Additional responsive styles for pricing section */
@media (max-width: 768px) {
    .price-highlight {
        font-size: 2rem !important;
    }

    .feature-item {
        padding: 8px;
        margin-bottom: 12px;
    }

    .feature-item span {
        font-size: 0.95rem;
    }

    .guarantee-text p:first-child {
        font-size: 1.25rem !important;
        line-height: 1.4;
    }

    .guarantee-text p:last-child {
        font-size: 1rem !important;
    }

    .guarantee-container img {
        width: 100px !important;
        height: 100px !important;
    }

    .guarantee-container {
        padding: 1rem !important;
    }
}

@media (max-width: 480px) {
    .price-highlight {
        font-size: 1.75rem !important;
    }

    .feature-item span {
        font-size: 0.9rem;
    }

    .guarantee-text p:first-child {
        font-size: 1.1rem !important;
        padding: 0 0.5rem;
    }

    .guarantee-container img {
        width: 80px !important;
        height: 80px !important;
    }

    .btn-primary {
        padding: 12px 24px !important;
        font-size: 1rem !important;
    }

    .sales-card {
        padding: 1.5rem !important;
    }
}

/* Guarantee Section Styles */
.guarantee-container {
    background: white !important;
    color: black !important;
    border: 2px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
}

.guarantee-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
}

.guarantee-text p {
    color: black !important;
}

.guarantee-text p:first-child {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-style: italic;
}

.guarantee-text p:last-child {
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Ensure grid responsiveness */
@media (max-width: 1024px) {
    .grid.lg\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Meet the Coach Section Styles */
.coach-content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
    margin-top: 1rem;
}

.coach-text-content {
    color: #d1d5db;
    line-height: 1.6;
}

.coach-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.coach-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.coach-image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.4);
}

.coach-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.coach-image-wrapper:hover .coach-image {
    transform: scale(1.05);
}

.coach-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.coach-image-wrapper:hover .coach-image-overlay {
    opacity: 1;
}

/* Responsive Design for Coach Section */
@media (max-width: 1024px) {
    .coach-content-layout {
        grid-template-columns: 1fr 250px;
        gap: 1.5rem;
    }

    .coach-image-wrapper {
        max-width: 240px;
    }
}

@media (max-width: 768px) {
    .coach-content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .coach-image-container {
        order: -1;
        margin-bottom: 1rem;
    }

    .coach-image-wrapper {
        max-width: 200px;
        margin: 0 auto;
    }

    .coach-text-content .text-center {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .coach-content-layout {
        gap: 1.5rem;
    }

    .coach-image-wrapper {
        max-width: 180px;
    }

    .coach-text-content {
        font-size: 0.95rem;
    }
}

.hero-logo {
    height: 80px;
    /* Adjust height as needed */
    margin-bottom: 1.5rem;
    /* 24px */
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px #ec4899);
}

.hero-logo-centered {
    height: 120px;
    display: block;
    margin: -3rem auto 1.5rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hero-logo-centered:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px #ec4899) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Responsive adjustments for centered logo */
@media (max-width: 768px) {
    .hero-logo-centered {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .hero-logo-centered {
        height: 80px;
    }
}

body {
    background: #0a0a0a;
    color: #ffffff;
}

.hero-gradient {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b69 50%, #8b5cf6 100%);
}

.feature-card {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.stats-section {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d1b69 100%);
}

.testimonial-card {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.accent-purple {
    color: #8b5cf6;
}

.accent-pink {
    color: #ec4899;
}

.video-placeholder {
    background: rgba(30, 30, 30, 0.9);
    border: 2px dashed rgba(139, 92, 246, 0.5);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.floating-elements::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 10%;
    width: 100px;
    height: 100px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-elements::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 5%;
    width: 60px;
    height: 60px;
    background: rgba(236, 72, 153, 0.1);
    border-radius: 50%;
    animation: float 4s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    color: white !important;
}

/* Ensure Subscribe Now button text is always white on my_account page */
.btn-primary {
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited {
    color: white !important;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #8b5cf6;
    padding: 13px 40px;
    border-radius: 50px;
    color: #8b5cf6;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #8b5cf6;
    color: white;
}

/* Enhanced Content Section Styles */
.content-section {
    position: relative;
}

.content-section:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5), 0 0 50px rgba(236, 72, 153, 0.5);
}

.content-section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #8b5cf6, #ec4899, #8b5cf6);
    border-radius: 25px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.content-section:hover::before {
    opacity: 0.1;
}

/* Animated gradient borders */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.content-section>div {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Floating elements animation */
@keyframes floatUp {
    0% {
        transform: translateY(100px) rotate(0deg);
        opacity: 0;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.floating-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #8b5cf6;
    border-radius: 50%;
    animation: floatUp 8s linear infinite;
}

/* Staggered animation delays */
.content-section:nth-child(odd) {
    animation-delay: 0.2s;
}

.content-section:nth-child(even) {
    animation-delay: 0.4s;
}

/* Enhanced Sales Card Styles */
.sales-card {
    position: relative;
    overflow: hidden;
}

.sales-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.sales-card:hover::before {
    left: 100%;
}

.icon-container {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    padding: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.sales-card:hover .icon-container {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

.highlight-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    border-left: 4px solid #8b5cf6;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 15px 15px 0;
    position: relative;
}

.highlight-box::before {
    content: '💡';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    background: #8b5cf6;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.feature-list {
    background: rgba(30, 30, 30, 0.5);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateX(10px);
}

.feature-item::before {
    content: '';
    margin-right: 15px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 12l2 2 4-4' stroke='%23ec4899' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='10' stroke='%238b5cf6' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    align-self: flex-start;
    margin-top: 7px;
}

.price-highlight {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.step-number {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.objection-item {
    background: rgba(30, 30, 30, 0.6);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #ec4899;
    transition: all 0.3s ease;
}

.objection-item:hover {
    background: rgba(30, 30, 30, 0.8);
    transform: translateX(5px);
}

.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, #ec4899, transparent);
    margin: 30px 0;
    border-radius: 2px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    /* keeps it from getting too wide on desktops */
    margin: auto;
    aspect-ratio: 16 / 9;
    /* auto-height that keeps the ratio on every screen [^2^] */
}

/* 2. Lift the whole block 40 px on desktops */
@media (min-width: 1024px) {
    .video-wrapper {
        transform: translateY(-60px);
    }
}

/* 3. Let it go full-width on tablets/phones */
@media (max-width: 768px) {
    .video-wrapper {
        max-width: 100%;
        transform: none;
        /* remove the upward shift so it sits naturally */
    }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .sales-card {
        padding: 2rem;
    }

    .text-5xl {
        font-size: 2.5rem;
    }

    .text-7xl {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {

    /* Hero Section */
    .hero-gradient {
        padding: 3rem 0;
    }

    .text-5xl {
        font-size: 2rem;
    }

    .text-7xl {
        font-size: 2.5rem;
    }

    .text-4xl {
        font-size: 1.875rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    .text-2xl {
        font-size: 1.25rem;
    }

    .text-xl {
        font-size: 1.125rem;
    }

    /* Sales Cards */
    .sales-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .icon-container {
        padding: 15px;
        margin-bottom: 1rem;
    }

    .icon-container svg {
        width: 3rem;
        height: 3rem;
    }

    /* Feature Lists */
    .feature-list {
        padding: 1rem;
    }

    .feature-item {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .feature-item span {
        font-size: 0.95rem;
    }

    /* Highlight Boxes */
    .highlight-box {
        padding: 1rem;
        margin: 1rem 0;
    }

    /* Buttons */
    .btn-primary {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .btn-secondary {
        padding: 10px 24px;
        font-size: 1rem;
    }

    /* Grid layouts */
    .grid {
        gap: 1rem;
    }

    /* Stats section */
    .grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    /* Flex layouts */
    .flex-col.sm\\:flex-row {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 640px) {

    /* Container padding */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Typography */
    .text-5xl {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .text-7xl {
        font-size: 2rem;
        line-height: 1.2;
    }

    .text-4xl {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .text-3xl {
        font-size: 1.25rem;
    }

    .text-2xl {
        font-size: 1.125rem;
    }

    /* Sales cards */
    .sales-card {
        padding: 1rem;
    }

    /* Hero section adjustments */
    .hero-gradient {
        padding: 2rem 0;
    }

    /* Button adjustments */
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
    }

    .btn-secondary {
        padding: 8px 20px;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
    }

    /* Feature items */
    .feature-item span {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Highlight boxes */
    .highlight-box {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    /* Step numbers */
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
        margin-right: 10px;
    }

    /* Price highlight */
    .price-highlight {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {

    /* Ultra-small screens */
    .text-5xl {
        font-size: 1.5rem;
    }

    .text-7xl {
        font-size: 1.75rem;
    }

    .text-4xl {
        font-size: 1.25rem;
    }

    .sales-card {
        padding: 0.75rem;
    }

    .feature-list {
        padding: 0.75rem;
    }

    .highlight-box {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .price-highlight {
        font-size: 1.25rem;
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .lg\\:text-left {
        text-align: center !important;
    }

    .lg\\:justify-start {
        justify-content: center !important;
    }

    .lg\:w-1\/2 {
        width: 100% !important;
    }

    .lg\\:flex-row {
        flex-direction: column !important;
    }

    .lg\\:py-32 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* Ensure all text is readable on mobile */
@media (max-width: 640px) {

    p,
    span,
    div {
        line-height: 1.5;
    }

    .leading-tight {
        line-height: 1.3 !important;
    }

    .leading-relaxed {
        line-height: 1.6 !important;
    }

    /* Chat container responsive adjustments */
    #chat-messages {
        max-height: 350px;
        padding: 15px 0; /* remove horizontal padding on mobile */
    }
}

/* Medium screens (tablets) */
@media (min-width: 641px) and (max-width: 1024px) {
    #chat-messages {
        max-height: 450px;
    }
}

/* Large screens */
@media (min-width: 1025px) {
    #chat-messages {
        max-height: 600px;
    }
}

/* Neville Goddard Section Styles */
.neville-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.neville-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.3);
    transition: all 0.3s ease;
}



.neville-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    transition: transform 0.3s ease;
}



.neville-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    border: 2px dashed rgba(236, 72, 153, 0.3);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.placeholder-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    border-radius: 50%;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.neville-content {
    color: #d1d5db;
}

.neville-tabs {
    margin-bottom: 1rem;
}

.neville-tab-item {
    background: rgba(30, 30, 30, 0.6);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.neville-tab-item:hover {
    background: rgba(30, 30, 30, 0.8);
    transform: translateX(5px);
}

.neville-tab-item.active {
    border-left-color: #ec4899;
    background: rgba(30, 30, 30, 0.8);
}

.neville-tab-item[data-tab="challenge"].active {
    border-left-color: #8b5cf6;
}

.neville-tab-item[data-tab="solution"].active {
    border-left-color: #ec4899;
}

.tab-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tab-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    padding: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.neville-tab-item:hover .tab-icon {
    transform: scale(1.1);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.neville-tab-item.active .tab-icon {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.neville-tab-item[data-tab="challenge"] .tab-icon {
    border-color: rgba(139, 92, 246, 0.3);
}

.neville-tab-item[data-tab="challenge"]:hover .tab-icon,
.neville-tab-item[data-tab="challenge"].active .tab-icon {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.tab-content {
    line-height: 1.6;
}

/* Responsive Design for Neville Section */
@media (max-width: 1024px) {
    .neville-image-wrapper {
        max-width: 350px;
    }

    .neville-tabs {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .neville-image-container {
        order: -1;
        margin-bottom: 2rem;
    }

    .neville-image-wrapper {
        max-width: 280px;
        margin: 0 auto;
    }

    .neville-placeholder {
        height: 300px;
        padding: 1.5rem;
    }

    .placeholder-icon svg {
        width: 4rem;
        height: 4rem;
    }

    .neville-tab-item {
        padding: 1rem;
    }

    .tab-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
    }

    .tab-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .tab-content {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .neville-image-wrapper {
        max-width: 240px;
    }

    .neville-placeholder {
        height: 250px;
        padding: 1rem;
    }

    .placeholder-icon {
        padding: 1rem;
    }

    .placeholder-icon svg {
        width: 3rem;
        height: 3rem;
    }

    .neville-tab-item {
        padding: 0.75rem;
    }

    .tab-icon {
        padding: 0.5rem;
    }

    .tab-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

@media (max-width: 480px) {
    .neville-image-wrapper {
        max-width: 200px;
    }

    .neville-placeholder {
        height: 200px;
    }

    .text-4xl.lg\\:text-5xl {
        font-size: 1.5rem;
    }

    .neville-content .text-xl {
        font-size: 1rem;
    }
}

/* Neville Goddard Section Styles */
.neville-tabs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.neville-tab-item {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.neville-tab-item:hover {
    background: rgba(30, 30, 30, 0.9);
    transform: translateX(5px);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.neville-tab-item.active {
    border-left-color: #ec4899;
    background: rgba(30, 30, 30, 0.9);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2);
}

.tab-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tab-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid rgba(236, 72, 153, 0.3);
    border-radius: 50%;
    padding: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.neville-tab-item:hover .tab-icon {
    transform: scale(1.1);
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.neville-tab-item.active .tab-icon {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.tab-content {
    line-height: 1.6;
    color: #d1d5db;
}

/* Responsive Design for Neville Tab Items */
@media (max-width: 768px) {
    .neville-tab-item {
        padding: 1rem;
    }

    .tab-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
    }

    .tab-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .tab-content {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .neville-tab-item {
        padding: 0.75rem;
    }

    .tab-icon {
        padding: 0.5rem;
    }

    .tab-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Neville Tab Items - Unified Pink Color Scheme */
.neville-tabs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.neville-tab-item {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.neville-tab-item:hover {
    background: rgba(30, 30, 30, 0.9);
    transform: translateX(5px);
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2);
}

.neville-tab-item.active {
    border-left-color: #ec4899;
    background: rgba(30, 30, 30, 0.9);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.6);
}

.tab-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tab-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid rgba(236, 72, 153, 0.3);
    border-radius: 50%;
    padding: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.neville-tab-item:hover .tab-icon {
    transform: scale(1.1);
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.neville-tab-item.active .tab-icon {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.tab-content {
    line-height: 1.6;
    color: #d1d5db;
}

/* Responsive Design for Neville Tab Items */
@media (max-width: 768px) {
    .neville-tab-item {
        padding: 1rem;
    }

    .tab-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
    }

    .tab-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .tab-content {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .neville-tab-item {
        padding: 0.75rem;
    }

    .tab-icon {
        padding: 0.5rem;
    }

    .tab-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Header Button Styling - Match Main Buttons */
.header-btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    color: white !important;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.header-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    color: white !important;
}

.header-btn-secondary {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    color: white !important;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments for header buttons */
@media (max-width: 640px) {

    .header-btn-primary,
    .header-btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Hyperlink styles for better visibility */
a {
    color: #8b5cf6;
    text-decoration: underline;
    transition: all 0.3s ease;
}

a:hover {
    color: #a855f7;
    text-decoration: none;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

a:visited {
    color: #7c3aed;
}

/* Special styling for links in chat responses */
.ai-message a,
.message a {
    color: #a3fa97 !important;
    font-weight: 600;
    border-bottom: 2px solid #a3fa97;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(236, 72, 153, 0.1);
}

.ai-message a:hover,
.message a:hover {
    color: #3af578 !important;
    background: rgba(236, 72, 153, 0.2);
    border-bottom-color: #3af578;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* Pagination and Loading Styles */
.loading-indicator {
    display: none;
    padding: 15px;
    text-align: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    margin: 10px 0;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.loading-indicator .loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #8b5cf6;
    font-weight: 500;
}

.loading-indicator .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    border-top: 2px solid #8b5cf6;
    animation: spin 1s linear infinite;
}

/* Infinite scroll trigger area */
.infinite-scroll-trigger {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(139, 92, 246, 0.7);
    font-size: 14px;
    margin-top: 10px;
}

.infinite-scroll-trigger.visible {
    opacity: 1;
}

.infinite-scroll-trigger.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Enhanced chat container for better scrolling */
#chat-messages {
    position: relative;
}

/* Smooth scrolling for better UX */
#chat-messages {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Loading state for chat container */
#chat-messages.loading {
    opacity: 0.8;
    pointer-events: none;
}

/* Responsive adjustments for pagination */
@media (max-width: 768px) {
    .loading-indicator {
        padding: 10px;
        margin: 8px 0;
    }

    .loading-indicator .loading-spinner {
        font-size: 14px;
        gap: 8px;
    }

    .infinite-scroll-trigger {
        height: 40px;
        font-size: 12px;
        margin-top: 8px;
    }
}

/* Sticky "Load earlier messages" control so it's visible even when scrolled to the latest */
#chat-messages #load-earlier-control {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.375rem 0;
    /* compact vertical spacing */
    background: transparent;
    /* remove wide grey bar */
    backdrop-filter: none;
    /* no blur across full width */
    pointer-events: none;
    /* only the button is clickable */
}

/* Ensure the button has a consistent look if Tailwind isn’t available in this context */
#chat-messages #load-earlier-control #load-earlier-button {
    pointer-events: auto;
    /* re-enable interaction */
    background-color: #374151;
    /* gray-700 */
    color: #fff;
    padding: 0.5rem 1rem;
    /* px-4 py-2 */
    border-radius: 0.5rem;
    /* slightly more rounded */
    font-size: 0.875rem;
    /* text-sm */
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

#chat-messages #load-earlier-control #load-earlier-button:hover {
    background-color: #4b5563;
    /* gray-600 */
}

#chat-messages #load-earlier-control #load-earlier-button[disabled] {
    opacity: 0.85;
    cursor: not-allowed;
    box-shadow: none;
}
/* CSP-Safe Menu Styles */
.hidden {
    display: none !important;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #1e2125;
    background-color: #e9ecef;
}

/* Menu button styles */
.menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.menu-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Responsive menu styles */
@media (max-width: 640px) {
    .dropdown-menu {
        position: fixed;
        top: auto;
        right: 1rem;
        left: 1rem;
        width: auto;
        margin-top: 0.5rem;
    }
}

/* Loading animation styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.loading-container {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 2rem;
}

.loading-icon {
    position: relative;
    margin: 0 auto 2rem;
    width: 80px;
    height: 80px;
}

.brain-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #8b5cf6, #ec4899);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.loading-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    animation: float 3s infinite ease-in-out;
}

.particle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { top: 20%; right: 20%; animation-delay: 0.5s; }
.particle:nth-child(3) { bottom: 20%; left: 20%; animation-delay: 1s; }
.particle:nth-child(4) { bottom: 20%; right: 20%; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); opacity: 0.7; }
    50% { transform: translateY(-20px); opacity: 1; }
}

.loading-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    min-height: 2rem;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.loading-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Floating buttons styles */
.floating-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.floating-button {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 200px;
    text-align: center;
}

.floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}/* Addi
tional Menu Debug Styles */
#menu-dropdown {
    background-color: white !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

#menu-dropdown:not(.hidden) {
    display: block !important;
}

#menu-button {
    cursor: pointer !important;
}

#menu-button:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Ensure proper z-index */
.z-50 {
    z-index: 50 !important;
}

/* Debug: Make menu visible for testing */
.menu-debug #menu-dropdown {
    display: block !important;
    background: red !important;
}

/* Premium Upgrade Button - gradient, glow, and sheen
   Default palette: Green → Yellow
   Alternate palette available: .premium-btn--alt (Deep Blue → Emerald)
*/
.premium-btn {
    /* color variables so we can offer multiple palettes */
    --premium-start: #10b981; /* emerald green */
    --premium-end: #facc15;   /* yellow */
    --premium-shadow-start: rgba(16, 185, 129, 0.35);
    --premium-shadow-end: rgba(250, 204, 21, 0.25);
    --premium-glow: rgba(250, 204, 21, 0.28);

    display: inline-block;
    padding: 10px 20px;
    border-radius: 9999px; /* full pill */
    background: linear-gradient(135deg, var(--premium-start) 0%, var(--premium-end) 100%);
    color: #0b1220 !important; /* dark text for contrast on yellowish end */
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 25px var(--premium-shadow-start),
        0 4px 12px var(--premium-shadow-end),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

/* Alternate variant (two different gradient colors) */
.premium-btn--alt {
    --premium-start: #1e3a8a; /* deep blue */
    --premium-end: #10b981;   /* emerald/green */
    --premium-shadow-start: rgba(30, 58, 138, 0.35);
    --premium-shadow-end: rgba(16, 185, 129, 0.25);
    --premium-glow: rgba(16, 185, 129, 0.28);
    color: #ffffff !important;
}

/* Make sure it overrides default chat link styling */
.ai-message a.premium-btn,
.message a.premium-btn {
    color: inherit !important;
    background: linear-gradient(135deg, var(--premium-start) 0%, var(--premium-end) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: none !important;
    padding: 10px 20px !important;
    text-decoration: none !important;
    background-clip: padding-box !important;
}

/* Shine effect */
.premium-btn::after {
    content: '';
    position: absolute;
    top: -120%;
    left: -30%;
    width: 60%;
    height: 300%;
    transform: rotate(25deg);
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.35) 45%,
        rgba(255,255,255,0) 60%
    );
    filter: blur(1px);
    animation: premiumSheen 3.2s ease-in-out infinite;
    pointer-events: none;
}

/* Subtle outer glow ring (uses glow variable) */
.premium-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: radial-gradient(120px 50px at 50% 120%, var(--premium-glow), transparent 70%);
    z-index: -1;
    transition: opacity 0.25s ease;
    opacity: 0.85;
}

.premium-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 16px 36px var(--premium-shadow-start),
        0 8px 20px var(--premium-shadow-end),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    filter: brightness(1.02);
}

.premium-btn:active {
    transform: translateY(0) scale(0.98);
}

.premium-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.14),
        0 0 0 6px var(--premium-shadow-start);
}

/* Smaller sizes for tighter paragraphs if needed */
.premium-btn--sm {
    padding: 8px 16px;
    font-weight: 600;
}

/* Keyframes */
@keyframes premiumSheen {
    0%   { left: -40%; opacity: 0; }
    15%  { opacity: 1; }
    45%  { left: 110%; opacity: 0.9; }
    100% { left: 110%; opacity: 0; }
}

/* Responsive tweak so it doesn’t overwhelm small screens */
@media (max-width: 480px) {
    .premium-btn {
        padding: 9px 16px;
        font-weight: 600;
    }
}

/* Prevent text-blue links from changing color when visited */
a.text-blue-300:visited,
a.text-blue-400:visited,
a.text-blue-500:visited,
a.text-blue-600:visited {
    color: inherit !important;
}

/* Ensure text-blue-300 specifically stays the same color */
.text-blue-300:visited {
    color: #93c5fd !important;
}

.text-blue-400:visited {
    color: #60a5fa !important;
}
