@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Inter:wght@400;600;700&display=swap');

:root {
    --card-bg: rgba(10, 10, 10, 0.8);
    --accent-glow: rgba(34, 197, 94, 0.3);
    --border-gradient: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    --modal-accent: #6366f1;
    --modal-bg: rgba(255, 255, 255, 0.9);
    --modal-text: #1f2937;
}

/* --- Article Layout --- */

.article-wrapper {

    /* Increased from 850px to 1200px for a more expansive feel */

    max-width: 1200px;

    margin: 160px auto 100px;

    padding: 0 5%;

}



/* Header constrained slightly more than the wrapper for punchy impact */

.article-header {

    text-align: center;

    margin-bottom: 4rem;

    max-width: 900px;

    margin-left: auto;

    margin-right: auto;

}



/* Featured Image - Utilizing Full Wrapper Width */

.featured-image-wrapper {

    margin-bottom: 5rem;

    width: 100%;

}



.featured-img {

    width: 100%;

    height: auto;

    max-height: 700px; /* Prevents image from becoming vertically overwhelming */

    object-fit: cover;

    border-radius: 32px;

    box-shadow: 0 30px 60px rgba(0,0,0,0.1);

}



/* --- THE PROSE CONTENT --- */

/* We keep the text content at a readable width (around 800px)

   to prevent lines from being too long to read comfortably. */

.prose-content {

    max-width: 800px;

    margin: 0 auto;

    font-size: 1.15rem;

    line-height: 1.8;

    color: #333;

}



/* --- Comments Master Layout --- */

.comments-master {

    margin-top: 120px;

    padding-top: 80px;

    border-top: 1px solid var(--glass-border);

    /* Expanded comments width to match the header feel */

    max-width: 1000px;

    margin-left: auto;

    margin-right: auto;

}



/* Rest of your existing logic for signature and text remains below... */



.category-badge {

    display: inline-block;

    padding: 6px 16px;

    background: var(--accent-color);

    color: white;

    border-radius: 50px;

    font-size: 0.75rem;

    font-weight: 800;

    text-transform: uppercase;

    margin-bottom: 1.5rem;

}



.article-title {

    font-size: clamp(2.2rem, 5vw, 3.8rem);

    line-height: 1.1;

    font-weight: 800;

    letter-spacing: -2px;

    margin-bottom: 2rem;

}



.article-meta {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 15px;

    color: var(--text-muted);

    font-size: 0.9rem;

    font-weight: 600;

}



.author-info {

    display: flex;

    align-items: center;

    gap: 10px;

}



.author-info span {

    font-family: 'Dancing Script', cursive;

    font-size: 1.2rem;

    color: var(--accent-color);

    font-weight: 400;

    letter-spacing: 0;

}



.author-img {

    width: 32px;

    height: 32px;

    border-radius: 50%;

    object-fit: cover;

}



.dot {

    width: 4px;

    height: 4px;

    background: #ddd;

    border-radius: 50%;

}



/* Featured Image */

.featured-image-wrapper { margin-bottom: 5rem; }

.featured-img { width: 100%; border-radius: 32px; box-shadow: 0 30px 60px rgba(0,0,0,0.1); }



/* --- THE PROSE CONTENT (HTML AUTO-FORMAT) --- */

.prose-content {

    font-size: 1.15rem;

    line-height: 1.8;

    color: #333;

}



/* Headings */

.prose-content h1, .prose-content h2, .prose-content h3 {

    color: var(--text-black);

    margin: 3rem 0 1.5rem;

    font-weight: 800;

    line-height: 1.2;

}



.prose-content h1 { font-size: 2.5rem; }

.prose-content h2 { font-size: 2rem; border-left: 4px solid var(--accent-color); padding-left: 20px; }

.prose-content h3 { font-size: 1.5rem; }



/* Text Elements */

.prose-content p { margin-bottom: 1.8rem; }

.prose-content b, .prose-content strong { color: var(--text-black); font-weight: 700; }



/* Blockquotes */

.prose-content blockquote {

    margin: 3rem 0;

    padding: 2rem;

    background: var(--glass-bg);

    border-radius: 24px;

    border-left: 6px solid var(--accent-color);

    font-family: 'Dancing Script', cursive;

    font-size: 1.6rem;

    color: var(--text-black);

    line-height: 1.4;

}



/* Lists */

.prose-content ul, .prose-content ol {

    margin: 2rem 0;

    padding-left: 1.5rem;

}



.prose-content li { margin-bottom: 0.8rem; }

.prose-content ul { list-style: none; }

.prose-content ul li::before {

    content: '→';

    color: var(--accent-color);

    font-weight: 800;

    margin-right: 10px;

}



/* Tables - Premium Design */

.prose-content table {

    width: 100%;

    border-collapse: collapse;

    margin: 3rem 0;

    background: var(--glass-bg);

    border-radius: 16px;

    overflow: hidden;

    border: 1px solid var(--glass-border);

}



.prose-content th {

    background: #f8f8f8;

    text-align: left;

    padding: 15px 20px;

    font-size: 0.8rem;

    text-transform: uppercase;

    letter-spacing: 1px;

}



.prose-content td {

    padding: 15px 20px;

    border-bottom: 1px solid var(--glass-border);

    font-size: 1rem;

}



.prose-content tr:last-child td { border-bottom: none; }



/* Reading Progress Bar Styling */

.reading-progress-container {

    position: fixed;

    top: 0;

    left: 0;

    width: 100%;

    height: 4px;

    z-index: 2000;

    background: transparent;

}



.progress-bar {

    height: 100%;

    background: var(--accent-color);

    width: 0%;

    transition: width 0.1s ease;

}

/* ************* comment ************* */

/* --- Comments Master Layout --- */

.comments-master {

    margin-top: 120px;

    padding-top: 80px;

    border-top: 1px solid var(--glass-border);

    max-width: 900px;

    margin-left: auto;

    margin-right: auto;

}



