/* ===================================================================
   TRANSCRIPT DETAIL VIEW - Hub V2
   Full page transcript viewing experience
   Aligned with original resume-clean.css proportions
   =================================================================== */

/* === CSS Variables (matching original) === */
:root {
    --td-split-gap: 32px;
    --td-reading-font-size: 16px;
    --td-reading-line-height: 2.5;
    --td-reading-max-width: 900px;
    --td-video-max-width: 42%;
}

/* Responsive variables */
@media (max-width: 1600px) {
    :root {
        --td-split-gap: 24px;
        --td-video-max-width: 40%;
    }
}

@media (max-width: 1400px) {
    :root {
        --td-split-gap: 20px;
        --td-video-max-width: 38%;
    }
}

/* === Layout === */
.transcript-detail-view {
    display: flex;
    flex-direction: column;
    gap: 0; /* No gap - layout takes full height */
    padding: 24px; /* Internal padding for breathing room */
    /* Fill parent completely */
    flex: 1;
    height: 100%;
    min-height: 0; /* Critical for flex shrinking */
    max-height: 100%;
    overflow: hidden;
}

/* Back button on video (top-left corner) */
.td-video-back-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-video-back-btn:hover {
    background: rgba(255, 154, 31, 0.9);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* Split layout - matching original resume proportions */
.td-layout {
    display: flex;
    flex: 1;
    gap: var(--td-split-gap);
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    /* Parent clips content, children scroll independently */
    overflow: hidden;
}

/* === Video Section (40% - Hub V1 Style with internal scroll) === */
.td-video-section {
    flex: 0 0 40%;
    max-width: 40%;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    padding-right: var(--td-split-gap);
    border-right: 1px solid var(--glass-border);
    /* Video section has internal scroll for long content */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for video section - Hub V1 Style */
.td-video-section::-webkit-scrollbar {
    width: 10px;
}

.td-video-section::-webkit-scrollbar-track {
    background: transparent;
}

.td-video-section::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 5px;
}

.td-video-section::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive: Stack on smaller screens */
@media (max-width: 1200px) {
    .td-layout {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .td-video-section {
        width: 100%;
        max-width: 100%;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding-bottom: 20px;
        margin-bottom: 20px;
        overflow: visible;
        flex-shrink: 0;
    }

    .td-content-section {
        overflow: visible;
        flex: none;
    }
}

/* Video Container - Hub V1 Style */
.td-video-container {
    position: relative; /* For back button positioning */
    border-radius: var(--video-border-radius, 16px);
    overflow: hidden;
    background: #000;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.td-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    border-radius: inherit;
}

.td-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    /* Required for td-video-overlay-info absolute positioning */
}

.td-video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Play Button - Hub V1 Style (Centered) */
.td-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-color, #FF9A1F);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(255, 154, 31, 0.5);
    z-index: 10;
}

.td-play-btn:hover {
    background: var(--primary-dark, #F28C0C);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 40px rgba(255, 154, 31, 0.6);
}

.td-play-btn svg {
    margin-left: 3px; /* Optical centering for play icon */
}

/* Video Overlay Info - Hub V1 Style (Title + Channel on thumbnail) */
.td-video-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    color: white;
    padding: 60px 24px 24px;
    z-index: 8;
}

.td-video-overlay-info h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.td-video-overlay-info p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.td-youtube-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* === Video Info - Hub V1 Style === */
.td-video-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
}

.td-channel-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* Channel Avatar - Hub V1 Size (48px) */
.td-channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--glass-border);
    transition: all 0.2s ease;
}

.td-channel-avatar:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
    transform: scale(1.05);
}

.td-channel-info {
    flex: 1;
    min-width: 0;
}

/* Video Title - Hub V1 Size (14px) */
.td-video-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Channel Name - Hub V1 Style */
.td-channel-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Channel Meta Row (channel name + duration) */
.td-channel-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.td-meta-separator {
    color: var(--text-muted);
    font-size: 10px;
}

.td-duration {
    font-size: 13px;
    color: var(--text-muted);
}

/* Tags + Actions Row (single line: tags left, buttons right) */
.td-tags-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.td-tags-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.td-quick-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* Main Tag (colored, from AI classification) */
.td-main-tag {
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* === Action Buttons - Hub V1 Circular Style === */

/* Watch Button - Primary circular 44px */
.td-action-btn.watch-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--gradient-gold, linear-gradient(135deg, #FFB347 0%, #FF9A1F 100%));
    border: none;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255, 154, 31, 0.4);
}

.td-action-btn.watch-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(255, 154, 31, 0.5);
}

.td-action-btn.watch-btn svg {
    width: 18px;
    height: 18px;
    margin-left: 2px; /* Optical centering */
}

/* Export Button - Secondary circular 40px */
.td-action-btn.export-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
    border: 1.5px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.td-action-btn.export-btn:hover {
    background: var(--glass-hover);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.td-action-btn.export-btn svg {
    width: 18px;
    height: 18px;
}

/* === Export Modal === */
.td-export-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.td-export-overlay.open {
    opacity: 1;
    visibility: visible;
}

.td-export-modal {
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.25s ease;
}

.td-export-overlay.open .td-export-modal {
    transform: scale(1) translateY(0);
}

.td-export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.td-export-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.td-export-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.td-export-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.td-export-content {
    padding: 24px;
}

.td-export-format-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.td-export-format-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.td-export-format-toggle {
    display: flex;
    gap: 8px;
}

.td-format-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-format-option:hover {
    border-color: var(--text-muted);
}

.td-format-option.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #000;
}

.td-format-option svg {
    width: 16px;
    height: 16px;
}

.td-export-preview {
    background: var(--bg-primary, #0d0d0d);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 16px;
    max-height: 280px;
    overflow-y: auto;
}

.td-export-preview pre {
    margin: 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.td-export-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
}

.td-export-copy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-gold, linear-gradient(135deg, #FFB347 0%, #FF9A1F 100%));
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-export-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 154, 31, 0.4);
}

.td-export-copy-btn svg {
    width: 16px;
    height: 16px;
}

/* === Content Section (60% - container, no scroll) === */
.td-content-section {
    flex: 0 0 60%;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    /* Breathing room: same gap as video separator on both sides */
    padding-left: var(--td-split-gap);
    padding-right: var(--td-split-gap);
    /* Container doesn't scroll - tab-content does */
    overflow: hidden;
}

@media (max-width: 1200px) {
    .td-content-section {
        padding-left: 0;
        padding-top: 24px;
    }
}

/* === Tabs Row: Tabs + Settings === */
.td-tabs-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

/* === Tabs - iOS Segmented Control Style (matching original) === */
.td-tabs {
    display: flex;
    position: relative;
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 4px;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.td-tab {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    z-index: 1;
    opacity: 0.7;
}

.td-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    opacity: 0.9;
}

.td-tab.active {
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.td-tab svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Tab indicator - Orange gradient like original */
.td-tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #FF9A1F 0%, #F28C0C 100%);
    border-radius: 10px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(255, 154, 31, 0.3);
    z-index: 0;
}

/* Settings Button */
.td-settings-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.td-settings-btn:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #000;
}

.td-settings-btn:hover svg {
    transform: rotate(90deg);
}

.td-settings-btn svg {
    transition: transform 0.4s ease;
}

/* === Reading Panel (Inline) === */
.td-reading-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 20px;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, visibility 0.3s ease;
}

