/* Hide footer when Inside Talk is active */
#inside-talkSection[style*="display: block"] ~ footer,
#inside-talkSection[style*="display:block"] ~ footer {
    display: none !important;
}

/* Premium Inside Talk Tweets Styling */
.boanalyst-tweets-container {
    max-width: 850px;
    margin: 0 auto;
    width: 100%;
    overflow: visible;
}

.boanalyst-tweet {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(55, 48, 107, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(139, 92, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    animation: slideInUp 0.5s ease-out forwards;
    opacity: 0;
    width: 100%;
    box-sizing: border-box;
}

.tweet-container {
    display: flex;
    gap: 16px;
    padding: 24px;
    align-items: flex-start;
}

.tweet-avatar {
    flex-shrink: 0;
    position: relative;
}

.profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(244, 208, 63, 0.3);
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(244, 208, 63, 0.2),
        0 0 12px rgba(244, 208, 63, 0.1);
}

.tweet-avatar:hover .profile-pic {
    border-color: rgba(244, 208, 63, 0.6);
    transform: scale(1.05);
    box-shadow: 
        0 4px 16px rgba(244, 208, 63, 0.3),
        0 0 20px rgba(244, 208, 63, 0.2);
}

.tweet-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    overflow: visible;
}

.boanalyst-tweet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.boanalyst-tweet:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.3),
        0 0 30px rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.boanalyst-tweet:hover::before {
    opacity: 1;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple tweets */
.boanalyst-tweet:nth-child(1) { animation-delay: 0.05s; }
.boanalyst-tweet:nth-child(2) { animation-delay: 0.1s; }
.boanalyst-tweet:nth-child(3) { animation-delay: 0.15s; }
.boanalyst-tweet:nth-child(4) { animation-delay: 0.2s; }
.boanalyst-tweet:nth-child(5) { animation-delay: 0.25s; }
.boanalyst-tweet:nth-child(n+6) { animation-delay: 0.3s; }

.tweet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tweet-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.author-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #f4d03f;
    letter-spacing: 0.3px;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(244, 208, 63, 0.3),
        0 0 8px rgba(244, 208, 63, 0.2);
}

.author-handle {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    transition: all 0.3s ease;
}

.verified-badge:hover {
    transform: scale(1.1);
}

.tweet-date {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.tweet-text {
    color: #e4e4e4;
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 16px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    width: 100%;
    overflow: visible;
    text-overflow: unset;
    display: block;
}

.premium-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.2px;
}

.tweet-text a {
    color: #4A9EFF;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.tweet-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #4A9EFF;
    transition: width 0.3s;
}

.tweet-text a:hover {
    color: #6BB3FF;
}

.tweet-text a:hover::after {
    width: 100%;
}

/* Hashtags and mentions styling */
.tweet-text a[href*="hashtag"] {
    color: #FFD700;
}

.tweet-text a[href*="hashtag"]:hover {
    color: #FFA500;
}

.tweet-media {
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
}

.tweet-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.tweet-image:hover {
    transform: scale(1.02);
}

.tweet-stats {
    display: flex;
    gap: 24px;
    align-items: center;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tweet-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: default;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.tweet-stats .stat svg {
    width: 16px;
    height: 16px;
    transition: all 0.3s;
}

.tweet-stats .stat:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.tweet-stats .stat:hover svg {
    transform: scale(1.15);
}

/* Retweet stat styling */
.retweet-stat:hover {
    background: rgba(25, 207, 134, 0.1) !important;
    color: #19CF86 !important;
}

.retweet-stat:hover svg {
    fill: #19CF86 !important;
}

/* Like stat styling */
.like-stat:hover {
    background: rgba(224, 36, 94, 0.1) !important;
    color: #E0245E !important;
}

.like-stat:hover svg {
    fill: #E0245E !important;
}

/* Loading state improvements */
#twitterLoading {
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.1);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.no-tweets-message {
    text-align: center;
    padding: 60px 30px;
    color: #999;
    font-size: 1.1rem;
}

