/* --- Fonts (Self-hosted) --- */
/* Inter */
@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Outfit */
@font-face {
    font-family: 'Outfit';
    src: url('fonts/outfit-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('fonts/outfit-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('fonts/outfit-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   Pretalx Schedule Preview — Design System
   Dark theme inspired by convention schedule UIs
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Background layers */
    --bg-base: #0b1220;
    --bg-surface: #111b2b;
    --bg-card: #172236;
    --bg-card-hover: #1d2b42;
    --bg-elevated: #1e2d44;

    /* Text */
    --text-primary: #e8edf4;
    --text-secondary: #8c99ae;
    --text-muted: #5c6b80;

    /* Accent */
    --accent-primary: #3b82f6;
    --accent-warm: #f97316;
    --accent-ef: #005953;
    --accent-badge-bg: rgba(59, 130, 246, 0.15);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);

    /* Blocker */
    --blocker-color: #ef4444;
    --blocker-bg: rgba(239, 68, 68, 0.08);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Spacing */
    --header-height: 180px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input {
    font-family: inherit;
    color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 24px;
    backdrop-filter: blur(12px);
    background: rgba(17, 27, 43, 0.92);
    background-image: url('/media/eurofurence-30-2026/img/header_GCYvHYB.webp');
    background-size: cover;
    background-position: center;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 8px;
}

.event-title {
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e8edf4 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    gap: 16px;
}

/* --- Day Tabs --- */
.day-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 1;
    min-width: 0;
    background-color: #1e2d44a2;
    backdrop-filter: blur(4px);
}

.day-tabs::-webkit-scrollbar {
    display: none;
}

.day-tab {
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
}

.day-tab:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.day-tab.active {
    color: var(--text-primary);
    background: var(--background-elevated);
    border-color: var(--accent-ef);
}

/* --- View Toggle --- */
.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 3px;
    flex-shrink: 0;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.view-btn svg {
    flex-shrink: 0;
}

/* --- Filters Bar --- */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 12px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 7px 14px;
    min-width: 220px;
    transition: border-color var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

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

.search-box input {
    background: none;
    border: none;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
    color: var(--text-primary);
}

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

/* --- Filter Dropdowns --- */
.filter-dropdowns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.filter-dropdown {
    position: relative;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.filter-btn.has-selection {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    z-index: 200;
}

.dropdown-panel.open {
    display: block;
    animation: dropdownIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.dropdown-search input {
    background: none;
    border: none;
    outline: none;
    font-size: 0.82rem;
    width: 100%;
    color: var(--text-primary);
}

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

.dropdown-bulk-actions {
    display: flex;
    gap: 4px;
    padding: 4px 6px 6px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 4px;
}

.dropdown-bulk-btn {
    flex: 1;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.76rem;
    padding: 3px 8px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    text-align: center;
}

.dropdown-bulk-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.dropdown-item:hover {
    background: var(--bg-card);
}

.dropdown-item .checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-medium);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.dropdown-item.selected .checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.dropdown-item.selected .checkbox::after {
    content: '';
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    margin-top: -2px;
}

.dropdown-item .color-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.dropdown-item .item-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Clear Filters --- */
.btn-clear-filters {
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-clear-filters:hover {
    background: rgba(59, 130, 246, 0.15);
}

/* ============================================
   LOADING & ERROR STATES
   ============================================ */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    gap: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.error-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
}

.error-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.error-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 400px;
}

.btn-primary {
    padding: 10px 24px;
    background: var(--accent-primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* --- No results --- */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================================
   CALENDAR VIEW
   ============================================ */
.time-group {
    margin-bottom: 32px;
}

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

.time-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    background: var(--accent-ef);
    color: #fff;
    border-radius: var(--radius-full);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
    flex-shrink: 0;
}

.time-group-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-medium), transparent);
}

.time-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

/* ============================================
   CROSS-DAY SEARCH RESULTS
   ============================================ */
.cross-day-section {
    margin-bottom: 36px;
}

.cross-day-section:last-child {
    margin-bottom: 0;
}

.cross-day-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.cross-day-label {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cross-day-count {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
}

.cross-day-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-medium), transparent);
}

/* ============================================
   ROOM VIEW
   ============================================ */

/* Scroll hint banner */
.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-primary);
    transition: opacity var(--transition-base);
    animation: hintPulse 2s ease-in-out infinite;
}

.scroll-hint.hidden {
    display: none !important;
}

@keyframes hintPulse {

    0%,
    100% {
        opacity: 0.85;
    }

    50% {
        opacity: 1;
    }
}

.scroll-hint svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* Scroll wrapper with indicators */
.rooms-scroll-wrapper {
    position: relative;
}

