/* All styles from index.html - removed body styles that conflict with base.html */

/* Content wrapper */
.content-wrapper {
    /* No special padding needed */
}

/* Date display styling (header moved to base.html) */
.date {
    font-size: 14px;
    color: #888;
    text-align: center;
}

/* Card override: briefings uses white border instead of default gray */
.card {
    border: 1px solid #ffffff;
}

/* Accordion cards (used for Strategy Performance + Trend Scores & Positioning) */
.accordion-card {
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
    border: none;
    padding: 16px 16px 10px 16px;
    cursor: pointer;
    color: #ffffff;
}

.accordion-title {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    display: block;
}

.accordion-chevron {
    flex: 0 0 auto;
    color: #fbbf24; /* amber */
    font-size: 30px; /* 25% smaller */
    font-weight: 800;
    transition: transform 0.15s ease-out, color 0.15s ease-out;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.55),
                 0 0 20px rgba(251, 191, 36, 0.35);
    animation: accordionChevronGlow 2s ease-in-out infinite;
}

.accordion-card.expanded .accordion-chevron {
    transform: rotate(180deg);
    color: #fbbf24;
}

@keyframes accordionChevronGlow {
    0%, 100% {
        text-shadow: 0 0 8px rgba(251, 191, 36, 0.45),
                     0 0 16px rgba(251, 191, 36, 0.25);
        filter: drop-shadow(0 0 0 rgba(251, 191, 36, 0));
        opacity: 0.9;
    }
    50% {
        text-shadow: 0 0 16px rgba(251, 191, 36, 0.9),
                     0 0 32px rgba(251, 191, 36, 0.6),
                     0 0 48px rgba(251, 191, 36, 0.35);
        filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.55));
        opacity: 1;
    }
}

/* Smooth accordion using CSS Grid (same technique as help tips) */
.accordion-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.2s ease-out;
    overflow: hidden;
}

.accordion-card.expanded .accordion-content-wrapper {
    grid-template-rows: 1fr;
}

.accordion-content {
    min-height: 0;
    padding: 0 16px 0 16px; /* prevent collapsed "peek" */
    transition: padding 0.15s ease-out;
}

.accordion-card.expanded .accordion-content {
    padding: 0 16px 16px 16px;
}

.accordion-header:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 10px;
}