.comments-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    margin-bottom: 50px;

}



.eyebrow-premium {

    font-size: 0.75rem;

    text-transform: uppercase;

    letter-spacing: 4px;

    color: var(--accent-color);

    font-weight: 800;

    display: block;

    margin-bottom: 10px;

}



.comments-stats {

    font-size: 0.9rem;

    font-weight: 700;

    color: var(--text-muted);

    padding: 8px 16px;

    background: #f8f9fa;

    border-radius: 100px;

}



/* --- Glass Input Slab --- */

.comment-input-slab {

    background: rgba(255, 255, 255, 0.6);

    backdrop-filter: blur(20px);

    -webkit-backdrop-filter: blur(20px);

    border: 1px solid var(--glass-border);

    border-radius: 32px;

    padding: 45px;

    margin-bottom: 80px;

    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);

    transition: all 0.5s ease;

}



.comment-input-slab:focus-within {

    border-color: var(--accent-color);

    box-shadow: 0 30px 60px -12px rgba(99, 102, 241, 0.1);

}



.input-wrapper {

    position: relative;

    margin-bottom: 30px;

}



.input-wrapper input,

.input-wrapper textarea {

    width: 100%;

    background: transparent;

    border: none;

    border-bottom: 1px solid var(--glass-border);

    padding: 15px 0;

    color: var(--text-black);

    font-size: 1.15rem;

    font-family: inherit;

    outline: none;

    transition: border-color 0.3s ease;

}



.input-wrapper textarea {

    min-height: 120px;

    resize: vertical;

}



.input-focus-line {

    position: absolute;

    bottom: -1px;

    left: 0;

    width: 0;

    height: 2px;

    background: var(--accent-color);

    transition: width 0.6s cubic-bezier(0.19, 1, 0.22, 1);

}



.input-wrapper input:focus ~ .input-focus-line,

.input-wrapper textarea:focus ~ .input-focus-line {

    width: 100%;

}

.char-counter {

    position: absolute;
    
    bottom: -25px;
    
    right: 0;
    
    font-size: 0.7rem;
    
    font-weight: 700;
    
    color: var(--text-muted);
    
    letter-spacing: 1px;
    
    text-transform: uppercase;
    
    transition: color 0.3s ease;
}

/* Turns the counter indigo when the user is typing */
.input-wrapper textarea:focus ~ .char-counter {
    
    color: var(--accent-color);
}

/* Warning color if they get close to the limit */
.char-counter.limit-near {
    
    color: #f43f5e;
}


/* --- Form Footer & Button --- */

.form-footer {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

}



.form-hint {

    font-size: 0.85rem;

    color: var(--text-muted);

    font-style: italic;

}



.btn-premium-v2 {

    display: flex;

    align-items: center;

    gap: 12px;

    background: var(--text-black);

    color: #fff;

    border: none;

    padding: 14px 28px;

    border-radius: 100px;

    font-weight: 700;

    cursor: pointer;

    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

}



.btn-premium-v2:hover {

    background: var(--accent-color);

    transform: scale(1.05) translateY(-2px);

    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.2);

}



.btn-premium-v2 svg {

    transition: transform 0.4s ease;

}



.btn-premium-v2:hover svg {

    transform: translateX(4px) translateY(-4px);

}



/* --- Discussion Thread --- */

.comments-thread {

    display: flex;

    flex-direction: column;

    gap: 40px;

}



/* Responsive Adjustments */

@media (max-width: 768px) {

    .comment-input-slab {

        padding: 30px 20px;

    }

   

    .form-footer {

        flex-direction: column;

        align-items: flex-start;

    }

   

    .btn-premium-v2 {

        width: 100%;

        justify-content: center;

    }

}



.comment-node.reply-node {

    margin-left: 50px;

    padding-left: 25px;

    border-left: 2px solid var(--glass-border);

    position: relative;

    margin-top: 20px;

}



/* Subtle accent for the user name */

.user-name {

    font-weight: 800;

    color: var(--text-black);

    font-size: 1rem;

}



.comment-date {

    font-size: 0.8rem;

    color: var(--text-muted);

    font-weight: 500;

}



.comment-body-text p {

    margin: 15px 0;

    line-height: 1.7;

    color: #4b5563;

}



.reply-trigger {

    background: none;

    border: none;

    color: var(--accent-color);

    font-weight: 800;

    text-transform: uppercase;

    font-size: 0.75rem;

    letter-spacing: 1px;

    cursor: pointer;

    margin-left: auto;

}



.reply-form-wrapper {

    margin-top: 15px;

    margin-left: 20px;

    padding: 25px !important;

    border-left: 3px solid var(--accent-color) !important;

    animation: slideDown 0.4s ease-out;

}



.inline-reply-form .input-wrapper {

    margin-bottom: 15px;

}



/* --- Interaction Bar Layout --- */

.interaction-bar {

    display: flex;

    align-items: center;

    gap: 20px;

    margin-top: 20px;

}



/* --- Voting Buttons --- */

.vote-btn {

    display: flex;

    align-items: center;

    gap: 8px;

    background: transparent;

    border: 1px solid var(--glass-border);

    padding: 6px 14px;

    border-radius: 100px;

    color: var(--text-muted);

    cursor: pointer;

    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

}



.vote-btn svg {

    transition: transform 0.3s ease;

}



.vote-btn:hover {

    border-color: var(--accent-color);

    color: var(--accent-color);

    background: rgba(99, 102, 241, 0.03);

}



/* Specific hover pop for Like vs Dislike */

.vote-btn[data-type="like"]:hover svg {

    transform: translateY(-3px) scale(1.1);

}



.vote-btn[data-type="dislike"]:hover svg {

    transform: translateY(3px) scale(1.1);

}



.vote-btn .count {

    font-size: 0.85rem;

    font-weight: 800;

}