.td-reading-panel.open {
    max-height: 200px;
    opacity: 1;
    padding: 16px 20px;
    visibility: visible;
}

.td-reading-panel-content {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.td-control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.td-control-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 100px;
}

.td-control-label svg {
    color: var(--text-muted);
}

.td-control-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}

.td-control-stepper button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.td-control-stepper button:hover {
    background: var(--glass-hover);
}

.td-control-stepper button:active {
    background: var(--primary-color);
    color: white;
}

.td-control-stepper span {
    min-width: 56px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Space Grotesk', monospace;
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    padding: 6px 0;
}

/* Toggle button for settings (ON/OFF) */
.td-toggle-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
}

.td-toggle-btn:hover {
    background: var(--glass-hover);
}

.td-toggle-btn.active {
    background: linear-gradient(135deg, rgba(255, 154, 31, 0.2), rgba(255, 107, 0, 0.15));
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* === Tab Content (SCROLLABLE area) === */
.td-tab-content {
    flex: 1;
    min-height: 0;
    /* This is the scrollable area */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    background: transparent;
}

/* Custom scrollbar for tab content */
.td-tab-content::-webkit-scrollbar {
    width: 10px;
}

.td-tab-content::-webkit-scrollbar-track {
    background: transparent;
}

.td-tab-content::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 5px;
}

.td-tab-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* === Summary (matching original reading settings) === */
.td-summary-content {
    color: var(--text-primary);
    /* Responsive width with comfortable padding */
    width: 100%;
    max-width: min(900px, 100%);
    padding: 0 24px;
    box-sizing: border-box;
    font-size: var(--td-reading-font-size);
    line-height: var(--td-reading-line-height);
}

/* Large screens: allow wider content with more padding */
@media (min-width: 1400px) {
    .td-summary-content {
        max-width: min(950px, 90%);
        padding: 0 32px;
    }
}

@media (min-width: 1600px) {
    .td-summary-content {
        max-width: min(1000px, 85%);
        padding: 0 40px;
    }
}

.td-summary-content h1,
.td-summary-content h2,
.td-summary-content h3 {
    color: var(--text-primary);
    margin: 24px 0 12px 0;
}

.td-summary-content h1 { font-size: 1.5em; }
.td-summary-content h2 { font-size: 1.25em; }
.td-summary-content h3 { font-size: 1.1em; }

.td-summary-content p {
    margin: 0 0 16px 0;
}

.td-summary-content ul,
.td-summary-content ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.td-summary-content li {
    margin-bottom: 8px;
}

.td-summary-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* === Timeline, Todo ===
   NOTE: Styles merged from tabs-content.css (see end of file)
*/

/* === Transcript === */
.td-transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.td-transcript-stat {
    font-size: 13px;
    color: var(--text-secondary);
}

.td-transcript-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.td-transcript-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    width: 160px;
}

.td-transcript-search input::placeholder {
    color: var(--text-muted);
}

.td-transcript-content {
    color: var(--text-primary);
    max-width: var(--td-reading-max-width);
    font-size: var(--td-reading-font-size);
    line-height: var(--td-reading-line-height);
}

.td-transcript-content p {
    margin: 0 0 12px 0;
}

/* Highlight styling for ==text== - brighter and more visible */
.td-highlight {
    background: linear-gradient(135deg, rgba(255, 200, 100, 0.4) 0%, rgba(255, 170, 70, 0.35) 100%);
    border-radius: 3px;
    padding: 2px 6px;
    font-weight: 500;
    border-left: 2px solid rgba(255, 200, 100, 0.9);
    color: inherit;
}

/* Hide highlights when toggle is off - keep text visible */
.td-summary-content.hide-highlights .td-highlight {
    background: transparent;
    border-left: none;
    padding: 0;
    font-weight: inherit;
    /* Text remains visible, just no styling */
}

/* Section divider for --- */
.td-section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border, rgba(255,255,255,0.1)) 20%, var(--glass-border, rgba(255,255,255,0.1)) 80%, transparent);
    margin: 24px 0;
}

/* Summary heading styles with orange gradient */
.td-summary-content h2 {
    background: linear-gradient(135deg, #FF9A1F 0%, #FF6B00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 24px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 154, 31, 0.2);
}

.td-summary-content h2:first-of-type {
    margin-top: 16px;
}

.td-summary-content h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 20px 0 8px 0;
}

/* Summary strong/bold styling */
.td-summary-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Summary list styling */
.td-summary-content ul {
    margin: 8px 0 16px 0;
    padding-left: 20px;
}

.td-summary-content li {
    margin: 6px 0;
    line-height: 1.6;
}

.td-summary-content li::marker {
    color: var(--accent-gold, #FF9A1F);
}

/* ===================================================================
   STRUCTURE-SPECIFIC STYLES
   Different visual layouts based on detected format structure
   =================================================================== */

/* --- BULLETS STRUCTURE ---
   Clean, scannable list format with clear hierarchy */
.td-summary-content.structure-bullets h2 {
    margin-top: 28px;
    margin-bottom: 16px;
}

.td-summary-content.structure-bullets ul {
    margin: 12px 0 20px 0;
}

.td-summary-content.structure-bullets li {
    margin: 10px 0;
    padding-left: 4px;
}

.td-summary-content.structure-bullets li li {
    /* Sub-bullets: smaller, muted */
    font-size: 0.95em;
    color: var(--text-secondary);
    margin: 6px 0;
}

/* --- PARAGRAPHS STRUCTURE ---
   Narrative flow with clear sections */
.td-summary-content.structure-paragraphs h2 {
    margin-top: 32px;
    margin-bottom: 12px;
}

.td-summary-content.structure-paragraphs p {
    margin-bottom: 20px;
    text-align: justify;
    text-justify: inter-word;
}

.td-summary-content.structure-paragraphs p:first-of-type {
    /* Hook paragraph - slightly larger */
    font-size: 1.05em;
    line-height: 1.7;
}

/* --- SECTIONS STRUCTURE (Focus Reader) ---
   Newsletter-style with clear visual separation */
.td-summary-content.structure-sections {
    /* Slightly more compact for newsletter feel */
}

.td-summary-content.structure-sections h2 {
    margin-top: 8px;
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.td-summary-content.structure-sections hr {
    /* Enhanced dividers for section separation */
    margin: 28px 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 154, 31, 0.3) 15%,
        rgba(255, 154, 31, 0.4) 50%,
        rgba(255, 154, 31, 0.3) 85%,
        transparent);
    border: none;
}

.td-summary-content.structure-sections p {
    margin-bottom: 16px;
}

.td-summary-content.structure-sections ul {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 16px 16px 16px 36px;
    margin: 12px 0 20px 0;
}

.td-summary-content.structure-sections li {
    margin: 8px 0;
}

/* Bottom Line section - make it stand out */
.td-summary-content.structure-sections h2:last-of-type {
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.td-summary-content.structure-sections h2:last-of-type + p {
    font-style: italic;
    font-size: 1.1em;
    color: var(--text-primary);
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 154, 31, 0.1) 0%, rgba(255, 107, 0, 0.05) 100%);
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 8px 8px 0;
}

/* ===================================================================
   CONTENT TYPE STYLES - Semantic markers for different video types
   - Tutorial (Blue): Steps, code, warnings, tips
   - Educational (Violet): Definitions, concepts, examples
   - Entertainment (Pink): Quotes, moments, hot takes
   =================================================================== */

