/* ============================================
   READWISE WRAPPED 2025 - STYLES
   A reading journey visualization
   ============================================ */

:root {
    /* Colors - Midnight Library Theme */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    --accent-amber: #d97706;
    
    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #1e1b4b 50%, #0a0e1a 100%);
    --gradient-card: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-amber) 100%);
    --gradient-glow: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.15) 0%, transparent 50%);
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   SCREENS
   ============================================ */

.screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
    overflow-y: auto;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   LANDING SCREEN
   ============================================ */

#landing {
    background: var(--gradient-hero);
    position: relative;
}

#landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    pointer-events: none;
}

.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-100px) rotate(180deg); opacity: 0.6; }
}

.landing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-xl);
    padding-bottom: 180px; /* Space for footer */
    max-width: 480px;
    width: 100%;
}

.logo-badge {
    display: inline-block;
    background: var(--gradient-accent);
    color: var(--bg-primary);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-md);
    border-radius: 50px;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.1em;
    animation: slideDown 0.8s ease-out;
}

.main-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    animation: slideUp 0.8s ease-out 0.1s both;
}

.main-title .accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    animation: slideUp 0.8s ease-out 0.2s both;
}

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

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

/* Input Section */
.input-section {
    animation: slideUp 0.8s ease-out 0.3s both;
}

.input-group {
    margin-bottom: var(--space-lg);
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.input-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.token-link {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

.token-link:hover {
    color: var(--accent-gold-light);
    text-decoration: underline;
}

/* Checkbox Styling */
.checkbox-group {
    margin-bottom: var(--space-lg);
    text-align: center;
}

.checkbox-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    gap: 8px;
    flex-wrap: nowrap;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--text-muted);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-gold);
    border-radius: 2px;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: var(--accent-gold);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--accent-gold);
}

