/* BitcoinFi Research Reports - Streamlined CSS */

/* CSS Variables */
:root {
    --background-dark: #0F0311;
    --card-background: #1C0B20;
    --border-color: rgba(197, 61, 216, 0.2);
    --primary-accent: #C53DD8;
    --text-primary: #f0e6f2;
    --text-secondary: #b8a9bd;
    --chart-primary: #C53DD8;
    --chart-secondary: #A855F7;
    --chart-tertiary: #E179ED;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
}

.report-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Typography */
.section-heading {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.section-heading svg {
    margin-right: 0.75rem;
    color: var(--primary-accent);
}

/* Cards */
.card {
    background: linear-gradient(135deg, var(--card-background) 0%, #2a1031 100%);
    border-radius: 0.75rem;
    border: 1px solid rgba(197, 61, 216, 0.3);
    padding: 1.5rem;
    box-shadow: 0 0 40px rgba(197, 61, 216, 0.2), 
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Thesis Blocks */
.thesis-block {
    background: linear-gradient(135deg, rgba(197, 61, 216, 0.08) 0%, rgba(197, 61, 216, 0.03) 100%);
    border-left: 4px solid var(--primary-accent);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(197, 61, 216, 0.15),
                inset 0 1px 0 rgba(197, 61, 216, 0.1);
    position: relative;
    overflow: hidden;
}

.thesis-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-accent) 0%, transparent 100%);
    opacity: 0.3;
}

/* Tables */
table {
    background: rgba(28, 11, 32, 0.4);
    box-shadow: 0 0 20px rgba(197, 61, 216, 0.1);
}

thead {
    background: linear-gradient(135deg, rgba(197, 61, 216, 0.08) 0%, rgba(197, 61, 216, 0.05) 100%);
    box-shadow: inset 0 1px 0 rgba(197, 61, 216, 0.1);
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
    background: rgba(197, 61, 216, 0.05);
}


/* Inline Boxes */
.bg-white\/5 {
    background: #1a0e1c !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(197, 61, 216, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Utility Classes */
.highlight-accent {
    color: var(--primary-accent);
}

.metric-highlight {
    font-weight: 700;
    color: var(--primary-accent);
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(197, 61, 216, 0.3);
    letter-spacing: -0.02em;
}

/* Status Colors */
.status-active {
    color: var(--primary-accent);
}

.status-pending {
    color: #A855F7;
}

/* Links */
a:not(.logo-link):not(.social-link) {
    color: var(--text-primary);
    font-weight: bold;
    text-decoration: underline;
    text-decoration-color: var(--primary-accent);
    transition: color 0.2s ease;
}

a:not(.logo-link):not(.social-link):hover {
    color: var(--primary-accent);
    text-shadow: 0 0 8px rgba(197, 61, 216, 0.4);
}

/* Social sharing links - no color change on hover */
a.social-link {
    text-decoration: none !important;
    font-weight: normal !important;
}

a.social-link:hover {
    color: inherit !important;
}

/* Table of Contents link styles - remove underline and hover font effects */
.toc-link {
    text-decoration: none !important;
}

.toc-link:hover {
    color: inherit !important;
    text-shadow: none !important;
    padding-left: 1.5rem !important; /* Prevent jumpy text movement */
}

.toc-link h3 {
    transition: none !important;
}

.toc-link:hover h3 {
    color: var(--text-primary) !important;
}

/* TOC enhancements */
/* 1. Subtle scale effect on hover */
.toc-link {
    transform: scale(1);
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.toc-link:hover {
    transform: scale(1.02);
}

/* 2. Better focus states for accessibility */
.toc-link:focus {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

/* 3. Style bullet points */
.toc-link + ul .highlight-accent {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* 4. Add glow effect to chapter headings on hover */
.toc-link:hover h3 {
    text-shadow: 0 0 15px rgba(197, 61, 216, 0.3);
}

/* Style TOC titles and subtitles for better hierarchy */
.toc-link h3 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.toc-link p {
    color: var(--text-secondary) !important;
    opacity: 0.7;
    font-size: 0.875rem !important;
    transition: opacity 0.3s ease;
}

.toc-link:hover p {
    opacity: 0.9;
}

/* 5. Smooth transition for border glow */
.toc-link {
    position: relative;
    overflow: hidden;
}

.toc-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(197, 61, 216, 0.1), transparent);
    transition: left 0.5s ease;
}

.toc-link:hover::before {
    left: 100%;
}

/* 6. Chapter number watermarks */
.toc-link {
    position: relative;
}

.toc-link::after {
    content: attr(data-chapter);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(197, 61, 216, 0.08);
    pointer-events: none;
    transition: color 0.3s ease;
}

.toc-link:hover::after {
    color: rgba(197, 61, 216, 0.15);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s ease-in-out infinite;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Design */
@media (max-width: 640px) {
    .report-container {
        padding: 1rem;
    }
    .section-heading {
        font-size: 1.25rem;
    }
    .text-5xl {
        font-size: 2.5rem;
    }
    .overflow-x-auto {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    table {
        font-size: 0.875rem;
    }
}

/* Print Styles - PDF Export */
@media print {
    /* Page Setup */
    @page {
        size: A4;
        margin: 0;
        background: var(--background-dark);
    }
    
    /* Color Management */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Base Styles */
    body {
        background-color: #0F0311 !important;
        color: var(--text-primary) !important;
        font-size: 11pt;
        line-height: 1.6;
        margin: 0;
        padding: 1.5cm 1cm;
    }
    
    html {
        background-color: #0F0311 !important;
    }
    
    /* Hide Elements */
    .sr-only, 
    a[href="#main-content"] {
        display: none !important;
    }
    
    /* Typography */
    h1 {
        font-size: 24pt;
        color: var(--text-primary) !important;
        margin-bottom: 0.5em;
    }
    
    h2, .section-heading {
        font-size: 18pt;
        color: var(--text-primary) !important;
        border-bottom: 2px solid var(--border-color) !important;
        margin-top: 1.5em;
    }
    
    /* Components */
    .card {
        background: #1C0B20 !important;
        border: 1px solid #5a3a62 !important;
        box-shadow: none !important;
        margin-bottom: 1em;
        padding: 1.5rem;
        break-inside: avoid;
    }
    
    .thesis-block {
        background: #261429 !important;
        border-left: 3px solid #8b5a90 !important;
        box-shadow: none !important;
        padding: 1.5rem;
        margin: 1em 0;
    }
    
    /* Tables */
    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 9pt;
        margin: 1em 0;
        background: #1a0b1e !important;
        page-break-inside: auto;
    }
    
    thead {
        background: #2d1a32 !important;
        font-weight: bold;
    }
    
    th, td {
        padding: 0.5em;
        text-align: left;
    }
    
    tbody tr:nth-child(even) {
        background: #150a17 !important;
    }
    
    /* Charts */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Grid Layout Preservation */
    .grid {
        display: grid !important;
    }
    
    /* Remove gradients for better printing */
    * {
        background-image: none !important;
    }
    
    /* Metric text styles */
    .text-5xl {
        color: #f0e6f2 !important;
        font-size: 3rem !important;
        line-height: 1 !important;
    }
}