/* --- Reply Trigger --- */

.reply-trigger {

    background: none;

    border: none;

    color: var(--accent-color);

    font-weight: 800;

    text-transform: uppercase;

    font-size: 0.75rem;

    letter-spacing: 1.5px;

    cursor: pointer;

    margin-left: auto; /* Push to the right */

    padding: 5px 0;

    position: relative;

    transition: color 0.3s ease;

}



.reply-trigger::after {

    content: '';

    position: absolute;

    bottom: 0;

    left: 0;

    width: 0;

    height: 2px;

    background: var(--accent-color);

    transition: width 0.3s ease;

}



.reply-trigger:hover::after {

    width: 100%;

}



/* --- Nested Replies Styling --- */

.replies-container {

    margin-left: 50px; /* Staggered indentation */

    padding-left: 20px;

    border-left: 2px solid var(--glass-border);

    margin-top: 20px;

}



@media (max-width: 768px) {

    .replies-container {

        margin-left: 20px;

        padding-left: 15px;

    }

}



/* --- Popular Insight Styling --- */

.popular-insight {

    border: 1px solid var(--accent-color) !important;

    background: rgba(99, 102, 241, 0.02) !important;

}



.popular-badge {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    background: var(--accent-color);

    color: white;

    font-size: 0.65rem;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 1px;

    padding: 4px 12px;

    border-radius: 50px;

    position: absolute;

    top: -12px;

    left: 20px;

    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);

}



.popular-badge svg {

    filter: drop-shadow(0 0 2px rgba(255,255,255,0.5));

}



/* Ensure the parent card has relative positioning */

.comment-card-modern {

    position: relative;

    padding: 30px;

    background: #fff;

    border: 1px solid var(--glass-border);

    border-radius: 24px;

    transition: var(--transition-premium);

}



/* Hide replies by default */

.replies-container.collapsed {

    display: none;

    opacity: 0;

    transform: translateY(-10px);

}



/* Shown state with animation */

.replies-container.expanded {

    display: block;

    animation: slideDown 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;

}



/* --- Updated Header Alignment --- */

.comment-header-row {

    display: flex;

    justify-content: space-between; /* Name far left, Date far right */

    align-items: center;

    margin-bottom: 15px;

    width: 100%;

}



.user-name {

    font-weight: 800;

    color: var(--text-black);

    font-size: 1rem;

    letter-spacing: -0.3px;

}



.comment-date {

    font-size: 0.72rem;

    color: var(--text-muted);

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    background: #f1f3f5;

    padding: 4px 10px;

    border-radius: 6px; /* Subtle rectangular tag look */

}



@media (max-width: 480px) {

    .comment-header-row {

        flex-direction: column;

        align-items: flex-start;

        gap: 5px;

    }

}



.toggle-replies-btn {

    background: #f1f3f5;

    border: none;

    padding: 6px 14px;

    border-radius: 100px;

    font-size: 0.7rem;

    font-weight: 800;

    color: var(--text-muted);

    cursor: pointer;

    margin-left: 15px;

    transition: all 0.3s ease;

}



.toggle-replies-btn.active {

    background: var(--text-black);

    color: white;

}



/* --- Highlight effect for new comments --- */

.newly-added .comment-card-modern {

    animation: highlightPulse 3s ease-out;

}



@keyframes highlightPulse {

    0% {

        border-color: var(--accent-color);

        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);

        background: rgba(99, 102, 241, 0.05);

    }

    100% {

        border-color: var(--glass-border);

        box-shadow: none;

        background: #fff;

    }

}



.btn-cancel {

    background: transparent;

    border: none;

    color: var(--text-muted);

    font-weight: 700;

    cursor: pointer;

    font-size: 0.9rem;

    transition: 0.3s;

}



.btn-cancel:hover {

    color: #ef4444; /* Red for cancel */

}



@keyframes slideDown {

    from { opacity: 0; transform: translateY(-10px); }

    to { opacity: 1; transform: translateY(0); }

}



/* --- Toast Popup System --- */

.toast-popup {

    position: fixed;

    bottom: 30px;

    left: 50%;

    transform: translateX(-50%) translateY(100px); /* Hidden below screen */

    background: rgba(26, 26, 26, 0.98);

    backdrop-filter: blur(15px);

    -webkit-backdrop-filter: blur(15px);

    color: white;

    padding: 16px 32px;

    border-radius: 100px;

    z-index: 9999;

    opacity: 0;

    visibility: hidden;

    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    box-shadow: 0 20px 50px rgba(0,0,0,0.3);

    border: 1px solid rgba(255,255,255,0.1);

}



.toast-popup.show {

    opacity: 1;

    visibility: visible;

    transform: translateX(-50%) translateY(0); /* Slide up into view */

}



.toast-content {

    display: flex;

    align-items: center;

    gap: 15px;

    min-width: 250px;

}



.toast-icon {

    width: 28px;

    height: 28px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    font-weight: 900;

    font-size: 0.9rem;

    flex-shrink: 0;

    color: white;

}



#toast-message {

    font-size: 0.95rem;

    font-weight: 600;

    margin: 0;

    letter-spacing: -0.2px;

}

/* ==========================================================================
   ARTICLE FOOTER & SHARE SYSTEM
   ========================================================================== */

.article-footer {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    max-width: 800px; /* Aligns with prose-content */
    margin-left: auto;
    margin-right: auto;
}

.share-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 35px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.share-box span {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-black);
}

.share-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.share-links a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
}

/* Premium Hover Underline */
.share-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.share-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Custom WhatsApp Hover Color */
.share-links a.share-whatsapp:hover {
    color: #25D366;
}
.share-links a.share-whatsapp:hover::after {
    background: #25D366;
}

.share-links a:hover::after {
    width: 100%;
}