/* --- Color Variables per Content Type --- */
.contenttype-tutorial {
    --ct-primary: #3B82F6;
    --ct-secondary: rgba(59, 130, 246, 0.15);
    --ct-border: rgba(59, 130, 246, 0.3);
}

.contenttype-educational {
    --ct-primary: #8B5CF6;
    --ct-secondary: rgba(139, 92, 246, 0.15);
    --ct-border: rgba(139, 92, 246, 0.3);
}

.contenttype-entertainment {
    --ct-primary: #EC4899;
    --ct-secondary: rgba(236, 72, 153, 0.15);
    --ct-border: rgba(236, 72, 153, 0.3);
}

/* --- TUTORIAL MARKERS --- */

/* Step: Numbered action items */
.ct-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 16px 0;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.03));
    border-radius: 10px;
    border-left: 3px solid #3B82F6;
}

.ct-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: #3B82F6;
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ct-step-content {
    flex: 1;
    line-height: 1.6;
}

/* ============================================
   TUTORIAL MARKERS - Premium Design System
   ============================================ */

/* Demo: Video timestamp link - sleek card design */
.ct-demo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.ct-demo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ct-demo:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(59, 130, 246, 0.25);
}

.ct-demo:hover::before {
    opacity: 1;
}

.ct-demo-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.4);
}

.ct-demo-time {
    position: relative;
    z-index: 1;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-weight: 600;
    color: #60A5FA;
    background: rgba(59, 130, 246, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    letter-spacing: 0.02em;
}

.ct-demo-text {
    position: relative;
    z-index: 1;
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

/* Code block - VS Code inspired dark theme */
.ct-code {
    margin: 20px 0;
    background: #0D1117;
    border-radius: 12px;
    border: 1px solid rgba(48, 54, 61, 0.8);
    overflow: hidden;
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.3);
}

.ct-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(22, 27, 34, 0.8);
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
}

.ct-code-lang {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8B949E;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ct-code-lang::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #3FB950;
    border-radius: 50%;
}

.ct-code-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(48, 54, 61, 0.8);
    border-radius: 6px;
    color: #8B949E;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ct-code-copy:hover {
    background: rgba(48, 54, 61, 0.5);
    border-color: rgba(139, 148, 158, 0.5);
    color: #C9D1D9;
}

.ct-code-copy.copied {
    background: rgba(63, 185, 80, 0.15);
    border-color: rgba(63, 185, 80, 0.4);
    color: #3FB950;
}

.ct-code pre {
    margin: 0;
    padding: 16px 20px;
    overflow-x: auto;
}

.ct-code code {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    font-size: 0.9em;
    line-height: 1.7;
    color: #C9D1D9;
    white-space: pre;
}

/* Prerequisites box - clean info card */
.ct-prereqs {
    margin: 24px 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(99, 102, 241, 0.03) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    overflow: hidden;
}

.ct-prereqs-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(59, 130, 246, 0.08);
    font-weight: 600;
    font-size: 0.95em;
    color: #60A5FA;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.ct-prereqs-icon {
    font-size: 1.1em;
}

.ct-prereqs-content {
    padding: 16px 18px;
    line-height: inherit;
    font-size: inherit;
}

.ct-prereqs-content ul,
.ct-prereqs-content ol {
    margin: 0;
    padding-left: 20px;
}

.ct-prereqs-content li {
    margin-bottom: 8px;
}

/* Warning callout - attention-grabbing but not harsh */
.ct-warning {
    margin: 20px 0;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(234, 88, 12, 0.04) 100%);
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-left: 4px solid #F59E0B;
}

.ct-warning-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #FBBF24;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.ct-warning-content {
    line-height: inherit;
    font-size: inherit;
    color: var(--text-primary);
    padding-left: 2px;
}

.ct-warning > .ct-warning-icon {
    display: inline;
    margin-right: 8px;
}

.ct-warning-icon {
    font-size: 1.1em;
}

/* Tip callout - friendly and helpful */
.ct-tip {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 20px 0;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-left: 4px solid #22C55E;
}

.ct-tip-icon {
    flex-shrink: 0;
    font-size: 1.2em;
    margin-top: 2px;
}

.ct-tip-content {
    flex: 1;
    line-height: inherit;
    font-size: inherit;
}

/* Step marker for tutorials */
.ct-step {
    margin: 24px 0;
    padding: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    position: relative;
}

.ct-step-number {
    position: absolute;
    top: -12px;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #F59E0B 100%);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    box-shadow: 0 4px 12px -2px rgba(255, 154, 31, 0.4);
}

.ct-step-content {
    line-height: inherit;
    font-size: inherit;
}

/* Prerequisite */
.ct-prereq {
    margin: 12px 0;
    padding: 10px 14px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
    font-size: 0.95em;
    color: var(--text-secondary);
}

.ct-prereq-label {
    font-weight: 600;
    color: #3B82F6;
    margin-right: 6px;
}

/* --- EDUCATIONAL MARKERS --- */

/* Definition */
.ct-definition {
    margin: 18px 0;
    padding: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.03));
    border-radius: 12px;
    border-left: 4px solid #8B5CF6;
}

.ct-def-term {
    font-weight: 700;
    font-size: 1.05em;
    color: #A78BFA;
    margin-bottom: 6px;
}

.ct-def-text {
    line-height: 1.65;
    color: var(--text-primary);
}

/* Key Concept */
.ct-concept {
    margin: 16px 0;
    padding: 14px 16px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.ct-concept-label {
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8B5CF6;
    margin-bottom: 8px;
}

.ct-concept-text {
    line-height: 1.6;
}

/* Example */
.ct-example {
    margin: 12px 0;
    padding: 12px 16px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    font-style: italic;
    border-left: 3px solid rgba(139, 92, 246, 0.4);
}

.ct-example-label {
    font-weight: 600;
    font-style: normal;
    color: #A78BFA;
    margin-right: 6px;
}

/* Note */
.ct-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
    padding: 12px 16px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 8px;
}

.ct-note-icon {
    flex-shrink: 0;
    font-size: 16px;
}

/* --- ENTERTAINMENT MARKERS --- */

/* Quote */
.ct-quote {
    margin: 20px 0;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(236, 72, 153, 0.03));
    border-radius: 12px;
    border-left: 4px solid #EC4899;
    position: relative;
}

.ct-quote::before {
    content: '"';
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 3em;
    color: rgba(236, 72, 153, 0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

.ct-quote-text {
    font-size: 1.1em;
    font-style: italic;
    line-height: 1.6;
    padding-left: 30px;
    color: var(--text-primary);
}

.ct-quote-author {
    margin-top: 10px;
    padding-left: 30px;
    font-size: 0.9em;
    color: #F472B6;
    font-weight: 500;
}

/* Key Moment */
.ct-moment {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    padding: 12px 16px;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.1), transparent);
    border-radius: 8px;
}

.ct-moment-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.ct-moment-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* Hot Take */
.ct-hottake {
    margin: 16px 0;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(236, 72, 153, 0.08));
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.ct-hottake-label {
    display: block;
    font-weight: 700;
    font-size: 0.9em;
    color: #F87171;
    margin-bottom: 6px;
}

.ct-hottake-text {
    display: block;
    line-height: 1.6;
    font-style: italic;
}

/* Highlight */
.ct-highlight {
    margin: 14px 0;
    padding: 14px 18px;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.05));
    border-radius: 8px;
    border-left: 3px solid #EC4899;
    font-weight: 500;
}

