/* X Bot Presentation - X.com Inspired Design */
/* Standalone presentation styles matching the dashboard theme */

/* ============================================
   CSS Custom Properties (Theme System)
   ============================================ */

:root {
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "Cascadia Code", "Fira Code", "JetBrains Mono", monospace;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.1s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-slide: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Accent Colors (constant across themes) */
    --accent-blue: #1d9bf0;
    --accent-blue-hover: #1a8cd8;
    --accent-green: #00ba7c;
    --accent-red: #f4212e;
    --accent-orange: #ff7a00;
    --accent-purple: #794bc4;
    --accent-yellow: #ffd400;
}

/* Dark Theme (default) */
[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #16181c;
    --bg-tertiary: #202327;
    --bg-elevated: #1d1f23;
    --bg-hover: rgba(231, 233, 234, 0.1);
    --bg-active: rgba(231, 233, 234, 0.2);
    
    --text-primary: #e7e9ea;
    --text-secondary: #71767b;
    --text-tertiary: #536471;
    
    --border-color: #2f3336;
    --border-light: #38444d;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    
    --code-bg: #0d1117;
    --code-border: #30363d;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f9f9;
    --bg-tertiary: #eff3f4;
    --bg-elevated: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.03);
    --bg-active: rgba(0, 0, 0, 0.08);
    
    --text-primary: #0f1419;
    --text-secondary: #536471;
    --text-tertiary: #8b98a5;
    
    --border-color: #eff3f4;
    --border-light: #cfd9de;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    --code-bg: #f6f8fa;
    --code-border: #d0d7de;
}

/* ============================================
   Reset & Base Styles
   ============================================ */

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