/* Gradient fade edges when content is scrollable */
.rooms-scroll-wrapper.has-scroll::before,
.rooms-scroll-wrapper.has-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 5;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.rooms-scroll-wrapper.has-scroll::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-base) 0%, transparent 100%);
    opacity: 0;
}

.rooms-scroll-wrapper.has-scroll::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg-base) 0%, transparent 100%);
}

/* Show left fade when scrolled */
.rooms-scroll-wrapper.has-scroll .scroll-indicator-left.visible~.rooms-grid~.dummy,
.rooms-scroll-wrapper.has-scroll:has(.scroll-indicator-left.visible)::before {
    opacity: 1;
}

/* Scroll indicator buttons */
.scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
}

.scroll-indicator.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-indicator:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-50%) scale(1.05);
}

.scroll-indicator-left {
    left: -6px;
}

.scroll-indicator-right {
    right: -6px;
}

.rooms-grid {
    display: grid;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) transparent;
}

.room-column {
    min-width: 300px;
}

.room-column-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 16px;
    background: var(--bg-surface);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: 1px solid var(--border-subtle);
    border-bottom: 2px solid var(--accent-primary);
    margin-bottom: 8px;
}

.room-column-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.room-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================
   EVENT CARD
   ============================================ */
.event-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    cursor: pointer;
    transition: all var(--transition-base);
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-track-color, var(--text-muted));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.event-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.event-card.is-blocker {
    --card-track-color: var(--blocker-color);
    background: var(--blocker-bg);
    border-left: 3px solid var(--blocker-color);
    opacity: 0.7;
}

.event-card.is-blocker:hover {
    opacity: 0.85;
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.card-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-room {
    background: var(--accent-badge-bg);
    color: var(--accent-primary);
}

.badge-duration {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.badge-type {
    background: rgba(249, 115, 22, 0.12);
    color: var(--accent-ef);
}

.badge-track {
    color: #fff;
    opacity: 0.85;
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-speaker {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.speaker-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ============================================
   DETAIL MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: modalFadeIn 200ms ease forwards;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.modal-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

.modal-copy-link {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.modal-copy-link:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
    background: var(--bg-elevated);
}

.modal-header {
    padding: 0;
}

.modal-track-bar {
    height: 4px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: background var(--transition-fast);
}

.modal-event-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    display: block;
}

.modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 24px 10px;
}

.modal-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    padding: 6px 24px 16px;
    line-height: 1.35;
}

.modal-body {
    padding: 0 24px 24px;
}

/* Speakers in modal */
.modal-speakers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-speaker-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.speaker-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.speaker-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

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

.speaker-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.speaker-code {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Meta info */
.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.meta-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

/* Sections */
.modal-section {
    margin-bottom: 16px;
}

.modal-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-text,
.markdown-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    word-wrap: break-word;
}

/* Markdown rendered content */
.markdown-content p {
    margin: 0 0 0.75em;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.1em 0 0.4em;
    line-height: 1.3;
}

.markdown-content h1 {
    font-size: 1.2rem;
}

.markdown-content h2 {
    font-size: 1.05rem;
}

.markdown-content h3 {
    font-size: 0.95rem;
}

.markdown-content h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child {
    margin-top: 0;
}

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

.markdown-content em {
    color: var(--text-secondary);
    font-style: italic;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0.5em 0 0.75em;
    padding-left: 1.5em;
}

.markdown-content li {
    margin-bottom: 0.25em;
}

.markdown-content li:last-child {
    margin-bottom: 0;
}

.markdown-content ul {
    list-style: disc;
}

.markdown-content ol {
    list-style: decimal;
}

.markdown-content ul ul,
.markdown-content ol ul {
    list-style: circle;
}

.markdown-content blockquote {
    border-left: 3px solid var(--accent-primary);
    margin: 0.75em 0;
    padding: 0.4em 0.75em;
    color: var(--text-muted);
    background: rgba(99, 102, 241, 0.06);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.markdown-content blockquote p {
    margin: 0;
}

.markdown-content code {
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.82em;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.1em 0.4em;
    color: #a5b4fc;
}

.markdown-content pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75em 1em;
    overflow-x: auto;
    margin: 0.75em 0;
}

.markdown-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.markdown-content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.markdown-content a:hover {
    color: #818cf8;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 1em 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin: 0.75em 0;
}

.markdown-content th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
    padding: 6px 10px;
    border-bottom: 2px solid var(--border-medium);
}

.markdown-content td {
    padding: 5px 10px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .app-header {
        padding: 0 14px;
    }

    .header-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar {
        flex-wrap: wrap;
    }

    .search-box {
        min-width: 160px;
    }

    .main-content {
        padding: 16px;
    }

    .time-group-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-height: 90vh;
    }

    .modal-title {
        font-size: 1.15rem;
        padding-right: 40px;
    }
}

@media (min-width: 1200px) {
    .time-group-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}