/* === Loading === */
.td-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-secondary);
}

.td-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* === Settings Modal === */
.td-settings-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 8px 0;
}

.td-setting-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.td-setting-group label {
    font-size: 14px;
    color: var(--text-primary);
}

.td-setting-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.td-setting-controls button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.td-setting-controls button:hover {
    background: var(--glass-hover);
}

.td-setting-controls span {
    min-width: 60px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', monospace;
}

/* ===================================================================
   TIMELINE V5 - Citrus Bold Palette (Exact Hub V1 Match)
   Design: Waveform + Accordion Chapters
   =================================================================== */

/* Timeline Design System Variables */
.td-timeline-view {
    --tl-color-primary: #FF9A1F;
    --tl-color-primary-soft: rgba(255, 154, 31, 0.15);
    --tl-color-accent: #3CD2A5;
    --tl-color-accent-soft: rgba(60, 210, 165, 0.15);
    --tl-color-insight: #FF9A1F;
    --tl-color-action: #3CD2A5;
    --tl-color-problem: #E53935;
    --tl-color-solution: #4C8DFF;
    --tl-color-example: #A855F7;
    --tl-color-intro: #6B7280;
    --tl-color-conclusion: #14b8a6;
    --tl-surface: var(--bg-secondary, #141414);
    --tl-surface-elevated: var(--bg-tertiary, #1A1A1A);
    --tl-border: rgba(255, 255, 255, 0.08);
    --tl-text-primary: var(--text-primary, #FFFFFF);
    --tl-text-secondary: var(--text-secondary, rgba(255, 255, 255, 0.7));
    --tl-text-muted: rgba(255, 255, 255, 0.4);
}

/* Waveform Container */
.td-waveform-container {
    background: var(--tl-surface);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 8px;
    border: 1px solid var(--tl-border);
}

.td-waveform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.td-waveform-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.td-waveform-time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tl-color-primary);
}

.td-waveform-time span {
    color: var(--tl-text-muted);
    font-weight: 400;
}

.td-waveform-chapter {
    font-size: 0.85rem;
    color: var(--tl-text-secondary);
}

.td-waveform-chapter strong {
    color: var(--tl-text-primary);
}

/* Waveform Visualization */
.td-waveform-visual {
    height: 64px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 8px 0;
    cursor: pointer;
    position: relative;
}

.td-wave-bar {
    flex: 1;
    min-width: 4px;
    border-radius: 2px 2px 0 0;
    transition: all 0.15s ease;
    position: relative;
}

.td-wave-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    border-radius: inherit;
    background: transparent;
}

.td-wave-bar.empty::after,
.td-wave-bar.intro::after,
.td-wave-bar.conclusion::after {
    background: rgba(255, 255, 255, 0.18);
}

.td-wave-bar.insight::after { background: var(--tl-color-insight); opacity: 0.85; }
.td-wave-bar.action::after { background: var(--tl-color-action); opacity: 0.85; }
.td-wave-bar.problem::after { background: var(--tl-color-problem); opacity: 0.85; }
.td-wave-bar.solution::after { background: var(--tl-color-solution); opacity: 0.85; }
.td-wave-bar.example::after { background: var(--tl-color-example); opacity: 0.8; }

.td-wave-bar:hover::after {
    opacity: 1 !important;
    filter: brightness(1.15);
}

.td-wave-bar.active::after {
    opacity: 1 !important;
    filter: brightness(1.2);
}

.td-wave-bar.played::after {
    opacity: 0.95;
}

/* Progress Indicator */
.td-waveform-progress {
    position: absolute;
    left: 0%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--tl-color-primary);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(255, 154, 31, 0.5);
    z-index: 10;
    transition: left 0.15s linear;
    pointer-events: none;
}

.td-waveform-progress::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--tl-color-primary);
    border-radius: 50%;
    border: 2px solid var(--tl-surface);
}

/* Time Markers */
.td-waveform-times {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.65rem;
    color: var(--tl-text-muted);
    font-variant-numeric: tabular-nums;
}

/* Filter Controls */
.td-timeline-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.td-timeline-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.td-filter-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: var(--tl-surface-elevated);
    color: var(--tl-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
}

.td-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--tl-text-primary);
}

.td-filter-btn.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--tl-text-primary);
    font-weight: 600;
}

.td-filter-btn[data-filter="insight"].active {
    background: rgba(255, 154, 31, 0.15);
    color: var(--tl-color-insight);
}
.td-filter-btn[data-filter="problem"].active {
    background: rgba(229, 57, 53, 0.15);
    color: var(--tl-color-problem);
}
.td-filter-btn[data-filter="action"].active {
    background: rgba(60, 210, 165, 0.15);
    color: var(--tl-color-action);
}
.td-filter-btn[data-filter="solution"].active {
    background: rgba(76, 141, 255, 0.15);
    color: var(--tl-color-solution);
}
.td-filter-btn[data-filter="example"].active {
    background: rgba(168, 85, 247, 0.15);
    color: var(--tl-color-example);
}

.td-filter-count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.65rem;
}

/* Accordion Chapters */
.td-chapters-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.td-accordion-item {
    background: var(--tl-surface);
    border: 1px solid var(--tl-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    animation: td-fadeInUp 0.4s ease forwards;
}

.td-accordion-item:hover {
    border-color: rgba(255, 154, 31, 0.2);
}

.td-accordion-item.active {
    border-color: var(--tl-color-primary);
    box-shadow: 0 0 0 1px rgba(255, 154, 31, 0.1);
}

.td-accordion-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.td-accordion-item:hover .td-accordion-header {
    background: var(--tl-surface-elevated);
}

.td-accordion-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tl-surface-elevated);
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tl-text-muted);
    flex-shrink: 0;
}

.td-accordion-item.active .td-accordion-number {
    background: var(--tl-color-primary);
    color: #000;
}

.td-accordion-item.completed .td-accordion-number {
    background: var(--tl-color-accent-soft);
    color: var(--tl-color-accent);
}

.td-accordion-main {
    flex: 1;
    min-width: 0;
}

.td-accordion-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tl-text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.td-accordion-item.active .td-accordion-title {
    color: var(--tl-color-primary);
}

.td-accordion-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--tl-text-muted);
}

.td-accordion-time {
    font-variant-numeric: tabular-nums;
}

