/* Reset and Base Styles */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif; /* Cleaner font stack */
    line-height: 1.7; /* Slightly more spacing */
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Lighter background */
    color: #495057; /* Softer text color */
}

.container {
    width: 85%; /* Slightly wider */
    max-width: 1100px; /* Max width for large screens */
    margin: 20px auto; /* Add top/bottom margin */
    overflow: hidden;
}

/* Custom Variables and Animations */
:root {
    --primary: #4a69bd;
    --accent: #1e90ff;
    --bg-color: #f8f9fa;
    --text-color: #495057;
    --heading-color: #343a40;
    --header-gradient: linear-gradient(135deg, #4a69bd, #1e90ff);
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.fade-in {
    animation: fadeIn 1s ease both;
}

.btn {
    display: inline-block;
    padding: 0.6em 1.2em;
    background-color: var(--accent);
    color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #187bcd;
    transform: translateY(-2px);
}

/* Header */
header {
    background: var(--header-gradient);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;
    color: #ffffff;
    padding: 25px 0; /* Adjusted padding */
    min-height: auto; /* Remove min-height */
    border-bottom: #1e90ff 4px solid; /* Slightly lighter blue accent */
    text-align: center; /* Center align content */
}

header h1 {
    margin: 0;
    font-size: 2.2em; /* Larger title */
    font-weight: 500; /* Slightly lighter weight */
}

/* Navigation */
nav {
    background: #ffffff; /* White background */
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid #dee2e6; /* Lighter border */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
    margin-bottom: 30px; /* Space below nav */
}

nav ul {
    padding: 0;
    margin: 0; /* Remove default margin */
    list-style: none;
}

nav ul li {
    display: inline;
    padding: 0 25px; /* Increased spacing */
}

nav a {
    color: #4a69bd; /* Match header blue */
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    transition: color 0.3s ease; /* Smooth hover transition */
}

nav a:hover, nav a:focus {
    color: var(--accent);
    background-color: rgba(30,144,255,0.1);
    border-radius: 4px;
    text-decoration: none;
}

/* Main Content */
main {
    padding: 30px; /* More padding */
    background: #ffffff;
    margin-top: 0; /* Removed top margin as nav has bottom margin */
    border-radius: 5px; /* Slightly rounded corners */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* Subtle shadow */
}

/* Footer */
footer {
    text-align: center;
    padding: 25px;
    margin-top: 40px; /* More space above footer */
    color: #ffffff;
    background-color: #4a69bd; /* Match header blue */
    font-size: 0.9em;
}

/* Headings */
h1, h2, h3 {
    color: #343a40; /* Darker grey for headings */
    margin-bottom: 15px;
}

h2 {
    border-bottom: 1px solid #eee; /* Separator line for H2 */
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0; /* More space around table */
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); /* Subtle shadow on table */
}

th, td {
  border: 1px solid #dee2e6; /* Lighter border */
  padding: 12px 15px; /* More padding */
  text-align: left;
}

th {
  background-color: #e9ecef; /* Light grey header */
  color: #495057;
  font-weight: 600; /* Bolder header text */
}

tbody tr:nth-of-type(even) {
    background-color: #f8f9fa; /* Subtle striping */
}

tbody tr:hover {
    background-color: #e9ecef; /* Hover effect */
}

/* Links */
a {
    color: #1e90ff; /* Accent blue for links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Utilities (if needed) */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }

/* Basic styling for tables if needed later */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f2f2f2;
}

/* Schedule Styles */
.schedule {
    margin: 20px 0;
}

.schedule-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.schedule-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.schedule-item.expanded {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.talk-item {
    cursor: pointer;
}

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

.break-item {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.break-item .schedule-header {
    background-color: #e9ecef;
}

.schedule-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.time {
    font-weight: 600;
    color: #4a69bd;
    font-size: 0.95em;
    min-width: 120px;
}

.speaker-title {
    flex: 1;
    margin: 0 20px;
}

.speaker {
    font-weight: 600;
    color: #343a40;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.title {
    color: #495057;
    font-size: 1em;
    line-height: 1.4;
}

.expand-icon {
    color: #4a69bd;
    font-size: 1em;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    min-width: 30px;
    text-align: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2px 6px;
    user-select: none;
}

.expand-icon:hover {
    background-color: #e9ecef;
    border-color: #4a69bd;
    transform: scale(1.05);
}

.schedule-item.expanded .expand-icon {
    background-color: #4a69bd;
    color: white;
    border-color: #4a69bd;
}

.schedule-details {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
    animation: fadeIn 0.3s ease;
}

.schedule-details h4 {
    color: #4a69bd;
    margin: 20px 0 10px 0;
    font-size: 1em;
    font-weight: 600;
}

.schedule-details p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: #495057;
}

.abstract, .bio {
    margin-bottom: 15px;
}

.bio {
    margin-bottom: 0;
}

/* Non-expandable talk items */
.schedule-item.talk-item:not([onclick]) {
    cursor: default;
}

.schedule-item.talk-item:not([onclick]):hover .schedule-header {
    background-color: inherit;
}

.schedule-item.talk-item:not([onclick]):hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Empty expandable items styling */
.schedule-item.empty-expandable {
    border-color: #b8d4f0;
    background-color: #f7fbff;
}

.schedule-item.empty-expandable .expand-icon {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #64b5f6;
}

.schedule-item.empty-expandable .expand-icon:hover {
    background-color: #bbdefb;
    border-color: #64b5f6;
    color: #42a5f5;
}

.schedule-item.empty-expandable.expanded .expand-icon {
    background-color: #64b5f6;
    border-color: #64b5f6;
    color: white;
}

.schedule-item.empty-expandable .schedule-details {
    background-color: #f3f9ff;
    border-top-color: #bbdefb;
}

.schedule-item.empty-expandable .no-content {
    color: #64b5f6;
    font-style: italic;
}

.schedule-item.empty-expandable:hover {
    box-shadow: 0 4px 8px rgba(100, 181, 246, 0.2);
}

/* Responsive design for schedule */
@media (max-width: 768px) {
    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .time {
        margin-bottom: 10px;
        min-width: auto;
    }
    
    .speaker-title {
        margin: 0 0 10px 0;
        width: 100%;
    }
    
    .expand-icon {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .schedule-details {
        padding: 15px;
    }
}