/* Today's Update Card */
.todays-update {
    background-color: #1a1f22;
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.todays-update-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.todays-update-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.sentiment-badge {
    background-color: #2a2a2a;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #ffffff;
}

.update-headline {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


/* TLDR Section */
.tldr-content {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    font-size: 15px;
    line-height: 1.6;
}

.asset-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    margin: 0 2px;
}

.asset-up {
    background-color: #22c55e;
    color: #ffffff;
}

.asset-down {
    background-color: #ef4444;
    color: #ffffff;
}

.arrow {
    margin-right: 4px;
}

/* Insights Section */
.insight-item {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.insight-item:last-child {
    margin-bottom: 0;
}

/* Digging Deeper Section */
.deep-analysis {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.read-more {
    color: #ffffff;
    text-decoration: underline;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
}

/* EMPI (Equity Market Pressure Index) Section */
.fear-greed-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
}

.fear-greed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.fear-greed-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fear-greed-badge {
    background-color: #ff6b35;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
}

.fear-greed-label {
    font-size: 16px;
    font-weight: 600;
}

.fear-greed-change {
    background-color: #2a2a2a;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fear-greed-slider {
    position: relative;
    height: 8px;
    background: linear-gradient(to right, #8b1a1a 0%, #4a4a4a 50%, #1a5c3a 100%);
    border-radius: 4px;
    margin: 15px 0 10px 0;
}

.fear-greed-indicator {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #0a0a0a;
    border: 2px solid #ffffff;
    border-radius: 50%;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.fear-greed-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
}

/* Today's Moves Heatmap */
.todays-moves {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ffffff;
}

.heatmap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    table-layout: fixed;
}

/* Allow wrapping for all columns if content is too long */
.heatmap-table td {
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: normal; /* Allow wrapping when content is too long */
}

.heatmap-table td.ticker-cell {
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0; /* Allow shrinking */
}

.heatmap-table th {
    text-align: center;
    padding: 3px 1px;
    font-weight: 600;
    color: #888;
    border-bottom: 1px solid #2a2a2a;
    font-size: 9px;
}

.heatmap-table th:first-child {
    text-align: left;
}

.heatmap-table td {
    padding: 3px 1px;
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
}

.heatmap-table tr:last-child td {
    border-bottom: none;
}

.heatmap-table .ticker-cell {
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    font-size: 9px;
}

.strategy-heatmap th:not(:first-child),
.strategy-heatmap td:not(:first-child) {
    font-size: 10px;
}

.strategy-heatmap .ticker-cell {
    font-size: 8px;
}

.strategy-heatmap th {
    padding: 4px 2px;
}

.strategy-heatmap td {
    padding: 4px 2px;
}

.heatmap-cell {
    padding: 2px 2px;
    border-radius: 3px;
    font-weight: 600;
    min-width: 35px;
    max-width: 100%;
    display: inline-block;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.heatmap-positive {
    background-color: #22c55e;
    color: #ffffff;
}

.heatmap-negative {
    background-color: #ef4444;
    color: #ffffff;
}

.heatmap-neutral {
    background-color: #2a2a2a;
    color: #888;
}

.heatmap-missing {
    color: #555;
}

.heatmap-section-header {
    background-color: #2a2a2a;
    font-weight: 600;
    color: #ffffff;
    text-align: left;
    padding: 10px 8px;
    border-top: 2px solid #3a3a3a;
    border-bottom: 1px solid #2a2a2a;
}

.heatmap-section-header td {
    position: relative;
}

.heatmap-section-header:first-child {
    border-top: none;
}

.heatmap-section-header td {
    border-bottom: none;
    padding: 8px 8px;
    position: relative;
}

/* Date Picker */
.date-picker-container {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px; /* Add spacing from top bar */
    margin-bottom: 20px;
    border: 1px solid #2a2a2a;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-picker-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 0;
    display: inline-block;
    white-space: nowrap;
}

.date-picker-input {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 10px 15px;
    color: #ffffff;
    font-size: 16px;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Make entire field clickable on iOS */
    -webkit-tap-highlight-color: rgba(255, 68, 68, 0.3);
    touch-action: manipulation;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.date-picker-input:focus {
    outline: none;
    border-color: #ff4444;
}

/* Green glow for read dates */
.date-picker-input.date-read {
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6),
                0 0 20px rgba(34, 197, 94, 0.4),
                0 0 30px rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

/* Red glow for unread dates */
.date-picker-input.date-unread {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6),
                0 0 20px rgba(239, 68, 68, 0.4),
                0 0 30px rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* Gray for unavailable dates */
.date-picker-input.date-unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #1a1a1a;
}

/* Style calendar popup dates (limited browser support) */
.date-picker-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(1);
}

/* Attempt to style calendar dates (very limited browser support) */
.date-picker-input::-webkit-datetime-edit {
    color: #ffffff;
}

.date-picker-input::-webkit-datetime-edit-fields-wrapper {
    color: #ffffff;
}

/* Removed: .loading class that made entire page dark - replaced with subtle spinner overlay */

/* Subtle loading spinner overlay (replaces dark page overlay) */
.briefing-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3); /* Subtle dark overlay, not full opacity */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Allow clicks through when not loading */
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.briefing-loading-overlay.show {
    opacity: 1;
    pointer-events: auto; /* Block clicks when loading */
}

.briefing-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fbbf24; /* Amber spinner */
    border-radius: 50%;
    animation: briefingSpinnerRotate 0.8s linear infinite;
}

@keyframes briefingSpinnerRotate {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    background-color: #991b1b;
    color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: none;
}

/* Trend/Positioning table in Digging Deeper section */
.trend-positioning-table {
    max-width: 600px;
    margin: 20px auto 0;
}

.trend-positioning-table th {
    font-size: 12px;
}

.trend-positioning-table td {
    font-size: 12px;
}

/* Help icon and popover */
.help-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background-color: #2a2a2a;
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s;
    vertical-align: middle;
    border: 1px solid #3a3a3a;
}

.help-icon:hover {
    background-color: #3a3a3a;
    color: #ffffff;
    border-color: #4a4a4a;
}

.help-popover {
    position: absolute;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    min-width: 280px;
    max-width: 400px;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    display: none;
}

.help-popover.visible {
    display: block;
}

.help-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2a2a;
}

.help-popover-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.help-popover-close {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    transition: color 0.2s;
}

.help-popover-close:hover {
    color: #ffffff;
}

.help-popover-content {
    font-size: 12px;
    color: #ccc;
    line-height: 1.6;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}

.help-popover-content::-webkit-scrollbar {
    width: 6px;
}

.help-popover-content::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.help-popover-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.help-popover-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.help-tip-item {
    margin-bottom: 12px;
}

.help-tip-item:last-child {
    margin-bottom: 0;
}

.help-tip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 6px 0;
    user-select: none;
}

.help-tip-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 13px;
}

.help-tip-toggle {
    color: #888;
    font-size: 12px;
    transition: transform 0.15s ease-out;
}

.help-tip-item.expanded .help-tip-toggle {
    transform: rotate(180deg);
}