.td-accordion-type {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.td-accordion-type.insight { background: var(--tl-color-primary-soft); color: var(--tl-color-insight); }
.td-accordion-type.action { background: var(--tl-color-accent-soft); color: var(--tl-color-action); }
.td-accordion-type.problem { background: rgba(229, 57, 53, 0.15); color: var(--tl-color-problem); }
.td-accordion-type.solution { background: rgba(76, 141, 255, 0.15); color: var(--tl-color-solution); }
.td-accordion-type.example { background: rgba(168, 85, 247, 0.15); color: var(--tl-color-example); }
.td-accordion-type.intro { background: rgba(107, 114, 128, 0.15); color: var(--tl-color-intro); }
.td-accordion-type.conclusion { background: rgba(20, 184, 166, 0.15); color: var(--tl-color-conclusion); }

.td-accordion-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tl-text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.td-accordion-item.open .td-accordion-toggle {
    transform: rotate(180deg);
}

/* Expanded Content */
.td-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.td-accordion-item.open .td-accordion-content {
    /* Increased from 300px to accommodate longer content */
    max-height: 500px;
}

.td-accordion-body {
    padding: 0 20px 20px;
    padding-left: 68px;
}

.td-accordion-text {
    font-size: 0.85rem;
    color: var(--tl-text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.td-accordion-actions {
    display: flex;
    gap: 8px;
}

.td-accordion-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--tl-surface-elevated);
    border: 1px solid var(--tl-border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--tl-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.td-accordion-btn:hover {
    background: var(--tl-color-primary-soft);
    border-color: var(--tl-color-primary);
    color: var(--tl-color-primary);
}

.td-accordion-btn.primary {
    background: var(--tl-color-primary);
    border-color: var(--tl-color-primary);
    color: #000;
}

.td-accordion-btn.primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(255, 154, 31, 0.4);
}

/* Playing Wave Animation */
.td-playing-wave {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    margin-left: 8px;
}

.td-playing-wave span {
    width: 3px;
    background: var(--tl-color-primary);
    border-radius: 1px;
    animation: td-wave 0.5s ease-in-out infinite alternate;
}

.td-playing-wave span:nth-child(1) { height: 6px; animation-delay: 0s; }
.td-playing-wave span:nth-child(2) { height: 10px; animation-delay: 0.15s; }
.td-playing-wave span:nth-child(3) { height: 8px; animation-delay: 0.3s; }
.td-playing-wave span:nth-child(4) { height: 12px; animation-delay: 0.1s; }

@keyframes td-wave {
    to { height: 14px; }
}

@keyframes td-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation delays for accordion items */
.td-accordion-item:nth-child(1) { animation-delay: 0s; }
.td-accordion-item:nth-child(2) { animation-delay: 0.05s; }
.td-accordion-item:nth-child(3) { animation-delay: 0.1s; }
.td-accordion-item:nth-child(4) { animation-delay: 0.15s; }
.td-accordion-item:nth-child(5) { animation-delay: 0.2s; }
.td-accordion-item:nth-child(6) { animation-delay: 0.25s; }
.td-accordion-item:nth-child(7) { animation-delay: 0.3s; }
.td-accordion-item:nth-child(8) { animation-delay: 0.35s; }

/* Timeline Stats */
.td-timeline-stats {
    display: flex;
    gap: 12px;
}

.td-stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--tl-text-secondary);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.td-stat-pill .count {
    font-weight: 700;
    color: var(--tl-text-primary);
}

/* Filter hidden items */
.td-accordion-item.hidden {
    display: none;
}

/* ===================================================================
   TODO - Progress Bar & Export (Hub V1 Feature)
   =================================================================== */

.td-todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.td-todo-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.td-todo-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    max-width: 200px;
}

.td-todo-progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.td-todo-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-gold);
    min-width: 50px;
}

.td-todo-actions {
    display: flex;
    gap: 8px;
}

.td-todo-export-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-todo-export-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.td-todo-export-btn.notion {
    background: rgba(255, 255, 255, 0.05);
}

.td-todo-export-btn.notion:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Todo Items */
.td-todo-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.td-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.td-todo-item:hover {
    background: var(--glass-hover);
}

.td-todo-item.completed {
    opacity: 0.6;
}

.td-todo-item.completed .td-todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.td-todo-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.td-todo-checkbox:hover {
    border-color: var(--accent-gold);
}

.td-todo-checkbox.checked {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.td-todo-checkbox.checked svg {
    color: #000;
}

.td-todo-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.td-todo-priority {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.td-todo-priority.high { background: rgba(239, 68, 68, 0.2); color: #F87171; }
.td-todo-priority.medium { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }
.td-todo-priority.low { background: rgba(16, 185, 129, 0.2); color: #34D399; }

/* ===================================================================
   TRANSCRIPT - Smart Highlighting (Hub V1 Feature)
   =================================================================== */

.td-transcript-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

/* ===================================================================
   KEYBOARD SHORTCUTS MODAL (Hub V1 Feature)
   =================================================================== */

.td-keyboard-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.td-keyboard-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.td-keyboard-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.td-keyboard-modal-overlay.open .td-keyboard-modal {
    transform: scale(1);
}

.td-keyboard-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.td-keyboard-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.td-keyboard-modal-title svg {
    color: var(--accent-gold);
}

.td-keyboard-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.td-keyboard-modal-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.td-keyboard-modal-body {
    padding: 24px;
}

.td-keyboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.td-keyboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--glass-bg);
    border-radius: 10px;
}

.td-keyboard-action {
    font-size: 14px;
    color: var(--text-primary);
}

.td-keyboard-key {
    display: flex;
    gap: 6px;
}

.td-keyboard-key kbd {
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    font-family: 'Space Grotesk', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-gold);
    box-shadow: 0 2px 0 var(--glass-border);
}


/* Keyboard Hint in Actions */
.td-keyboard-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: transparent;
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-keyboard-hint:hover {
    background: var(--glass-bg);
    border-style: solid;
    color: var(--text-secondary);
}

.td-keyboard-hint kbd {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-family: monospace;
    font-size: 10px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .td-layout {
        flex-direction: column;
        gap: 20px;
    }

    .td-video-section {
        max-width: 100%;
        padding-right: 0;
        border-right: none;
        overflow: visible;
    }

    .td-content-section {
        padding-left: 0;
    }

    .td-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .td-tab {
        padding: 10px 8px;
        font-size: 13px;
        flex: none;
        min-width: fit-content;
    }

    .td-tab svg {
        display: none;
    }

    .td-actions {
        flex-wrap: wrap;
    }

    .td-action-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .td-action-btn span {
        display: none;
    }

    .td-summary-content,
    .td-transcript-content {
        max-width: 100%;
    }
}

/* ===================================================================
   TODO V3 - Focus Mode, All Tasks, Completed (Hub V1 Style)
   =================================================================== */

.td-todo-container.td-todo-v3 {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Top Navigation Tabs */
.td-todo-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.td-todo-nav-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: 10px;
}

.td-todo-nav-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-todo-nav-tab:hover {
    color: var(--text-primary);
}

.td-todo-nav-tab.active {
    background: var(--accent-gold);
    color: #000;
    font-weight: 600;
}

.td-todo-task-counter {
    font-size: 13px;
    color: var(--text-muted);
}

.td-todo-task-counter strong {
    color: var(--accent-gold);
}

/* Progress Bar */
.td-todo-v3 .td-todo-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.td-todo-v3 .td-todo-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.td-todo-v3 .td-todo-progress-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.td-todo-v3 .td-todo-progress-value {
    font-size: 13px;
    color: var(--text-muted);
}

.td-todo-v3 .td-todo-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    max-width: none;
}

.td-todo-v3 .td-todo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), #FFD700);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Focus Mode - Main Card */
.td-todo-focus-card {
    background: var(--glass-bg);
    border: 2px solid var(--border-gold);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.td-todo-focus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
}