.no-tweets-message i {
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 20px;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Container optimization - remove side padding */
    .boanalyst-tweets-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        /* Enable smooth scrolling */
        -webkit-overflow-scrolling: touch !important;
        transform: translate3d(0, 0, 0) !important;
        backface-visibility: hidden !important;
    }
    
    /* Tweet optimization - minimal padding */
    .boanalyst-tweet {
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        padding: 0 !important;
        /* CRITICAL: Prevent sticking during scroll */
        transform: translate3d(0, 0, 0) !important;
        backface-visibility: hidden !important;
        will-change: auto !important;
        transition: none !important;
    }
    
    /* Disable hover transforms on mobile */
    .boanalyst-tweet:hover {
        transform: translate3d(0, 0, 0) !important;
    }
    
    .tweet-container {
        padding: 12px 16px !important;
        gap: 12px;
        /* Prevent layout shifts */
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
    }
    
    .profile-pic {
        width: 40px;
        height: 40px;
    }
    
    .author-name {
        font-size: 0.95rem;
    }
    
    .tweet-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .tweet-stats {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .tweet-stats .stat {
        font-size: 0.85rem;
        padding: 5px 10px;
        /* Prevent layout shifts */
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
    }
    
    .tweet-stats .stat:hover {
        transform: translate3d(0, 0, 0);
    }
    
    /* Inside Talk section - full width */
    #inside-talkSection {
        padding: 0 !important;
    }
    
    #inside-talkSection .container {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .inside-talk-content {
        padding: 0 !important;
    }
    
    .inside-talk-header {
        padding: 15px 16px !important;
    }
}

@media (max-width: 480px) {
    .tweet-container {
        padding: 16px 14px;
        gap: 10px;
    }
    
    .boanalyst-tweet {
        margin-bottom: 14px;
    }
    
    .profile-pic {
        width: 36px;
        height: 36px;
    }
    
    .author-name {
        font-size: 0.95rem;
    }
    
    .author-handle {
        font-size: 0.85rem;
    }
    
    .tweet-text {
        font-size: 0.95rem;
    }
    
    .tweet-stats {
        gap: 12px;
    }
    
    .tweet-stats .stat {
        padding: 3px 6px;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .boanalyst-tweet {
        background: linear-gradient(135deg, rgba(18, 18, 18, 0.98) 0%, rgba(28, 28, 28, 0.98) 100%);
    }
}

/* Character limit display for admin */
.char-count.warning {
    color: #FFA500;
}

.char-count.danger {
    color: #ff6b6b;
}

/* Subscription Teaser Styling */
.subscription-teaser {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
    border: 2px solid rgba(255, 215, 0, 0.15);
    border-radius: 24px;
    padding: 80px 50px;
    text-align: center;
    max-width: 700px;
    margin: 60px auto;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 215, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: fadeInScale 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.subscription-teaser::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.teaser-icon {
    font-size: 5rem;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.subscription-teaser h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.teaser-message {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.teaser-message strong {
    color: #FFD700;
    font-weight: 700;
    font-size: 1.4rem;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.subscribe-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    border: none;
    padding: 18px 60px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 20px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
}

.subscribe-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.subscribe-btn:hover::before {
    left: 100%;
}

.subscribe-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 30px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
}

.subscribe-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .subscription-teaser {
        padding: 50px 28px;
        margin: 30px 16px;
        border-radius: 20px;
    }
    
    .teaser-icon {
        font-size: 3.5rem;
        margin-bottom: 24px;
    }
    
    .subscription-teaser h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .teaser-message {
        font-size: 1.05rem;
        margin-bottom: 32px;
        line-height: 1.7;
    }
    
    .teaser-message strong {
        font-size: 1.25rem;
    }
    
    .subscribe-btn {
        padding: 16px 40px;
        font-size: 1.05rem;
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .subscription-teaser {
        padding: 40px 20px;
        margin: 20px 12px;
    }
    
    .teaser-icon {
        font-size: 3rem;
    }
    
    .subscription-teaser h2 {
        font-size: 1.5rem;
    }
    
    .teaser-message {
        font-size: 0.95rem;
    }
    
    .teaser-message strong {
        font-size: 1.15rem;
    }
}