/* Modern accordion using CSS Grid - much faster and smoother than max-height */
.help-tip-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.2s ease-out;
    overflow: hidden;
}

.help-tip-item.expanded .help-tip-content-wrapper {
    grid-template-rows: 1fr;
}

.help-tip-content {
    padding-left: 12px;
    color: #aaa;
    font-size: 12px;
    line-height: 1.5;
    padding-top: 0;
    min-height: 0;
    transition: padding-top 0.15s ease-out;
}

.help-tip-item.expanded .help-tip-content {
    padding-top: 8px;
}

.help-tip-item.locked .help-tip-header {
    opacity: 0.7;
}

.help-tip-item.locked .help-tip-title {
    color: #888;
}

.help-tip-item.locked .help-tip-toggle {
    color: #888;
}

/* Locked Modal */
.locked-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.locked-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.locked-modal-content {
    position: relative;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    z-index: 2001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.locked-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.locked-modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
}

.locked-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    transition: color 0.2s;
}

.locked-modal-close:hover {
    color: #ffffff;
}

.locked-modal-body {
    text-align: center;
}

.locked-modal-body p {
    color: #ccc;
    margin-bottom: 20px;
    font-size: 14px;
}

.locked-modal-button {
    background: #4a9eff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 12px;
}

.locked-modal-button:hover {
    background: #3a8eef;
}

.locked-modal-subtext {
    font-size: 12px;
    color: #888;
    margin-top: 12px;
}

.locked-modal-subtext a {
    color: #4a9eff;
    text-decoration: none;
}

.locked-modal-subtext a:hover {
    text-decoration: underline;
}
/* Sign-up Blocks */
.signup-block {
    background-color: #1a1a1a;
    border: 1px solid #ffffff;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    text-align: center;
}

.signup-content {
    max-width: 100%;
}

.signup-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 12px;
}

.signup-text strong {
    color: #fff;
    font-weight: 600;
}

.signup-input {
    width: 100%;
    max-width: 280px;
    padding: 8px 12px;
    background-color: #0a0a0a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.signup-input::placeholder {
    color: #666;
}

.signup-input:focus {
    outline: none;
    border-color: #4a4a4a;
}

.signup-button {
    padding: 8px 20px;
    background-color: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.signup-button:hover {
    background-color: #4a4a4a;
}

.signup-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.signup-success {
    color: #22c55e;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

.signup-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
}

@media (max-width: 600px) {
    .content-wrapper {
        /* No special padding needed */
    }
    
    .signup-input {
        max-width: 100%;
        margin-right: 0;
    }
    
    .signup-button {
        width: 100%;
        margin-top: 4px;
    }
    
    /* Mobile: Ensure asset column wraps properly when space is limited */
    .heatmap-table td.ticker-cell {
        white-space: normal !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 14%; /* Constrain on mobile to force wrapping */
        min-width: 60px; /* Prevent too small */
    }
    
    .heatmap-table {
        table-layout: fixed;
    }
    
    /* Mobile: Fix date picker overflow */
    .date-picker-container {
        padding: 12px;
        margin-left: 0;
        margin-right: 0;
        margin-top: 20px; /* Add spacing from top bar */
        margin-bottom: 20px;
    }
    
    .date-picker-input {
        font-size: 14px;
        padding: 10px 12px;
        min-width: 0;
        width: 100%;
        min-height: 44px; /* iOS recommended minimum touch target */
        -webkit-tap-highlight-color: rgba(255, 68, 68, 0.3);
    }
    
    /* Mobile: Prevent wrapping and reduce size for heatmap cells */
    .heatmap-cell {
        font-size: 9px !important;
        padding: 1px 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Mobile: Ensure change cells don't wrap */
    .heatmap-table td:not(.ticker-cell) {
        white-space: nowrap;
        overflow: hidden;
    }
    
    .heatmap-table td:not(.ticker-cell) .heatmap-cell {
        max-width: 100%;
        display: inline-block;
    }
}

/* Reading Progress Bar - Left margin, middle third, vertical */
/* Positioned relative to viewport, not any parent container */
/* This element is moved to body by JavaScript to ensure it's outside all containers */
.reading-progress-container {
    position: fixed !important; /* Fixed to viewport, not parent */
    left: 20px !important;
    top: 33.33vh !important; /* Start at top of middle third - viewport height */
    height: 33.33vh !important; /* Height is middle third of viewport */
    width: 4px !important;
    z-index: 100 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Force positioning context to viewport - no transforms that create containing block */
    /* Ensure it's not affected by any parent properties */
    contain: layout style paint !important;
    /* Prevent any movement or recalculation */
    will-change: auto !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.reading-progress {
    position: relative;
    width: 4px;
    height: 100%;
}

.reading-progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: transparent;
    border: 1px solid rgba(170, 170, 170, 0.3); /* Faint gray outline */
    border-radius: 2px;
}

.reading-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0%;
    background-color: #fbbf24; /* Amber fill */
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(251, 191, 36, 0.3);
    transform: translateZ(0); /* GPU acceleration for smooth updates */
    backface-visibility: hidden; /* Prevent flickering */
    -webkit-backface-visibility: hidden;
}

/* Milestone glow states - progressive intensity */
.reading-progress.milestone-25 .reading-progress-fill {
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5),
                0 0 12px rgba(251, 191, 36, 0.3);
}