/* Copy Link Button Style */
.btn-copy-link {
    background: var(--text-black);
    color: white !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8rem !important;
}

.btn-copy-link::after { display: none !important; }

.btn-copy-link:hover {
    background: var(--accent-color) !important;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

@media (max-width: 768px) {
    .share-box {
        flex-direction: column;
        gap: 20px;
        padding: 30px 20px;
        border-radius: 24px;
    }
}


/* ==========================================================================
   INTERNAL LINK CTA CARD
   ========================================================================== */

.insight-cta-card {
    margin: 4rem auto;
    max-width: 800px;
    padding: 40px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(99, 102, 241, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.insight-cta-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.cta-eyebrow {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-color);
    font-weight: 800;
    margin-bottom: 15px;
}

.cta-text {
    font-size: 1.2rem;
    color: var(--text-black);
    font-weight: 600;
    margin-bottom: 25px !important;
}

.internal-link-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--text-black);
    color: #fff !important;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.internal-link-cta svg {
    transition: transform 0.3s ease;
}

.internal-link-cta:hover {
    background: var(--accent-color);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.internal-link-cta:hover svg {
    transform: translateX(5px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .insight-cta-card {
        padding: 30px 20px;
        margin: 3rem 5%;
        border-radius: 24px;
    }
    
    .cta-text {
        font-size: 1.1rem;
    }
}

/* --- Actions Layout --- */
.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.secondary-hub-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.secondary-hub-link:hover {
    color: var(--accent-color);
}

/* --- Card Background Enhancement --- */
.insight-cta-card {
    position: relative;
    overflow: hidden;
}

/* Subtle background accent blur */
.insight-cta-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--accent-color);
    filter: blur(80px);
    opacity: 0.1;
    z-index: 0;
}


/* ==========================================================================
   RELATED INSIGHTS GRID - EDITORIAL DESIGN
   ========================================================================== */

.related-insights-section {
    margin: 100px auto;
    max-width: 1000px;
    width: 90%;
}

/* Section Header Divider */
.section-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--glass-border, #e2e8f0);
}

.divider-text {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-color, #6366f1);
    white-space: nowrap;
}

/* Grid Architecture */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.insight-grid-card {
    text-decoration: none;
    color: inherit;
    display: block;
    outline: none;
}

/* Image Wrapper with Black & White Logic */
.grid-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
    background: #000; /* Dark base for better contrast */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.grid-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    
    /* Grayscale Initial State */
    filter: grayscale(100%);
    transition: 
        filter 0.7s ease, 
        transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Hover State: Restore Color and Zoom */
.insight-grid-card:hover .grid-card-image img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Subtle Vignette Overlay */
.grid-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.1));
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.insight-grid-card:hover .grid-card-overlay {
    opacity: 0;
}

/* Typography & Content */
.grid-card-content time {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 12px;
}

