/* Base Styles */
pre, code {
    font-size: 16px;
}

html {
    font-size: 14px;
    line-height: 1.6em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: #0a0a0f;
    color: #e0e0e0;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1em;
}

sup, sub {
    vertical-align: baseline;
    position: relative;
    top: -0.4em;
    line-height: 1em;
}

sub {
    top: 0.4em;
}

.kicker,
.marker {
    font-size: 15px;
    font-weight: 600;
    color: rgba(224, 224, 224, 0.5);
}

/* Header */
.header {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0f23 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.teaser-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    opacity: 0.6;
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header h1 {
    font-size: 4.2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    color: #ffd700;
    line-height: 1.2;
}

.header .subtitle {
    font-size: 1.6rem;
    font-weight: 300;
    opacity: 0.95;
    margin-bottom: 2rem;
    color: #ff8c42;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.header .course-info {
    font-size: 1.2rem;
    opacity: 0.95;
    color: #e0e0e0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.6;
}

.header .course-info div {
    margin-bottom: 0.5rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section */
.section {
    padding: 40px 0;
    background: #0f0f17;
}

.section:nth-child(even) {
    background: #0a0a0f;
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: #00d4aa;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #00d4aa;
    padding-bottom: 0.5rem;
}

.section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ff8c42;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.section p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #c0c0c0;
}

.section ul {
    margin-left: 0;
    padding-left: 20px;
}

.section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #c0c0c0;
}

/* Navigation */
.nav {
    background: #1a1a2e;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav li {
    margin: 0 15px;
}

.nav a {
    color: #00d4aa;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav a:hover {
    background-color: #00d4aa;
    color: #0a0a0f;
    transform: translateY(-2px);
}

/* Course Details Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.course-card {
    background: #1a1a2e;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #00d4aa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card h3 {
    margin-top: 0;
    color: #00d4aa;
}

.course-card p, .course-card li {
    color: #c0c0c0;
}

/* Schedule */
.schedule {
    background: #0a0a0f;
    padding: 40px 0;
}

.schedule-placeholder {
    background: #1a1a2e;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed #00d4aa;
    margin: 20px 0;
}

.schedule-placeholder h3 {
    color: #00d4aa;
}

.schedule-placeholder p {
    color: #c0c0c0;
}

/* Footer */
.footer {
    background: #0a0a0f;
    color: #c0c0c0;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #333;
}

/* Buttons and Links */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #00d4aa 0%, #ff8c42 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 170, 0.4);
}

a {
    color: #00d4aa;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff8c42;
}

/* Schedule Table Styles */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.schedule-table-container {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 0;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.schedule-table-container h3 {
    color: #00d4aa;
    margin: 0;
    padding: 20px 25px 15px;
    border-bottom: 2px solid #00d4aa;
}

.table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #1a1a2e;
}

.schedule-table thead {
    position: sticky;
    top: 0;
    background: #0f0f23;
    z-index: 10;
}

.schedule-table th {
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    color: #00d4aa;
    border-bottom: 2px solid #00d4aa;
    white-space: nowrap;
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
    vertical-align: top;
    color: #c0c0c0;
    line-height: 1.4;
}

.schedule-table tbody tr:hover {
    background-color: rgba(0, 212, 170, 0.1);
}

/* Column-specific styling */
.week-col {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: #ff8c42;
}

.date-col {
    width: 80px;
    font-weight: 500;
    white-space: nowrap;
}

.topic-col {
    min-width: 200px;
    font-weight: 500;
    color: #e0e0e0;
}

.readings-col {
    min-width: 250px;
    font-size: 0.85rem;
    line-height: 1.3;
}

.readings-col strong {
    color: #00d4aa;
}

.readings-col em {
    color: #ff8c42;
}

.presenter-col {
    width: 100px;
    text-align: center;
    font-weight: 500;
}

.notes-col {
    min-width: 200px;
    font-size: 0.85rem;
    color: #b0b0b0;
}

/* Row type styling */
.break-row {
    background-color: rgba(255, 140, 66, 0.1);
}

.break-row td {
    color: #ff8c42;
    font-style: italic;
}

.presentation-row {
    background-color: rgba(0, 212, 170, 0.1);
}

.presentation-row .topic-col {
    color: #00d4aa;
    font-weight: 600;
}

.instructor-row .presenter-col {
    color: #ff8c42;
    font-weight: 600;
}

/* Scrollbar styling */
.table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #0a0a0f;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #00d4aa;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ff8c42;
}

/* Error styling */
.schedule-error {
    text-align: center;
    padding: 40px;
    color: #ff8c42;
}

.schedule-error h3 {
    color: #ff8c42;
    margin-bottom: 15px;
}

/* Responsive design for table and general */
@media (max-width: 768px) {
    .table-wrapper {
        max-height: 400px;
    }
    
    .schedule-table {
        font-size: 0.8rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 8px 6px;
    }
    
    .readings-col,
    .notes-col {
        min-width: 150px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .header .subtitle {
        font-size: 1.2rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .nav li {
        margin: 5px 0;
    }
}