.td-todo-focus-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.td-todo-focus-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.td-todo-focus-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.td-todo-focus-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.td-todo-focus-meta-item {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.td-todo-focus-meta-item.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-todo-focus-meta-item.clickable:hover {
    background: var(--glass-hover);
    color: var(--accent-gold);
}

.td-todo-focus-meta-item.priority-high {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

.td-todo-focus-meta-item.priority-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.td-todo-focus-meta-item.priority-low {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.td-todo-focus-context {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.td-todo-context-header {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.td-todo-context-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

.td-todo-focus-actions {
    display: flex;
    gap: 12px;
}

.td-todo-focus-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-todo-focus-btn.complete {
    background: var(--accent-gold);
    color: #000;
}

.td-todo-focus-btn.complete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.td-todo-focus-btn.skip {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.td-todo-focus-btn.skip:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* Up Next Queue */
.td-todo-queue-section {
    margin-top: 8px;
}

.td-todo-queue-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.td-todo-queue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.td-todo-queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-todo-queue-item:hover {
    background: var(--glass-hover);
    border-color: var(--border-gold);
}

.td-todo-queue-number {
    width: 24px;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.td-todo-queue-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-todo-queue-duration {
    font-size: 12px;
    color: var(--text-muted);
}

/* All Done Celebration */
.td-todo-all-done {
    text-align: center;
    padding: 48px 24px;
}

.td-celebration-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.td-todo-all-done h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.td-todo-all-done p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.td-todo-done-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.td-todo-stat {
    text-align: center;
}

.td-todo-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-gold);
}

.td-todo-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Streak Banner */
.td-todo-streak-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 154, 31, 0.15), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(255, 154, 31, 0.3);
    border-radius: 10px;
    margin-bottom: 8px;
}

.td-todo-streak-icon {
    font-size: 24px;
}

.td-todo-streak-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-gold);
}

.td-todo-streak-label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

/* Encouragement */
.td-todo-encouragement {
    text-align: center;
    font-size: 16px;
    padding: 12px;
    background: var(--glass-bg);
    border-radius: 10px;
    margin-bottom: 8px;
}

/* Section Labels */
.td-todo-section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 16px;
    margin-bottom: 12px;
}

.td-todo-section-label:first-child {
    margin-top: 0;
}

/* Todo List */
.td-todo-v3 .td-todo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.td-todo-v3 .td-todo-list.completed-list .td-todo-item {
    opacity: 0.7;
}

.td-todo-v3 .td-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.td-todo-v3 .td-todo-item:hover {
    background: var(--glass-hover);
}

.td-todo-v3 .td-todo-item.completed .td-todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.td-todo-v3 .td-todo-checkbox {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.td-todo-v3 .td-todo-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.td-todo-v3 .td-todo-checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.td-todo-v3 .td-todo-checkbox:hover .td-todo-checkmark {
    border-color: var(--accent-gold);
}

.td-todo-v3 .td-todo-checkbox input:checked + .td-todo-checkmark {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.td-todo-v3 .td-todo-checkmark svg {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    color: #000;
}

.td-todo-v3 .td-todo-checkbox input:checked + .td-todo-checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.td-todo-v3 .td-todo-item-content {
    flex: 1;
    min-width: 0;
}

.td-todo-v3 .td-todo-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.td-todo-v3 .td-todo-item-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.td-todo-v3 .td-todo-duration {
    font-size: 12px;
    color: var(--text-muted);
}

.td-todo-v3 .td-todo-timestamp {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: var(--accent-gold);
    cursor: pointer;
    transition: opacity 0.2s;
}

.td-todo-v3 .td-todo-timestamp:hover {
    opacity: 0.8;
}

/* Empty State */
.td-todo-empty {
    text-align: center;
    padding: 48px 24px;
}

.td-todo-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.td-todo-empty h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.td-todo-empty p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Export Section */
.td-todo-v3 .td-todo-export {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

/* ===================================================================
   TRANSCRIPT LOADING STATE
   =================================================================== */

.td-transcript-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.td-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}
/* @keyframes spin is defined in variables.css */

/* ===================================================================
   TRANSCRIPT - Smart Highlighting (Fixed Classes)
   =================================================================== */

/* Highlight base class */
.td-hl {
    transition: opacity 0.2s ease;
}

/* Number highlights */
.td-hl-number {
    color: #60A5FA;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    padding: 1px 4px;
    border-radius: 3px;
}

/* Concept highlights */
.td-hl-concept {
    color: #A78BFA;
    font-weight: 500;
    border-bottom: 1px dashed #A78BFA;
}

/* Important highlights */
.td-hl-important {
    background: rgba(245, 158, 11, 0.2);
    padding: 1px 4px;
    border-radius: 3px;
}

/* Search highlight */
.td-search-highlight {
    background: var(--accent-gold);
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
}

/* Filter modes - dim non-matching highlights */
.td-transcript-content.filter-concept .td-hl:not(.td-hl-concept),
.td-transcript-content.filter-number .td-hl:not(.td-hl-number),
.td-transcript-content.filter-important .td-hl:not(.td-hl-important) {
    opacity: 0.4;
    background: none;
    border: none;
    color: inherit;
    font-weight: inherit;
}

/* Transcript segment with timestamp */
.td-transcript-segment {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.td-transcript-segment:hover {
    border-color: var(--glass-border);
}

.td-segment-timestamp {
    font-family: 'Space Grotesk', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-gold);
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.td-segment-timestamp:hover {
    background: var(--gold-dim);
}

/* Highlight filter buttons */
.td-highlight-filter {
    padding: 6px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-highlight-filter:hover {
    background: var(--glass-hover);
}

.td-highlight-filter.active {
    background: var(--gold-dim);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Transcript header layout fix */
.td-transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

/* ===================================================================
   TODO V3 - Missing Animations
   =================================================================== */

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes checkPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

/* Apply animations */
.td-todo-focus-card {
    animation: fadeSlideUp 0.3s ease-out;
}

.td-todo-v3 .td-todo-checkbox input:checked + .td-todo-checkmark {
    animation: checkPop 0.3s ease-out;
}

.td-todo-all-done {
    animation: fadeSlideUp 0.4s ease-out;
}

.td-todo-all-done .td-celebration-icon {
    animation: celebrate 1s ease-in-out infinite;
}

.td-todo-streak-banner {
    animation: slideIn 0.3s ease-out;
}

.td-todo-v3 .td-todo-progress-fill {
    animation: progressGlow 2s ease-in-out infinite;
}

.td-todo-encouragement {
    animation: slideIn 0.25s ease-out;
}

.td-todo-queue-item {
    animation: slideIn 0.2s ease-out;
    animation-fill-mode: both;
}

.td-todo-queue-item:nth-child(1) { animation-delay: 0.05s; }
.td-todo-queue-item:nth-child(2) { animation-delay: 0.1s; }
.td-todo-queue-item:nth-child(3) { animation-delay: 0.15s; }

/* Completed task animation */
.td-todo-v3 .td-todo-item.completing {
    animation: fadeSlideUp 0.3s ease-out reverse forwards;
}

/* ===================================================================
   SUMMARY - TOC and Enhanced Layout (Hub V1 Style)
   =================================================================== */

.td-summary-wrapper {
    display: flex;
    gap: 32px;
    /* Allow wrapper to grow with content, not fixed height */
    min-height: 100%;
    align-items: flex-start; /* Align items to top for sticky to work */
}

/* Table of Contents Sidebar - STATIC (sticky within scroll container) */
.td-summary-toc {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    /* Sticky positioning - stays fixed while scrolling */
    position: sticky;
    top: 8px; /* Small offset from top */
    /* Self-contained height with internal scroll if needed */
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    /* Subtle background for visual separation */
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--glass-border);
}

.td-toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

/* Toggle button for collapsing TOC */
.td-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.td-toc-toggle:hover {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

.td-toc-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.td-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.td-toc-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.td-toc-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.td-toc-link.active {
    background: var(--gold-dim);
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
}

.td-toc-link.level-3 {
    padding-left: 32px;
    font-size: 12px;
}

/* Chapter numbers */
.td-toc-number {
    font-weight: 700;
    color: var(--text-muted);
    min-width: 18px;
    flex-shrink: 0;
}

.td-toc-link.active .td-toc-number {
    color: var(--accent-gold);
}

.td-toc-text {
    flex: 1;
}

/* Collapsed state with smooth animation */
.td-summary-toc {
    transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease;
}

.td-summary-toc.collapsed {
    width: 48px;
    min-width: 48px;
    padding: 12px;
    overflow: hidden; /* Hide scrollbar when collapsed */
}

.td-summary-toc .td-toc-title,
.td-summary-toc .td-toc-nav {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.td-summary-toc.collapsed .td-toc-title,
.td-summary-toc.collapsed .td-toc-nav {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.td-summary-toc.collapsed .td-toc-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    justify-content: center;
}

/* Heading highlight animation when clicking TOC */
@keyframes heading-highlight {
    0% {
        box-shadow: inset 0 -3px 0 0 rgba(255, 200, 100, 0.6), 0 0 0 4px rgba(255, 200, 100, 0.15);
    }
    100% {
        box-shadow: inset 0 -3px 0 0 transparent, 0 0 0 0 transparent;
    }
}

.td-heading-highlight {
    animation: heading-highlight 2s ease-out forwards;
    border-radius: 4px;
    /* Use underline effect instead of background overlay */
}

/* Summary Main Content */
.td-summary-main {
    flex: 1;
    min-width: 0;
    transition: max-width 0.3s ease;
}

.td-summary-main.with-toc {
    max-width: calc(100% - 252px);
}

/* When TOC is collapsed, summary takes more space */
.td-summary-toc.collapsed + .td-summary-main.with-toc {
    max-width: calc(100% - 80px);
}

/* Summary Metadata */
.td-summary-meta {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.td-meta-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.td-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.td-meta-badge svg {
    color: var(--text-muted);
}

.td-meta-badge.format {
    background: var(--gold-dim);
    border-color: var(--border-gold);
    color: var(--accent-gold);
}

.td-meta-badge.format svg {
    color: var(--accent-gold);
}

/* Export PDF button */
.td-export-pdf {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60A5FA;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-export-pdf:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(99, 102, 241, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.td-export-pdf svg {
    color: #60A5FA;
}

/* Responsive TOC */
@media (max-width: 1024px) {
    .td-summary-wrapper {
        flex-direction: column;
    }

    .td-summary-toc {
        width: 100%;
        min-width: unset;
        position: relative;
        max-height: unset;
        padding: 16px;
        background: var(--glass-bg);
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .td-toc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .td-toc-link {
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .td-toc-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent-gold);
    }

    .td-toc-link.level-3 {
        padding-left: 12px;
    }

    .td-summary-main.with-toc {
        max-width: 100%;
    }
}

/* ===================================================================
   GENERATE BUTTONS & LOADING STATES
   =================================================================== */

/* Empty state with generate button */
.td-empty-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    min-height: 300px;
}

.td-empty-tab svg {
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.td-empty-tab h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.td-empty-tab p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    max-width: 300px;
}

/* Generate Button */
.td-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--gradient-gold);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(255, 154, 31, 0.3);
}

.td-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 154, 31, 0.4);
}

.td-generate-btn:active {
    transform: translateY(0);
}

.td-generate-btn svg {
    color: #000;
    opacity: 1;
    animation: rotate 2s linear infinite;
    animation-play-state: paused;
}

.td-generate-btn:hover svg {
    animation-play-state: running;
}

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

/* Feature Generating State */
.td-feature-generating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    min-height: 300px;
}

.td-generating-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

.td-feature-generating h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.td-feature-generating p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Toast Notifications */
.td-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.td-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.td-toast-success {
    border-color: #34D399;
}

.td-toast-success svg {
    color: #34D399;
}

.td-toast-error {
    border-color: #F87171;
}

.td-toast-error svg {
    color: #F87171;
}

.td-toast-info svg {
    color: var(--accent-gold);
}

/* ===================================================================
   TRANSCRIPT TAB - AI Copy Interface
   =================================================================== */

.td-transcript-ai-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.td-transcript-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border: 1px solid var(--border-gold);
    border-radius: 12px;
}

.td-transcript-ai-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.td-transcript-ai-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.td-transcript-ai-icon svg {
    color: #000;
}

.td-transcript-ai-text h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.td-transcript-ai-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
}

.td-transcript-ai-stats {
    display: flex;
    gap: 12px;
}

.td-transcript-stat-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.td-transcript-stat-badge svg {
    color: var(--accent-gold);
}

/* Copy Buttons Section */
.td-transcript-copy-section {
    display: flex;
    gap: 12px;
}

.td-copy-transcript-btn,
.td-copy-with-context-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-copy-transcript-btn {
    background: var(--gradient-gold);
    border: none;
    color: #000;
}

.td-copy-transcript-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.td-copy-with-context-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-gold);
    color: var(--accent-gold);
}