.grid-card-content h3 {
    font-size: 1.2rem;
    line-height: 1.45;
    font-weight: 800;
    color: var(--text-black, #1a1a1a);
    margin-bottom: 18px;
    
    /* 2-Line Clamp for Consistency */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    transition: color 0.3s ease;
}

.insight-grid-card:hover h3 {
    color: var(--accent-color, #6366f1);
}

/* Interactive CTA Link */
.read-more-link {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-color, #6366f1);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    transition: gap 0.3s ease;
}

.insight-grid-card:hover .read-more-link {
    gap: 8px; /* Animates the space before the arrow */
}

/* --- Responsive Adaptations --- */
@media (max-width: 992px) {
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 650px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .related-insights-section {
        margin: 60px auto;
    }

    .grid-card-image {
        border-radius: 20px;
    }
}


/* --- Dictionary Popup --- */
.dict-popup {
    position: absolute;
    z-index: 10000;
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    display: none; /* Hidden by default */
    animation: dictFadeIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dictFadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.dict-word {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 5px;
    display: block;
}

.dict-phonetic {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
    display: block;
}

.dict-meaning {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-black);
}

.dict-loading {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.dict-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.btn-pronounce {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.btn-pronounce:hover {
    transform: scale(1.1);
}

.btn-pronounce svg {
    width: 14px;
    height: 14px;
}

/* --- Breadcrumb Navigation --- */
.article-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center; /* Centers it with your header */
    gap: 10px;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-breadcrumb a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.article-breadcrumb a:hover {
    color: var(--accent-color);
}

.article-breadcrumb .sep {
    color: #ddd;
    font-weight: 400;
}

.article-breadcrumb .current {
    color: var(--text-muted);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* Prevents long titles from breaking the line on mobile */
}

@media (max-width: 768px) {
    .article-breadcrumb {
        font-size: 0.7rem;
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   HIGHLIGHT-TO-SHARE MASTER STYLING
   ========================================================================== */

#shareTooltip {
    /* Essential Positioning */
    position: absolute;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    gap: 5px;
    
    /* Aesthetics */
    background: #1a1a1a;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 12px;
    z-index: 10001; /* Must be above Header and ToC */
    
    /* Shadow & Effects */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Animation */
    pointer-events: auto;
    user-select: none;
    animation: tooltipReveal 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* The Little Triangle Arrow at the bottom */
#shareTooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
}

@keyframes tooltipReveal {
    from { 
        opacity: 0; 
        transform: translateY(8px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.tooltip-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: #ffffff;
    position: relative;
}

/* Hover Backgrounds */
.tooltip-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Success State for the Copy Button */
.tooltip-btn.success {
    color: #10b981 !important; /* Emerald Green */
    transform: scale(1.2);
}

/* Tooltip animation when closing */
#shareTooltip.fade-out {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    transition: all 0.3s ease;
}

/* Specific Brand Hover Colors */
#shareTweet:hover { color: #1DA1F2; }
#shareWhatsApp:hover { color: #25D366; }
#shareEmail:hover { color: #818cf8; }
#copyQuote:hover { color: #6366f1; }

/* SVG Icon Constraint */
.tooltip-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px; /* Thicker strokes look more premium */
}

/* Optional Divider before the Copy button */
#copyQuote {
    margin-left: 5px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0 8px 8px 0;
}

/* Matching the prose selection to your indigo theme */
.prose-content ::selection {
    background: rgba(99, 102, 241, 0.2); /* Soft indigo highlight */
    color: inherit;
}

/* For Firefox */
.prose-content ::-moz-selection {
    background: rgba(99, 102, 241, 0.2);
    color: inherit;
}



.premium-discovery-toast {
    position: fixed !important;
    bottom: 40px !important;
    left: 50% !important;
    transform: translate(-50%, 200%) !important;
    /* Force it way down */
    z-index: 999999 !important;
    /* Max priority */
    min-width: 320px;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    pointer-events: none;
}

.premium-discovery-toast.show {
    transform: translate(-50%, 0) !important;
    /* Bring it up */
    pointer-events: auto;
}

.glass-morph {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 8px 8px 8px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background: #6366f1;
    border-radius: 50%;
    position: relative;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #6366f1;
    animation: toastPulse 2s infinite;
}

@keyframes toastPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.toast-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.toast-title {
    color: #ffffff !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    font-family: sans-serif;
}

.toast-desc {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.75rem !important;
    margin: 2px 0 0 0 !important;
    white-space: nowrap;
    font-family: sans-serif;
}

.toast-action-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}


/* --- Optimized Skeleton & Reveal Logic --- */

.insight-grid-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    min-height: 400px;
}

/* Layered Skeleton */
.skeleton-wrapper {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--bg-white, #fff);
    padding: 20px;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

body.dark-mode .skeleton-wrapper { background: #0f172a; }

.skeleton-box {
    background: #f0f0f0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

body.dark-mode .skeleton-box { background: #1e293b; }

/* The Shimmer Sweep */
.skeleton-box::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmerSweep 1.8s infinite;
}

@keyframes shimmerSweep {
    100% { transform: translateX(100%); }
}

.sk-img { height: 220px; width: 100%; margin-bottom: 20px; }
.sk-text { height: 12px; width: 40%; margin-bottom: 12px; }
.sk-title { height: 24px; width: 85%; }
.sk-btn { height: 10px; width: 30%; margin-top: 15px; }

/* Layered Content */
.grid-card-link {
    display: block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* The Reveal State */
.insight-grid-card.loaded .skeleton-wrapper {
    opacity: 0;
}

.insight-grid-card.loaded .grid-card-link {
    opacity: 1;
    transform: translateY(0);
}

/* Styling for the new containers */
#premiumCommentForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-guideline {
    text-align: left;
    padding-top: 10px;
    border-top: 1px solid var(--glass-border);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* The Bottom Button Wrapper */
.form-submit-container {
    margin-top: 10px;
}

.btn-premium-v2 {
    width: 100%; /* Makes button full width */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--accent-color);
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    cursor: pointer;
}

.btn-premium-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
    filter: brightness(1.1);
}

.btn-premium-v2 svg {
    transition: transform 0.3s ease;
}

.btn-premium-v2:hover svg {
    transform: translate(3px, -3px);
}


/* **************** TOC **************** */
/* --- Master TOC Wrapper --- */
.toc-wrapper {
    position: fixed;
    right: 40px;
    bottom: 20%; /* Centered in the lower visual field */
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

/* --- Floating Toggle Button --- */
.toc-btn {
    width: 56px;
    height: 56px;
    background: var(--glass-bg, #fff);
    border: 1px solid var(--glass-border, rgba(0,0,0,0.1));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50%;
    color: var(--text-black, #1a1a1a);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toc-btn:hover {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-color, #6366f1);
    color: #fff;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
}

/* --- The 60vh Chapters Panel --- */
.toc-panel {
    position: absolute;
    bottom: 80px; /* Gap above the button */
    right: 0;
    width: 320px;
    height: 60vh; /* Exactly 60% of the screen height */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border, rgba(0,0,0,0.08));
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column; /* Fixed header, scrolling body */
    overflow: hidden;
    
    /* Animation States */
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

.toc-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* --- Panel Header (Stays Fixed) --- */
.toc-header {
    padding: 24px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-black, #1a1a1a);
}

#tocClose {
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

#tocClose:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* --- Scrollable List Area --- */
#tocList {
    flex: 1;
    overflow-y: auto;
    padding: 15px 10px 30px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

/* Custom Scrollbar for Chrome/Safari */
#tocList::-webkit-scrollbar {
    width: 5px;
}
#tocList::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
#tocList:hover::-webkit-scrollbar-thumb {
    background: var(--accent-color, #6366f1);
}

/* --- Individual Chapter Links --- */
.toc-link {
    display: block;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 14px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.toc-sub {
    margin-left: 15px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* --- Active & Hover States (Scroll-Linked) --- */
.toc-link:hover {
    background: #f8fafc;
    color: var(--text-black);
    padding-left: 25px;
}

.toc-link.active-chapter {
    color: var(--accent-color);
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--accent-color);
    font-weight: 700;
    padding-left: 25px;
}

/* --- Responsive Behavior --- */
@media (max-width: 768px) {
    .toc-wrapper {
        right: 20px;
        bottom: 10%;
    }
    .toc-panel {
        width: calc(100vw - 40px); /* Fill width on small mobile */
        max-width: 320px;
    }
}

/* ==========================================================================
   MOBILE BOTTOM-SHEET TRANSFORMATION (768px and below)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Dock the wrapper to the bottom */
    .toc-wrapper {
        right: 20px;
        bottom: 20px; /* Floating button position */
    }

    /* 2. Transform panel into a Bottom Sheet */
    .toc-panel {
        position: fixed; /* Lock to viewport */
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;    /* Full width */
        max-width: 100%;
        height: 60vh;   /* 60% of screen height */
        border-radius: 30px 30px 0 0; /* Rounded top corners only */
        border: none;
        border-top: 1px solid var(--glass-border);
        
        /* Slide from bottom animation */
        transform: translateY(100%); 
        opacity: 1; /* Keep opacity at 1 for solid drawer feel */
        visibility: visible;
        transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
    }

    .toc-panel.active {
        transform: translateY(0); /* Slide into view */
    }

    /* 3. Add a "Drag Handle" visual for mobile UX */
    .toc-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #e2e8f0;
        border-radius: 10px;
    }

    .toc-header {
        padding: 30px 24px 15px; /* Extra padding for handle */
    }

    /* 4. Increase tap target size for mobile links */
    .toc-link {
        padding: 16px 24px;
        font-size: 1rem;
    }
}


.header-actions {
    margin-top: 25px;
}

.btn-summary-pill {
    background: var(--accent-color, #6366f1);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-summary-pill:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* 1. The Overlay & Background Blobs */
.modal-overlay.modal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 999999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-bg-glow {
    position: absolute;
    inset: 0;
    filter: blur(100px);
    opacity: 0.5;
    z-index: 1;
}

.blob-1 {
    position: absolute;
    top: -10%; left: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--modal-accent) 0%, transparent 70%);
}

.blob-2 {
    position: absolute;
    bottom: -10%; right: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
}

/* 2. Content & Animation */
.modal-overlay.modal-fullscreen .modal-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--modal-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* 3. Fixed Header/Footer */
.modal-header {
    padding: 24px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.modal-footer {
    padding: 30px 5%;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: white;
}

/* 4. Scrollable Body & Excerpt Typography */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 60px 5%;
    scrollbar-width: thin;
}

.body-container {
    max-width: 800px;
    margin: 0 auto;
}

.modal-post-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 40px;
    color: #111827;
}

.prose-summary {
    font-size: 1.25rem;
    line-height: 1.85;
    color: #374151;
}

/* Fix for HTML elements inside the excerpt */
.prose-summary h2 { font-size: 1.75rem; margin-top: 2em; color: #111827; }
.prose-summary p { margin-bottom: 1.5em; }
.prose-summary ul { margin: 1.5em 0; padding-left: 1.2em; }
.prose-summary li { margin-bottom: 0.8em; list-style-type: square; color: var(--modal-accent); }
.prose-summary b, .prose-summary strong { color: #111827; font-weight: 700; }

/* Progress Bar */
.summary-progress-bar {
    position: absolute;
    top: 0; left: 0;
    height: 4px;
    background: var(--modal-accent);
    width: 0%;
    z-index: 100;
    transition: width 0.1s linear;
}

/* Buttons */
.btn-close-modal {
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 44px; height: 44px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-close-modal:hover { background: #fee2e2; color: #ef4444; transform: rotate(90deg); }

.btn-modal-action {
    background: #111827;
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 100px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-action:hover {
    background: var(--modal-accent);
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.header-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-start; /* Aligns button to the left */
}

/* Center the entire header block */
.article-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers children horizontally */
    justify-content: center;
    margin-bottom: 40px;
}

/* Ensure meta info is centered */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

/* Specific centering for the button container */
.header-actions {
    width: 100%;
    display: flex;
    justify-content: center; /* This moves the button to the middle */
    margin-top: 30px;
}

/* Optional: Smooth hover for the Indigo pill */
.btn-summary-pill {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.btn-summary-pill:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* Centering the button container */
.header-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

/* The Pulse Button */
.btn-summary-pill {
    position: relative; /* Necessary for the pulse ring */
    background: var(--accent-color, #6366f1);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 5;
}

/* The Animated Pulse Ring */
.btn-summary-pill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    border: 2px solid var(--accent-color, #6366f1);
    opacity: 0;
    animation: insightPulse 2.5s infinite;
    z-index: -1;
}

@keyframes insightPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15, 1.3); /* Slightly wider pulse */
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Hover State to pause pulse and lift button */
.btn-summary-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4);
}

.btn-summary-pill:hover::after {
    animation: none; /* Stops pulsing when the user is about to click */
}

.btn-summary-pill.pulse-disabled::after {
    display: none !important;
}

/* --- Article Tags Section --- */

.post-tags-wrapper {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 30px 24px;
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.tags-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.tag-icon {
    color: var(--text-muted);
    opacity: 0.8;
}

.tags-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.tags-flex-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* --- Premium Tag Pill --- */

.post-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-light);
    border: 1px solid #eef0f2;
    padding: 8px 14px 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-tag-pill .hash {
    color: var(--accent-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

/* --- Tag Frequency Badge --- */

.tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    margin-left: 4px;
    transition: all 0.3s ease;
}

/* --- Interaction States --- */

.post-tag-pill:hover {
    border-color: var(--accent-color);
    color: var(--bg-light);
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.post-tag-pill:hover .hash,
.post-tag-pill:hover .tag-count {
    color: var(--bg-light);
    background: rgba(255, 255, 255, 0.2);
}

/* --- Special State: Current Post Tags --- */

.post-tag-pill.current-post-tag {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.04);
}

.post-tag-pill.current-post-tag .hash {
    font-weight: 900;
}



.article-meta .view-count {
    color: var(--text-dark);
    font-size: 0.9rem;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
}

.article-meta .view-count svg {
    color: var(--accent-color);
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.view-count, .share-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

.share-count svg {
    filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.2));
}

/* --- Advanced Article Footer & Share Bar --- */

.article-footer {
    max-width: 800px;
    margin: 5rem auto 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.share-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.share-box > span {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.share-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* --- Premium Share Buttons --- */

.share-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-black);
}

/* Specific Brand Hover Logic */
.share-links a.share-twitter:hover {
    color: #1DA1F2;
    border-color: #1DA1F2;
    background: rgba(29, 161, 242, 0.03);
}

.share-links a.share-linkedin:hover {
    color: #0077b5;
    border-color: #0077b5;
    background: rgba(0, 119, 181, 0.03);
}

.share-links a.share-whatsapp:hover {
    color: #25D366;
    border-color: #25D366;
    background: rgba(37, 211, 102, 0.03);
}

.share-links a.btn-copy-link {
    background: var(--text-black);
    color: #fff;
    border: none;
    cursor: pointer;
}

.share-links a.btn-copy-link:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

/* Success Animation for Copy Link */
.share-links a.btn-copy-link.copied {
    background: #22c55e !important;
}

.share-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}


.header-actions {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
}

.btn-listen.is-playing {
    background: var(--accent-color);
    color: #fff !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}
.btn-listen.is-playing svg {
    animation: pulse-wave 1.5s infinite;
}


@keyframes pulse-wave {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Animated Speaker Waves */
.btn-listen.is-playing #speaker-wave {
    stroke-dasharray: 20;
    animation: wave-flow 2s linear infinite;
}

@keyframes wave-flow {
    from { stroke-dashoffset: 40; }
    to { stroke-dashoffset: 0; }
}

.listen-control-group {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 100px;
    padding: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.speech-rate-selector {
    background: transparent;
    border: none;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0 10px;
    cursor: pointer;
    outline: none;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 5px;
}

.speech-rate-selector:hover {
    color: var(--accent-color);
}

/* --- Immersive Reading Mode --- */

/* When playing, we dim the prose container slightly */
.prose-content.is-immersive {
    transition: opacity 0.5s ease;
}

/* Dim all paragraphs except the one being spoken */
.prose-content.is-immersive p {
    opacity: 0.25;
    filter: blur(1px);
    transition: all 0.6s ease;
}

/* The Active Paragraph: High Contrast and Focus */
.prose-content.is-immersive p.speaking-focus {
    opacity: 1;
    filter: blur(0);
    transform: scale(1.02);
    color: var(--text-black);
    text-shadow: 0 0 20px rgba(255,255,255,1);
}

/* Background Dimming for the whole wrapper */
.article-wrapper.is-reading-mode::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    z-index: 5;
    pointer-events: none;
    animation: fadeIn 0.8s ease forwards;
}

/* Keep the article content and actions above the dim layer */
.prose-content, .header-actions, .article-header {
    position: relative;
    z-index: 10;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.voice-meta-info {
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 8px;
    padding-left: 8px;
}

.accent-flag {
    font-size: 1rem;
    margin-right: 4px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.btn-close-voice {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.btn-close-voice:hover {
    transform: rotate(90deg) scale(1.1);
    background: #ff6b81;
}

/* --- Floating Voice Control --- */
.floating-voice-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: none; /* Controlled by JS */
    align-items: center;
    animation: slideInUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-stop-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.4);
    transition: all 0.3s ease;
}

.fab-stop-btn:hover {
    background: #ff6b81;
    transform: scale(1.05);
}

/* Pulse animation to show it's "Live" */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    border: 4px solid #ff4757;
    animation: ring-pulse 2s infinite;
    pointer-events: none;
}

@keyframes ring-pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    70% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

@keyframes slideInUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- 1. Main Container: Fixed Centering & Wrapping --- */
.header-actions {
    display: flex;
    flex-wrap: wrap;       /* Allows buttons to stack on small phones */
    justify-content: center; /* PERFECT CENTERING */
    align-items: center;
    gap: 12px;
    margin: 2rem auto;
    width: 100%;
    max-width: 100%;
}

/* --- 2. Button Pills --- */
.btn-summary-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevents text from breaking */
}

.btn-summary-pill:hover {
    color: var(--accent-color);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* --- 3. Listen Group (Button + Flag + Select) --- */
.listen-control-group {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    color: var(--accent-color);
    border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 2px;
}


/* Specific styling for the button inside the group to remove duplicate border/bg */
.listen-control-group .btn-listen {
    background: transparent;
    border: var(--accent-color);
    background: var(--accent-color);
}

.listen-control-group .btn-listen:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--accent-color);
}

.voice-meta-info {
    display: flex;
    align-items: center;
    padding: 0 12px 0 8px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    height: 24px;
}

.accent-flag {
    font-size: 1.1rem;
    margin-right: 6px;
}

.speech-rate-selector {
    background: transparent;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    color: inherit;
}

/* --- 4. Floating Stop Box & FAB --- */
.floating-voice-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: none; /* Controlled by JS */
    align-items: center;
}

.fab-stop-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 71, 87, 0.3);
}

.pulse-ring {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50px;
    border: 4px solid #ff4757;
    animation: ring-pulse 2s infinite;
}



/* --- 5. RESPONSIVE FIXES (Mobile Centering) --- */
@media (max-width: 600px) {
    .header-actions {
        gap: 10px;
    }

    /* Remove text to save space, keeping icons centered */
    .btn-summary-pill span, 
    .fab-stop-btn span {
        display: none;
    }

    .btn-summary-pill {
        width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 50%;
    }

    .listen-control-group {
        border-radius: 50px;
        padding-right: 10px;
    }

    .floating-voice-box {
        right: 20px;
        bottom: 20px;
    }
}

@keyframes ring-pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    70% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dict-popup {
    position: absolute; /* Default for desktop */
    z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 15px;
    width: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: none;
    animation: fadeIn 0.2s ease-out;
}

/* Centering Logic for Mobile */
.dict-popup.mobile-center {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 0 0 100vh rgba(0,0,0,0.3), 0 10px 30px rgba(0,0,0,0.2); /* Added dim background overlay */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Center adjustment for desktop animation when NOT in mobile mode */
.dict-popup:not(.mobile-center) {
    animation: fadeIn 0.2s ease-out;
}

/* 1. Main Positioning Wrapper */
.premium-discovery-toast {
    position: fixed;
    bottom: 170px; /* Stacks above Back-to-Top */
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 400px;
    z-index: 9999;
}

/* 2. The Dark Grey Glass Container */
.toast-inner.glass-morph {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    
    /* Deep Grey Background with Transparency */
    background: rgba(30, 41, 59, 0.95); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Border helps define the shape against white backgrounds */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    overflow: hidden;
}

/* 3. Icon Section */
.toast-visual {
    flex-shrink: 0;
    margin-right: 12px;
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background: #818cf8; /* Bright indigo for contrast */
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* 4. Text Content (Now clearly visible) */
.toast-content {
    flex-grow: 1;
    min-width: 0;
    margin-right: 10px;
}

.toast-title {
    color: #f8fafc; /* Near white */
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 2px 0;
}

.toast-desc {
    color: #cbd5e1; /* Light grey text */
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
}

.toast-desc strong {
    color: #ffffff; /* Make key terms pure white */
    font-weight: 600;
}

/* 5. "Got it" Button Fix */
.toast-action-btn {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-action-btn:hover, .toast-action-btn:active {
    background: #6366f1; /* Transitions to Indigo on click */
    border-color: #6366f1;
    transform: scale(0.95);
}

/* 6. Pulse Animation */
@keyframes pulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(129, 140, 248, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(129, 140, 248, 0); }
}


/* Target tables specifically within the article content */
.prose-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
    overflow: hidden;
}

/* For Small Screens Only */
@media screen and (max-width: 768px) {
    .prose-content {
        /* Ensure the main container doesn't break */
        overflow-x: hidden;
    }

    /* Wrap the table behavior */
    .prose-content table {
        display: block;
        width: 100%;
        overflow-x: auto; /* Adds the horizontal scrollbar */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        white-space: nowrap; /* Prevents text from squashing too much */
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Optional: Style the scrollbar to match your glass-morph theme */
    .prose-content table::-webkit-scrollbar {
        height: 6px;
    }
    .prose-content table::-webkit-scrollbar-thumb {
        background: rgba(99, 102, 241, 0.3); /* Indigo color matching your theme */
        border-radius: 10px;
    }
    .prose-content table::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
    }
}

/* Political Party Highlighting */
.party-bjp {
    color: #FF9933 !important; /* Authentic Saffron */
    font-weight: 700;
}

.party-tmc {
    color: #009639 !important; /* Trinamool Green */
    font-weight: 700;
}

.party-cpi {
    color: #FF0000 !important; /* Pure Red */
    font-weight: 700;
}

/* Ensure these spans don't break lines in the middle of a word */
.prose-content span[class^="party-"] {
    display: inline-block;
    white-space: nowrap;
}


/* bottom tag */
@media screen and (max-width: 768px) {
    /* 1. Section Container */
    .post-tags-wrapper {
        position: relative;
        padding: 24px 16px;
        background: var(--text-dark); /* Using your root dark slate */
        border-radius: 24px;
        margin: 30px 0;
        border: 1px solid var(--glass-border);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .tags-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
        padding-left: 4px;
    }

    .tag-icon {
        color: var(--accent-color); /* Indigo accent */
        filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
    }

    .tags-eyebrow {
        font-size: 0.75rem;
        font-weight: 700; /* Bold eyebrow */
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
    }

    /* 2. The 3-Row Scroll Engine */
    .tags-flex-list {
        display: grid;
        /* Strictly 3 rows */
        grid-template-rows: repeat(3, 42px); 
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        gap: 12px;
        
        overflow-x: auto;
        padding-bottom: 8px; /* Space for overscroll bounce */
        
        /* Hide scrollbars but keep functionality */
        -ms-overflow-style: none;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .tags-flex-list::-webkit-scrollbar {
        display: none;
    }

    /* 3. The Premium Tag Pill */
    .post-tag-pill {
        display: flex;
        align-items: center;
        padding: 0 18px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        color: var(--bg-light); /* White text against dark bg */
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 600; /* Made font bold as requested */
        transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .post-tag-pill .hash {
        color: var(--accent-color);
        margin-right: 4px;
        font-weight: 800;
    }

    .tag-count {
        margin-left: 8px;
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--accent-color);
        background: rgba(99, 102, 241, 0.15);
        padding: 2px 8px;
        border-radius: 20px;
    }

    /* 4. Advanced Interaction & Edge Fade */
    .post-tag-pill:active {
        transform: scale(0.92);
        background: var(--accent-color);
        color: white;
    }
    
    .post-tag-pill:active .hash, 
    .post-tag-pill:active .tag-count {
        color: white;
    }

    /* Right-side gradient fade to signal "more content" */
    .post-tags-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 80px;
        height: 100%;
        background: linear-gradient(to right, transparent, var(--text-dark));
        pointer-events: none;
    }
}

/* --- Desktop & Base --- */
.video-integration-area {
    margin: 60px 0;
    width: 100%;
}

.video-container-wrapper {
    position: relative;
    transition: all 0.5s var(--ease);
}

.video-header-premium {
    margin-bottom: 20px;
}

.video-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.pulse-icon {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.video-player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid var(--glass-border);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1), 
                width 0.4s ease, 
                border-radius 0.4s ease;
}

.video-player-frame iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* --- Floating Mode Styles --- */
.video-player-frame.is-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    z-index: 9999;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInFloating 0.5s var(--ease);
}

@keyframes slideInFloating {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.close-floating-video {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* Only show in floating mode */
    align-items: center;
    justify-content: center;
}

.is-floating .close-floating-video {
    display: flex;
}

/* --- Mobile Fixes --- */
@media (max-width: 768px) {
    .video-player-frame.is-floating {
        width: 280px;
        bottom: 20px;
        right: 20px;
    }
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}
.premium-table th, .premium-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.premium-table thead {
    background-color: #f4f4f4;
}