.reading-progress.milestone-50 .reading-progress-fill {
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.6),
                0 0 18px rgba(251, 191, 36, 0.4),
                0 0 24px rgba(251, 191, 36, 0.2);
}

.reading-progress.milestone-75 .reading-progress-fill {
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.7),
                0 0 24px rgba(251, 191, 36, 0.5),
                0 0 32px rgba(251, 191, 36, 0.3),
                0 0 40px rgba(251, 191, 36, 0.2);
}

.reading-progress.milestone-100 .reading-progress-fill {
    box-shadow: 0 0 30px rgba(251, 191, 36, 1),
                0 0 50px rgba(251, 191, 36, 0.8),
                0 0 70px rgba(251, 191, 36, 0.6),
                0 0 90px rgba(251, 191, 36, 0.4),
                0 0 110px rgba(251, 191, 36, 0.3),
                0 0 130px rgba(251, 191, 36, 0.2);
    animation: progressPulse 1s ease-in-out infinite;
}

/* Vibrate animation for milestones */
.reading-progress.milestone-vibrate {
    animation: milestoneVibrate 0.3s ease-out;
}

.reading-progress-milestones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.reading-progress-milestone {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 2px;
    background-color: rgba(170, 170, 170, 0.4); /* Faint gray notches */
    border-radius: 1px;
}

.reading-progress-milestone.milestone-25 {
    top: 25%;
}

.reading-progress-milestone.milestone-50 {
    top: 50%;
}

.reading-progress-milestone.milestone-75 {
    top: 75%;
}

.reading-progress-milestone.milestone-100 {
    top: calc(100% - 2px); /* Account for marker height */
}

/* MQ Earned Card Progressive Glow (75% to 100%) */
#xp-earned-card {
    /* Default gray card styling - same as other cards */
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    /* Glow will be applied dynamically via JavaScript */
}

/* Pulsing animation for MQ earned card */
@keyframes xpCardPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

#xp-earned-card.pulsing {
    animation: xpCardPulse 1s ease-in-out infinite;
}



/* MQ Popup Animation */
.xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    font-size: 32px;
    font-weight: bold;
    padding: 20px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.6),
                0 0 0 4px rgba(251, 191, 36, 0.3),
                0 0 40px rgba(251, 191, 36, 0.4);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.xp-popup.show {
    opacity: 1;
    animation: xpPopupAnimation 1.5s ease-out forwards;
}

@keyframes xpPopupAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9) translateY(-30px);
        opacity: 0;
    }
}

@keyframes milestoneVibrate {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-1px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(1px);
    }
}

@keyframes completeGlow {
    0%, 100% {
        box-shadow: 0 0 8px #fbbf24, 0 0 12px #fbbf24;
    }
    50% {
        box-shadow: 0 0 12px #fbbf24, 0 0 18px #fbbf24, 0 0 24px rgba(251, 191, 36, 0.6);
    }
}

@keyframes progressPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 1),
                    0 0 50px rgba(251, 191, 36, 0.8),
                    0 0 70px rgba(251, 191, 36, 0.6),
                    0 0 90px rgba(251, 191, 36, 0.4),
                    0 0 110px rgba(251, 191, 36, 0.3),
                    0 0 130px rgba(251, 191, 36, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(251, 191, 36, 1),
                    0 0 70px rgba(251, 191, 36, 0.9),
                    0 0 100px rgba(251, 191, 36, 0.7),
                    0 0 130px rgba(251, 191, 36, 0.5),
                    0 0 160px rgba(251, 191, 36, 0.4),
                    0 0 190px rgba(251, 191, 36, 0.3);
    }
}

@media (max-width: 768px) {
    .reading-progress-container {
        left: 10px;
        width: 3px;
    }
    
    .reading-progress {
        width: 3px;
    }

    .reading-progress-bg,
    .reading-progress-fill {
        width: 3px;
    }

    .reading-progress-milestone {
        width: 5px;
        height: 1.5px;
        transform: translateX(-2.5px); /* Center on 3px bar */
    }
}