.td-copy-with-context-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-gold);
}

/* Preview Section */
.td-transcript-preview {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.td-transcript-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--glass-border);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.td-transcript-search-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
}

.td-transcript-search-inline svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.td-transcript-search-inline input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 12px;
    width: 120px;
}

.td-transcript-search-inline input::placeholder {
    color: var(--text-muted);
}

.td-transcript-raw-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: 'Space Grotesk', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Scrollbar for preview */
.td-transcript-raw-content::-webkit-scrollbar {
    width: 8px;
}

.td-transcript-raw-content::-webkit-scrollbar-track {
    background: transparent;
}

.td-transcript-raw-content::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.td-transcript-raw-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-gold);
}

/* Responsive */
@media (max-width: 768px) {
    .td-transcript-ai-header {
        flex-direction: column;
        gap: 16px;
    }

    .td-transcript-ai-stats {
        width: 100%;
    }

    .td-transcript-copy-section {
        flex-direction: column;
    }

    .td-copy-transcript-btn,
    .td-copy-with-context-btn {
        justify-content: center;
    }
}

/* ===================================================================
   TABS CONTENT - Timeline & Todo
   (Merged from tabs-content.css)
   =================================================================== */

/* ===== ANIMATIONS (from tabs-content.css) ===== */
@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 16px rgba(255, 154, 31, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(255, 154, 31, 0.6); }
}

/* ===== TIMELINE TAB CONTENT ===== */
.td-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.td-timeline-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    animation: fadeInUp 0.4s ease backwards;
    position: relative;
}

.td-timeline-item:nth-child(1) { animation-delay: 0s; }
.td-timeline-item:nth-child(2) { animation-delay: 0.05s; }
.td-timeline-item:nth-child(3) { animation-delay: 0.1s; }
.td-timeline-item:nth-child(4) { animation-delay: 0.15s; }
.td-timeline-item:nth-child(5) { animation-delay: 0.2s; }
.td-timeline-item:nth-child(6) { animation-delay: 0.25s; }
.td-timeline-item:nth-child(7) { animation-delay: 0.3s; }
.td-timeline-item:nth-child(8) { animation-delay: 0.35s; }

.td-timeline-item:hover {
    background: var(--bg-primary, rgba(255, 255, 255, 0.03));
}

.td-timeline-item:active {
    transform: scale(0.99);
}

