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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Schedule Management */
.schedule-management {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.schedule-header h1 {
    color: #343a40;
    margin: 0;
}

.schedule-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#scheduleSelector {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 200px;
}

/* Import Section */
.import-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.schedule-name-input {
    margin-bottom: 20px;
}

.schedule-name-input label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.schedule-name-input input {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.import-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.import-method {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.import-method h3 {
    margin-bottom: 10px;
    color: #495057;
}

.url-controls, .file-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#scheduleURL {
    flex: 1;
    min-width: 250px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.import-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

#htmlFile {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#clearBtn {
    background-color: #dc3545;
}

#clearBtn:hover {
    background-color: #c82333;
}

#shareBtn {
    background-color: #28a745;
}

#shareBtn:hover {
    background-color: #1e7e34;
}

#exportBtn {
    background-color: #17a2b8;
}

#exportBtn:hover {
    background-color: #117a8b;
}

#importScheduleBtn {
    background-color: #6f42c1;
}

#importScheduleBtn:hover {
    background-color: #5a32a3;
}

#importStatus {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Current Talk Bar */
.current-talk-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.current-talk, .next-talk {
    flex: 1;
    min-width: 250px;
    margin-right: 20px;
}

.current-talk h3, .next-talk h3 {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.current-talk div, .next-talk div {
    font-size: 16px;
    font-weight: bold;
}

.timeline-control {
    display: flex;
    align-items: center;
}

#timelineToggle {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#timelineToggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Schedule Styling */
.schedule-wrapper {
    background: white;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.head {
    background-color: #343a40;
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
}

.roominfo {
    background-color: #e9ecef;
    padding: 15px 20px;
    font-size: 14px;
    color: #495057;
}

.time {
    background-color: #f8f9fa;
    padding: 10px 20px;
    font-weight: bold;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.time-block {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 20px;
}

.block.event {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    flex: 1;
    min-width: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.block.event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.block.event.selected {
    border-color: #28a745;
    background-color: #d4edda;
}

.block.event.conflict {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.block.event.current-time {
    border-color: #ffc107;
    background-color: #fff3cd;
    position: relative;
}

.block.event.current-time::before {
    content: "🔴 LIVE";
    position: absolute;
    top: -8px;
    right: 10px;
    background-color: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.event-title-block {
    margin-bottom: 10px;
}

.event-track {
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 8px;
    font-weight: bold;
}

.event-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #343a40;
}

.event-loc {
    color: #6c757d;
    font-size: 14px;
}

.event-info {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.event-info:last-child {
    border-bottom: none;
}

.event-info > div:first-child {
    font-weight: 500;
    margin-bottom: 4px;
    color: #343a40;
}

.eauthors {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
    margin-bottom: 4px;
}

.etime {
    color: #007bff;
    font-size: 13px;
    font-weight: bold;
}

.event-undetailed-block {
    text-align: center;
}

.full {
    width: 100%;
}

/* Conflicts Section */
#conflictsSection {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

#conflictsSection h3 {
    color: #721c24;
    margin-bottom: 15px;
}

.conflict-item {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 4px solid #dc3545;
}

/* Selection indicator */
.selection-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #28a745;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Schedule View */
.schedule-view-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.view-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.tab-button {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-bottom: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    position: relative;
    bottom: -2px;
}

.tab-button:hover {
    background: #e9ecef;
    color: #343a40;
}

.tab-button.active {
    background: white;
    color: #007bff;
    border-color: #007bff #e9ecef #white #e9ecef;
    border-bottom: 2px solid white;
    z-index: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* My Schedule View */
#myScheduleContainer {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.my-schedule-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.my-schedule-header h3 {
    color: #343a40;
    margin: 0;
    font-size: 18px;
}

.schedule-stats {
    font-size: 14px;
    color: #6c757d;
}

.my-schedule-timeline {
    position: relative;
    min-height: 400px;
}

.no-selections {
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 16px;
}

.schedule-day-group {
    border-bottom: 1px solid #e9ecef;
}

.schedule-day-group:last-child {
    border-bottom: none;
}

.schedule-day-header {
    background: #007bff;
    color: white;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.schedule-talks {
    padding: 0;
    position: relative;
}

.schedule-talk {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
    transition: all 0.2s ease;
}

.schedule-talk:last-child {
    border-bottom: none;
}

.schedule-talk:hover {
    background: #f8f9fa;
}

.schedule-talk.current-talk {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
    animation: livePulse 3s infinite;
}

.schedule-talk.past-talk {
    opacity: 0.6;
    background: #f8f9fa;
}

.talk-time-info {
    flex: 0 0 140px;
    text-align: right;
    padding-right: 20px;
}

.talk-time-range {
    font-size: 15px;
    font-weight: bold;
    color: #343a40;
    margin-bottom: 4px;
    line-height: 1.2;
}

.talk-duration {
    font-size: 12px;
    color: #6c757d;
}

.talk-details {
    flex: 1;
}

.talk-title-main {
    font-size: 16px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 6px;
    line-height: 1.3;
}

.talk-authors-main {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 6px;
}

.talk-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.talk-track-main {
    background: #007bff;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.talk-location-main {
    color: #495057;
    font-size: 13px;
    font-weight: 500;
}

.talk-status {
    font-size: 12px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
}

.talk-status.live {
    background: #dc3545;
    color: white;
}

.talk-status.ended {
    background: #6c757d;
    color: white;
}

.talk-status.upcoming {
    background: #28a745;
    color: white;
}

/* Navigation button in My Schedule */
.talk-nav-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.2s ease;
}

.talk-nav-button:hover {
    background: #5a6268;
}

/* Transition Info */
.transition-info {
    padding: 8px 20px;
    background: #f8f9fa;
    border-left: 3px solid #dee2e6;
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    text-align: center;
}

.transition-info.transition-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.transition-info.transition-caution {
    background: #fff3cd;
    border-left-color: #fd7e14;
    color: #856404;
}

.transition-time {
    font-weight: 500;
}

/* Highlighted talk effect */
.highlighted-talk {
    animation: highlightPulse 3s ease-in-out;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.8) !important;
    border-color: #007bff !important;
    z-index: 10;
    position: relative;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 123, 255, 1);
        transform: scale(1.02);
    }
}

/* Current Time Indicator */
.current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #dc3545, #ff6b6b);
    z-index: 50;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.6);
}