.checkbox-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-text {
    color: var(--text-primary);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.generate-btn:hover::before {
    transform: translateX(100%);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.generate-btn:disabled::before {
    display: none;
}

.btn-icon {
    font-size: 1.25rem;
}

/* Footer */
.landing-footer {
    position: absolute;
    bottom: var(--space-lg);
    left: 0;
    right: 0;
    text-align: center;
    width: 100%;
    padding: 0 var(--space-lg);
    z-index: 10;
}

/* Service Status Indicator */
.service-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.checking {
    background: var(--accent-gold);
    animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.healthy {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.status-dot.degraded {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.status-dot.error {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    opacity: 0.8;
}

.landing-footer .privacy-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

/* Creator Credit */
.creator-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.creator-link {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.creator-link:hover {
    color: var(--accent-gold-light);
    text-decoration: underline;
}

/* Sponsor Links */
.creator-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.creator-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: 50px;
    transition: var(--transition-fast);
}

.creator-link:hover {
    color: var(--accent-gold);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.creator-link svg {
    color: #db61a2;
}

.creator-link:hover svg {
    color: #ff6bb3;
}

.railway-link:hover {
    color: var(--text-primary);
}

/* Screen Footer (for loading screen) */
.screen-footer {
    position: absolute;
    bottom: var(--space-lg);
    text-align: center;
    width: 100%;
}

.screen-footer .creator-credit {
    font-size: 0.8rem;
}

/* ============================================
   LOADING SCREEN
   ============================================ */

#loading {
    background: var(--gradient-hero);
}

.loading-content {
    text-align: center;
    padding: var(--space-xl);
}

/* Book Loader Animation */
.book-loader {
    perspective: 600px;
    margin-bottom: var(--space-2xl);
}

.book {
    width: 100px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    animation: bookRotate 3s infinite ease-in-out;
}

.book .page {
    position: absolute;
    width: 50px;
    height: 80px;
    background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 0 4px 4px 0;
    transform-origin: left center;
    left: 50px;
    box-shadow: inset -2px 0 10px rgba(0,0,0,0.1);
}

.book .page:nth-child(1) {
    animation: pageTurn 3s infinite ease-in-out;
    z-index: 3;
}

.book .page:nth-child(2) {
    animation: pageTurn 3s infinite ease-in-out 0.15s;
    z-index: 2;
}

.book .page:nth-child(3) {
    animation: pageTurn 3s infinite ease-in-out 0.3s;
    z-index: 1;
}

@keyframes bookRotate {
    0%, 100% { transform: rotateY(-10deg); }
    50% { transform: rotateY(10deg); }
}

@keyframes pageTurn {
    0%, 40% { transform: rotateY(0deg); }
    50%, 90% { transform: rotateY(-160deg); }
    100% { transform: rotateY(0deg); }
}

.loading-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: var(--space-md);
}

.loading-status {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    min-height: 1.6em;
}

.loading-bar {
    width: 280px;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: var(--gradient-accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ============================================
   RESULTS SCREEN
   ============================================ */

#results {
    background: var(--bg-primary);
    padding: var(--space-md);
    overflow-y: auto;
}

/* Navigation */
.results-nav {
    position: fixed;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    z-index: 100;
    background: var(--bg-card);
    padding: var(--space-sm) var(--space-md);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    background: var(--bg-card-hover);
}

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

.slide-indicators {
    display: flex;
    gap: var(--space-xs);
}

.slide-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: var(--transition-base);
    cursor: pointer;
}

.slide-indicator.active {
    background: var(--accent-gold);
    width: 24px;
    border-radius: 4px;
}

/* Slides Container */
.slides-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 60px var(--space-md) 100px;
    max-height: calc(100vh - 60px);
}

/* Individual Slide */
.slide {
    display: none;
    width: 100%;
    animation: slideIn 0.5s ease-out;
    padding-bottom: var(--space-xl);
}

.slide.active {
    display: block;
}

/* Ensure slides don't overflow */
.slide * {
    max-width: 100%;
    word-wrap: break-word;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Slide Types */
.slide-intro {
    text-align: center;
}

.slide-intro .year-badge {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-md);
}

.slide-intro h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.slide-intro p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Stats Slide */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.stat-card {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.3);
}

.stat-card.featured {
    grid-column: span 2;
    background: var(--gradient-accent);
}

.stat-card.featured .stat-value,
.stat-card.featured .stat-label {
    color: var(--bg-primary);
}

/* Source Cards Grid (Top of Stats) */
.source-cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.source-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    min-width: 80px;
    transition: var(--transition-base);
}

.source-card-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.source-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.source-card-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    opacity: 0.9;
}