.td-timeline-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Space Grotesk', monospace;
    min-width: 55px;
    padding-top: 2px;
}

.td-timeline-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--glass-border);
    flex-shrink: 0;
    margin-top: 4px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Timeline type colors */
.td-timeline-marker.insight { background: var(--tl-color-insight, #FF9A1F); }
.td-timeline-marker.problem { background: var(--tl-color-problem, #E53935); }
.td-timeline-marker.action { background: var(--tl-color-action, #3CD2A5); }
.td-timeline-marker.solution { background: var(--tl-color-solution, #4C8DFF); }
.td-timeline-marker.example { background: var(--tl-color-example, #A855F7); }

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

.td-timeline-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Type badge colors */
.td-timeline-type.insight {
    background: rgba(255, 154, 31, 0.15);
    color: #FF9A1F;
}
.td-timeline-type.problem {
    background: rgba(229, 57, 53, 0.15);
    color: #E53935;
}
.td-timeline-type.action {
    background: rgba(60, 210, 165, 0.15);
    color: #3CD2A5;
}
.td-timeline-type.solution {
    background: rgba(76, 141, 255, 0.15);
    color: #4C8DFF;
}
.td-timeline-type.example {
    background: rgba(168, 85, 247, 0.15);
    color: #A855F7;
}

.td-timeline-text {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.55;
}

/* ===== TODO TAB CONTENT (base styles - V3 styles above) ===== */
.td-todo-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.td-todo-section-title svg {
    color: var(--primary-color);
}

.td-todo-all-done-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Tabs Content Responsive */
@media (max-width: 768px) {
    .td-timeline-item {
        padding: 12px 16px;
    }

    .td-timeline-time {
        min-width: 48px;
        font-size: 13px;
    }

    .td-reading-panel-content {
        flex-direction: column;
        gap: 16px;
    }
}

/* ===================================================================
   FLASHCARDS TAB STYLES
   =================================================================== */

/* Loading & Generating States */
.td-flashcards-loading,
.td-flashcards-generating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.td-flashcards-generating h3 {
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
}

/* Empty State */
.td-flashcards-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.td-flashcards-empty-icon {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.td-flashcards-empty h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}

.td-flashcards-empty p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
}

.td-generate-flashcards-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.td-generate-flashcards-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* Flashcards Container */
.td-flashcards-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* Header with Progress */
.td-flashcards-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.td-flashcards-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.td-flashcards-progress {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.td-flashcards-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.td-flashcards-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.td-stat-known {
    color: var(--accent-green);
}

.td-stat-review {
    color: var(--accent-orange);
}

/* Export Button in Header */
.td-flashcards-export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.td-flashcards-export-btn:hover {
    background: var(--bg-elevated);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===================================================================
   FLASHCARD - Glass Floating Design
   =================================================================== */

.td-flashcard {
    width: 100%;
    max-width: 460px;
    height: 390px;
    perspective: 1200px;
    cursor: pointer;
    margin: 0 auto 1.5rem;
}

.td-flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.3s ease;
    transform-style: preserve-3d;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-radius: 24px;
}

/* Hover lift effect */
.td-flashcard:hover .td-flashcard-inner {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

/* Flipped state - ensure animation works */
.td-flashcard.flipped .td-flashcard-inner {
    transform: rotateY(180deg);
}

.td-flashcard.flipped:hover .td-flashcard-inner {
    transform: rotateY(180deg);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

.td-flashcard-front,
.td-flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem 2rem 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.td-flashcard-back {
    transform: rotateY(180deg);
    background: rgba(0, 210, 106, 0.03);
    border-color: rgba(0, 210, 106, 0.15);
}

/* Card Icon */
.td-flashcard-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    flex-shrink: 0;
}

.td-flashcard-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.td-flashcard-back .td-flashcard-label {
    color: var(--accent-green);
}

/* Text content with overflow protection */
.td-flashcard-question,
.td-flashcard-answer {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
    max-height: 180px;
    overflow-y: auto;
    padding: 0 0.5rem;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Custom scrollbar for text overflow */
.td-flashcard-question::-webkit-scrollbar,
.td-flashcard-answer::-webkit-scrollbar {
    width: 4px;
}

.td-flashcard-question::-webkit-scrollbar-thumb,
.td-flashcard-answer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Hint always at bottom */
.td-flashcard-hint {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

/* Action Buttons - Pill Style */
.td-flashcard-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.td-flashcard-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-flashcard-btn:hover {
    transform: scale(1.05);
}

.td-btn-reveal {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.td-btn-reveal:hover {
    background: var(--primary-light);
}

.td-btn-known {
    background: var(--accent-green);
    color: white;
}

.td-btn-review {
    background: transparent;
    color: var(--accent-orange);
    border: 1.5px solid var(--accent-orange);
}

.td-btn-review:hover {
    background: rgba(255, 140, 0, 0.1);
}

/* Navigation */
.td-flashcard-nav {
    display: flex;
    gap: 1rem;
}

.td-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.td-nav-btn:hover:not(:disabled) {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.td-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Card Transition Animations */
@keyframes slideOutKnown {
    0% {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-120%) rotate(-8deg);
        opacity: 0;
    }
}

@keyframes slideOutReview {
    0% {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }
    100% {
        transform: translateX(120%) rotate(8deg);
        opacity: 0;
    }
}

@keyframes slideInNew {
    0% {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.td-flashcard.exiting-known {
    animation: slideOutKnown 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.td-flashcard.exiting-review {
    animation: slideOutReview 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.td-flashcard.entering {
    animation: slideInNew 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Keyboard Hints */
.td-flashcard-keyboard-hints {
    display: none;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (hover: hover) and (pointer: fine) {
    .td-flashcard-keyboard-hints {
        display: flex;
    }
}

.td-flashcard-keyboard-hints span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.td-flashcard-keyboard-hints kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.4rem;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    font-family: inherit;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===================================================================
   SESSION COMPLETE - Arc Style with Gold Gradient
   =================================================================== */

.td-flashcard-complete-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg, rgba(40, 40, 40, 0.98), rgba(20, 20, 20, 0.99));
    border: 1px solid rgba(255, 154, 31, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    animation: fadeIn 0.3s ease;
}

.td-flashcard-complete-content {
    text-align: center;
    padding: 2rem;
    width: 100%;
}

/* Arc Progress Chart */
.td-complete-arc-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
}

.td-complete-arc {
    transform: rotate(-90deg);
}

.td-arc-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 10;
}

.td-arc-progress {
    fill: none;
    stroke: url(#goldGradient);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.td-arc-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.td-arc-percent {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.td-arc-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* Complete Title */
.td-flashcard-complete-content h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

/* Complete Subtitle */
.td-complete-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
}

/* Mini Stats Row */
.td-complete-mini-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 1.5rem;
}

.td-mini-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.td-mini-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.td-mini-dot.known {
    background: var(--accent-green);
}

.td-mini-dot.review {
    background: var(--accent-orange);
}

.td-mini-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.td-mini-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Complete Actions */
.td-complete-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.td-review-errors-btn {
    flex: 1;
    max-width: 160px;
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: var(--accent-orange);
    border: 1.5px solid var(--accent-orange);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-review-errors-btn:hover {
    background: rgba(255, 140, 0, 0.1);
    transform: translateY(-2px);
}

.td-restart-btn {
    flex: 1;
    max-width: 160px;
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: var(--bg-primary);
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.td-restart-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}