.current-time-line::before {
    content: 'NOW';
    position: absolute;
    left: 10px;
    top: -10px;
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

/* Timeline View */
#timelineContainer {
    overflow: visible;
    position: relative;
}

.timeline-header {
    background: white;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px 0;
}

.day-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.day-tab {
    padding: 10px 20px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    color: #495057;
    font-weight: 500;
}

.day-tab:hover {
    background: #e9ecef;
    color: #343a40;
}

.day-tab.active {
    background: white;
    border-bottom-color: #007bff;
    font-weight: bold;
    color: #007bff;
}

.timeline-content {
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: visible;
    max-height: none;
}

.timeline-day {
    display: none;
}

.timeline-day.active {
    display: block;
}

.timeline-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    overflow: visible;
}

.track-column {
    flex: 1;
    min-width: 350px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.track-column-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #dee2e6;
    font-weight: bold;
    font-size: 16px;
    color: #495057;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.track-events {
    padding: 15px;
}

.time-section {
    margin-bottom: 25px;
}

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

.time-header {
    background: #e9ecef;
    padding: 8px 15px;
    margin: 0 -15px 15px -15px;
    font-weight: bold;
    font-size: 14px;
    color: #495057;
    border-left: 4px solid #007bff;
}

.time-header.period-separator {
    background: #dee2e6;
    color: #495057;
    border-left: 4px solid #6c757d;
    text-align: center;
    font-weight: 700;
    margin: 20px -15px 15px -15px;
}

.session-event {
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 12px;
}

.break-event {
    margin-bottom: 15px;
    border: 1px solid #ffc107;
    border-radius: 8px;
    background: #fff3cd;
    padding: 12px;
    text-align: center;
}

.event-track {
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 8px;
    font-weight: bold;
}

.break-event .event-track {
    background-color: #ffc107;
    color: #212529;
}

.event-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #343a40;
}

.event-location {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

.event-track {
    background-color: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    display: inline-block;
    margin-bottom: 4px;
    font-weight: bold;
}

.event-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 2px;
    color: #343a40;
    line-height: 1.2;
}

.event-location {
    font-size: 10px;
    color: #6c757d;
    margin-bottom: 4px;
}

.individual-talk {
    background: rgba(0, 123, 255, 0.05);
    border: 2px solid #e9ecef;
    border-left: 4px solid #007bff;
    margin: 8px 4px;
    padding: 12px 20px 12px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible;
}

.individual-talk:hover {
    background: rgba(0, 123, 255, 0.15);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.individual-talk.selected {
    background: rgba(40, 167, 69, 0.15);
    border-left-color: #28a745;
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.individual-talk.conflict {
    background: rgba(220, 53, 69, 0.15);
    border-left-color: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    animation: conflictPulse 2s infinite;
}

.individual-talk.past-talk {
    opacity: 0.5;
    background: rgba(108, 117, 125, 0.1);
    border-left-color: #6c757d;
    border-color: #dee2e6;
}

.individual-talk.past-talk:hover {
    opacity: 0.7;
    background: rgba(108, 117, 125, 0.15);
    transform: translateX(1px);
}

.individual-talk.current-talk {
    background: rgba(255, 193, 7, 0.15);
    border-left-color: #ffc107;
    border-color: #ffc107;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    animation: livePulse 3s infinite;
}

@keyframes livePulse {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
        border-color: #ffc107;
    }
    50% { 
        box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6);
        border-color: #ff8c00;
    }
}

@keyframes conflictPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.talk-title {
    font-size: 14px;
    font-weight: 600;
    color: #343a40;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.talk-authors {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 6px;
    line-height: 1.2;
}

.talk-time {
    font-size: 11px;
    color: #007bff;
    font-weight: 700;
    background: rgba(0, 123, 255, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    align-self: flex-start;
}

.talk-selection-indicator {
    position: absolute;
    right: -4px;
    top: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.5);
    z-index: 100;
    border: 2px solid white;
}

.individual-talk.selected .talk-selection-indicator {
    display: flex;
}

.individual-talk:not(.selected) {
    position: relative;
}

.individual-talk:not(.selected)::after {
    content: '+';
    position: absolute;
    right: -4px;
    top: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 100;
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.4);
}

.individual-talk:not(.selected):hover::after {
    opacity: 1;
}

/* Multiple rooms side by side */
.timeline-event.multi-room {
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    gap: 5px;
}

.room-column {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    padding: 8px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .timeline-grid {
        grid-template-columns: 100px 1fr;
    }
    
    .import-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .current-talk-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .current-talk, .next-talk {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .schedule-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .schedule-controls {
        justify-content: center;
    }
    
    .timeline-grid {
        grid-template-columns: 80px 1fr;
    }
    
    .time-slot {
        height: 50px;
        font-size: 11px;
        padding: 5px;
    }
    
    .timeline-event {
        padding: 6px;
    }
    
    .event-title {
        font-size: 11px;
    }
    
    .individual-talk {
        padding: 3px 5px;
    }
    
    .talk-title {
        font-size: 10px;
    }
}