/* Source card colors */
.source-card.books {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.4);
}
.source-card.books .source-card-value,
.source-card.books .source-card-label { color: #a78bfa; }

.source-card.articles {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.4);
}
.source-card.articles .source-card-value,
.source-card.articles .source-card-label { color: #22d3ee; }

.source-card.tweets {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.4);
}
.source-card.tweets .source-card-value,
.source-card.tweets .source-card-label { color: #60a5fa; }

.source-card.podcasts {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.source-card.podcasts .source-card-value,
.source-card.podcasts .source-card-label { color: #34d399; }

.source-card.other {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2), rgba(107, 114, 128, 0.1));
    border: 1px solid rgba(107, 114, 128, 0.4);
}
.source-card.other .source-card-value,
.source-card.other .source-card-label { color: #9ca3af; }

/* Compact stats grid */
.stats-grid.compact {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.stats-grid.compact .stat-card {
    padding: var(--space-sm) var(--space-md);
}

.stats-grid.compact .stat-icon {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.stats-grid.compact .stat-value {
    font-size: 1.25rem;
}

.stats-grid.compact .stat-label {
    font-size: 0.65rem;
}

.stat-icon {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Comparison Slide */
.comparison-grid {
    display: grid;
    gap: var(--space-md);
}

.comparison-item {
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.comparison-content {
    flex: 1;
}

.comparison-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.comparison-values {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.comparison-current {
    font-size: 1.5rem;
    font-weight: 700;
}

.comparison-change {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
}

.comparison-change.positive {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-light);
}

.comparison-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.comparison-change.neutral {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-secondary);
}

/* Top Books Slide */
.books-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.book-item {
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-base);
}

.book-item:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.book-rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    width: 40px;
}

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

.book-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-author {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.book-highlights {
    text-align: right;
}

.highlight-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.highlight-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Highlights Slide */
.highlight-card {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: var(--space-lg);
}

.highlight-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    position: relative;
    padding-left: var(--space-lg);
}

.highlight-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 3rem;
    color: var(--accent-gold);
    opacity: 0.5;
    font-family: var(--font-display);
}

.highlight-source {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.highlight-source strong {
    color: var(--text-primary);
}

/* AI Insights Slide */
.insights-section {
    margin-bottom: var(--space-xl);
}

.insights-section h3 {
    font-size: 1rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.insights-list {
    list-style: none;
}

.insights-list li {
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    padding-left: var(--space-xl);
    position: relative;
}

.insights-list li::before {
    content: '→';
    position: absolute;
    left: var(--space-md);
    color: var(--accent-gold);
}

.ai-summary {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border-left: 4px solid var(--accent-gold);
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Results Footer */
.results-footer {
    position: fixed;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    z-index: 100;
}

.results-actions {
    display: flex;
    gap: var(--space-md);
}

.results-credit-bar {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.mini-credit {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.mini-credit a {
    color: var(--accent-gold);
    text-decoration: none;
}

.mini-credit a:hover {
    text-decoration: underline;
}

.divider {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.mini-support {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    transition: var(--transition-fast);
}

.mini-support:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.5);
}

.mini-support svg {
    color: #db61a2;
}

.action-btn {
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--gradient-accent);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition-base);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.action-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: var(--bg-card-hover);
    box-shadow: none;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 400px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-card-hover);
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

.share-url-group {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.share-url-group input {
    flex: 1;
    padding: var(--space-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    outline: none;
}

.copy-btn {
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--accent-gold);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: var(--accent-gold-light);
}

.share-note {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Share Card Modal */
.share-card-modal {
    max-width: 700px;
}

.share-card-preview {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-card-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.share-card-actions .action-btn {
    padding: var(--space-sm) var(--space-lg);
}

/* Share Card Button in Summary */
.share-card-btn {
    margin-top: var(--space-xl);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--gradient-accent);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition-base);
}

.share-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   SLIDE TITLES
   ============================================ */

.slide-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.slide-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.slide-header p {
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .slides-container {
        padding: 50px var(--space-sm) 90px;
        max-height: calc(100vh - 40px);
    }
    
    .slide-header h2 {
        font-size: 1.25rem;
    }
    
    .slide-intro .year-badge {
        font-size: 3rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
    
    .stat-card {
        padding: var(--space-sm) var(--space-md);
    }
    
    .stat-icon {
        font-size: 1.25rem;
        margin-bottom: var(--space-xs);
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stat-card.featured {
        grid-column: span 2;
    }
    
    .source-breakdown {
        margin-top: var(--space-md);
    }
    
    .source-tag {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .source-cards-grid {
        gap: var(--space-xs);
    }
    
    .source-card {
        padding: var(--space-sm);
        min-width: 65px;
    }
    
    .source-card-icon {
        font-size: 1.2rem;
    }
    
    .source-card-value {
        font-size: 1.2rem;
    }
    
    .source-card-label {
        font-size: 0.6rem;
    }
    
    .stats-grid.compact {
        gap: var(--space-xs);
    }
    
    .stats-grid.compact .stat-card {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .stats-grid.compact .stat-icon {
        font-size: 1rem;
    }
    
    .stats-grid.compact .stat-value {
        font-size: 1rem;
    }
    
    .stats-grid.compact .stat-label {
        font-size: 0.55rem;
    }
    
    .results-nav {
        top: auto;
        bottom: 80px;
    }
    
    .results-footer {
        padding: 0 var(--space-md);
    }
    
    .results-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .action-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8rem;
    }
    
    .results-credit-bar {
        gap: var(--space-sm);
    }
    
    .mini-support {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .creator-links {
        gap: var(--space-sm);
    }
    
    .creator-link {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .slide-intro .year-badge {
        font-size: 4rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .book-item {
        flex-wrap: wrap;
    }
    
    .book-highlights {
        width: 100%;
        text-align: left;
        padding-left: 52px;
        margin-top: var(--space-sm);
    }
}

/* ============================================
   PERSONALITY SLIDE
   ============================================ */

.personality-card {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    border: 2px solid rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}

.personality-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.personality-badge {
    font-size: 3.5rem;
    margin-bottom: var(--space-sm);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.personality-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.personality-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.personality-traits {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.trait-tag {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
    padding: var(--space-xs) var(--space-md);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.personality-reasoning {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   MONTHLY ACTIVITY SLIDE
   ============================================ */

.monthly-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding: var(--space-md);
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.month-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.month-bar {
    width: 80%;
    max-width: 30px;
    background: var(--gradient-accent);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    min-height: 4px;
    position: relative;
    transition: height 0.5s ease;
}

.month-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-gold);
    white-space: nowrap;
}

.month-label {
    margin-top: var(--space-sm);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.monthly-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
}

.monthly-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.monthly-stat .stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.monthly-stat .stat-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   TOP AUTHORS SLIDE
   ============================================ */

.authors-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.author-item {
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-base);
}

.author-item:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateX(4px);
}

.author-rank {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-gold);
    width: 36px;
}

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

.author-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.author-book {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-stats {
    text-align: right;
}

.author-highlights {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.author-books {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================
   DAY OF WEEK SLIDE
   ============================================ */

.dow-chart {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.dow-bar-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.dow-bar-container.peak {
    background: rgba(245, 158, 11, 0.1);
}

.dow-label {
    width: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dow-bar {
    height: 28px;
    background: var(--gradient-accent);
    border-radius: var(--radius-sm);
    min-width: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: var(--space-sm);
    transition: width 0.5s ease;
}

.dow-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bg-primary);
}

.dow-percent {
    width: 50px;
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dow-bar-container.peak .dow-label {
    color: var(--accent-gold);
    font-weight: 600;
}

.dow-bar-container.peak .dow-percent {
    color: var(--accent-gold);
    font-weight: 600;
}

/* ============================================
   SUPERPOWER SLIDE
   ============================================ */

.slide-superpower {
    text-align: center;
    padding: var(--space-md);
}

.superpower-badge {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.3)); }
    to { filter: drop-shadow(0 0 40px rgba(245, 158, 11, 0.6)); }
}

.superpower-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.superpower-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.superpower-evidence {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-card);
    padding: var(--space-md) var(--space-lg);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.evidence-icon {
    font-size: 1rem;
}

/* ============================================
   FORECAST SLIDE
   ============================================ */

.forecast-card {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.forecast-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.forecast-section:last-of-type {
    border-bottom: none;
}

.forecast-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
}

.forecast-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.forecast-topics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.forecast-topic {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
    padding: var(--space-xs) var(--space-md);
    border-radius: 50px;
    font-size: 0.875rem;
}

.forecast-goals {
    list-style: none;
    padding: 0;
}

.forecast-goals li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
    color: var(--text-secondary);
}

.forecast-goals li::before {
    content: '🎯';
    position: absolute;
    left: 0;
    font-size: 0.875rem;
}

.forecast-summary {
    background: rgba(245, 158, 11, 0.1);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-style: italic;
    color: var(--text-primary);
    text-align: center;
    margin-top: var(--space-md);
}

/* ============================================
   RESPONSIVE ADDITIONS
   ============================================ */

@media (max-width: 640px) {
    .personality-badge {
        font-size: 3.5rem;
    }
    
    .personality-name {
        font-size: 1.5rem;
    }
    
    .monthly-chart {
        height: 150px;
    }
    
    .month-value {
        font-size: 0.6rem;
        top: -18px;
    }
    
    .superpower-badge {
        font-size: 4rem;
    }
    
    .superpower-title {
        font-size: 1.75rem;
    }
    
    .superpower-description {
        font-size: 1rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