html {
    font-size: clamp(18px, 1.1vw + 8px, 24px);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   Presentation Container
   ============================================ */

.presentation {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ============================================
   Slides Container
   ============================================ */

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 72px 96px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: opacity var(--transition-slide), transform var(--transition-slide), visibility var(--transition-slide);
    overflow-y: auto;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.slide.prev {
    transform: translateX(-100%);
}

.slide-content {
    max-width: 1360px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* ============================================
   Typography
   ============================================ */

.slide-title {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 8px;
}

.slide-title .accent {
    color: var(--accent-blue);
}

.slide-subtitle {
    font-size: 1.65rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
}

h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   Title Slide
   ============================================ */

.title-slide {
    text-align: center;
}

.title-slide .logo {
    font-size: 6rem;
    margin-bottom: 24px;
    display: inline-block;
}

.title-slide .slide-title {
    font-size: 4.5rem;
}

.title-slide .tagline {
    font-size: 1.7rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 16px;
}

.title-slide .author {
    margin-top: 48px;
    font-size: 1.25rem;
    color: var(--text-tertiary);
}

/* ============================================
   Cards & Sections
   ============================================ */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color var(--transition-fast);
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-icon {
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.cards-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cards-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.problem-grid .card {
    min-height: 220px;
    padding: 28px;
}

.problem-grid .card-title {
    font-size: 1.25rem;
}

.problem-grid p {
    font-size: 1.05rem;
    line-height: 1.65;
}

/* ============================================
   Tables
   ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

tr:hover td {
    background: var(--bg-elevated);
}

/* ============================================
   Code Blocks
   ============================================ */

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--accent-blue);
}

.code-block code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

/* Code syntax colors */
.code-keyword { color: var(--accent-purple); }
.code-string { color: var(--accent-green); }
.code-number { color: var(--accent-orange); }
.code-comment { color: var(--text-tertiary); font-style: italic; }
.code-property { color: var(--accent-blue); }

/* ============================================
   Lists
   ============================================ */

ul, ol {
    padding-left: 24px;
    color: var(--text-primary);
}

li {
    margin-bottom: 12px;
    font-size: 1.2rem;
    line-height: 1.6;
}

li::marker {
    color: var(--accent-blue);
}

.check-list {
    list-style: none;
    padding-left: 0;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.check-list li::before {
    content: "✓";
    color: var(--accent-green);
    font-weight: bold;
    flex-shrink: 0;
}

.check-list li.pending::before {
    content: "○";
    color: var(--text-tertiary);
}

/* ============================================
   Badges & Pills
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-blue { background: rgba(29, 155, 240, 0.15); color: var(--accent-blue); }
.badge-green { background: rgba(0, 186, 124, 0.15); color: var(--accent-green); }
.badge-orange { background: rgba(255, 122, 0, 0.15); color: var(--accent-orange); }
.badge-red { background: rgba(244, 33, 46, 0.15); color: var(--accent-red); }
.badge-purple { background: rgba(121, 75, 196, 0.15); color: var(--accent-purple); }
.badge-yellow { background: rgba(255, 212, 0, 0.15); color: #b58900; }

[data-theme="light"] .badge-yellow { color: #946c00; }

/* ============================================
   Progress Indicators
   ============================================ */

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-fill.green { background: var(--accent-green); }
.progress-fill.orange { background: var(--accent-orange); }

/* ============================================
   Architecture Diagram
   ============================================ */

.architecture {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre;
    overflow-x: auto;
    color: var(--text-primary);
}

.architecture-diagram {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.arch-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.arch-node {
    background: linear-gradient(160deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    width: 300px;
    box-shadow: var(--shadow-sm);
}

.arch-node h3 {
    margin: 8px 0 6px;
    font-size: 1.05rem;
}

.arch-node p {
    font-size: 0.95rem;
    line-height: 1.45;
}

.arch-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.arch-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 28px;
}

/* ============================================
   Flowchart
   ============================================ */

.flowchart {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.flow-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    text-align: center;
    min-width: 140px;
}

.flow-item.active {
    border-color: var(--accent-blue);
    background: rgba(29, 155, 240, 0.1);
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--text-tertiary);
}

/* ============================================
   Two Column Layout
   ============================================ */

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.two-col-60-40 {
    grid-template-columns: 3fr 2fr;
}

/* ============================================
   Status Items
   ============================================ */

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

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.status-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.status-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* ============================================
   Navigation Controls
   ============================================ */

.nav-controls {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

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

.slide-counter {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: center;
}

/* ============================================
   Theme Toggle
   ============================================ */

.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    z-index: 100;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

/* ============================================
   Progress Bar (Top)
   ============================================ */

.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-tertiary);
    z-index: 100;
}

.progress-indicator .fill {
    height: 100%;
    background: var(--accent-blue);
    transition: width var(--transition-normal);
}

/* ============================================
   Highlight Box
   ============================================ */

.highlight-box {
    background: rgba(29, 155, 240, 0.1);
    border-left: 4px solid var(--accent-blue);
    padding: 20px 24px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.highlight-box.warning {
    background: rgba(255, 122, 0, 0.1);
    border-left-color: var(--accent-orange);
}

.highlight-box.success {
    background: rgba(0, 186, 124, 0.1);
    border-left-color: var(--accent-green);
}

/* ============================================
   Stat Cards
   ============================================ */

.stat-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-blue);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   Q&A Slide
   ============================================ */

.qa-slide {
    text-align: center;
}

.qa-slide .big-icon {
    font-size: 5rem;
    margin-bottom: 24px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    html {
        font-size: 16px;
    }

    .slide {
        padding: 40px 48px;
    }
    
    .slide-title {
        font-size: 2.5rem;
    }
    
    .title-slide .slide-title {
        font-size: 3rem;
    }
    
    .two-col,
    .two-col-60-40 {
        grid-template-columns: 1fr;
    }
    
    .cards-grid-2,
    .cards-grid-3 {
        grid-template-columns: 1fr;
    }

    .problem-grid .card {
        min-height: 0;
    }

    .arch-node {
        width: 100%;
        max-width: 640px;
    }

    .arch-arrow {
        transform: rotate(90deg);
        min-height: 24px;
    }
}

@media (max-width: 768px) {
    .slide {
        padding: 24px 24px 100px;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .title-slide .slide-title {
        font-size: 2.5rem;
    }
    
    .title-slide .logo {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    li {
        font-size: 1rem;
    }
    
    .nav-controls {
        bottom: 16px;
        padding: 6px 12px;
    }
    
    .nav-btn {
        width: 36px;
        height: 36px;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 10px 12px;
    }
    
    .arch-node {
        padding: 14px;
    }

    .arch-node p {
        font-size: 0.9rem;
    }

    .problem-grid .card {
        padding: 22px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .nav-controls,
    .theme-toggle,
    .progress-indicator {
        display: none !important;
    }
    
    .slide {
        position: relative;
        opacity: 1;
        visibility: visible;
        transform: none;
        page-break-after: always;
        height: auto;
        min-height: 100vh;
    }
}
