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

body {
    font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: #000000;
}

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

/* Header */
header {
    background: #000000;
    color: white;
    padding: 2rem 0;
    border-bottom: 1px solid #252222;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.7;
    color: #cccccc;
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 300px);
}

/* Search Section */
.search-section {
    background: #0d0d0d;
    padding: 2rem;
    border-radius: 0;
    border: 1px solid #252222;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#searchInput {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
    border: 1px solid #555555;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    transition: all 0.25s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #a1186a;
    background: #0d0d0d;
}

#searchInput::placeholder {
    color: #666666;
}

#searchButton {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: transparent;
    color: white;
    border: 1px solid #555555;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

#searchButton:hover {
    background: #a1186a;
    color: #ffffff;
    border-color: #a1186a;
}

#searchButton:active {
    background: #8a1459;
}

/* Filters */
.filters {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    color: #888888;
    font-size: 0.95rem;
    font-weight: 500;
}

.semester-filters {
    margin-bottom: 1rem;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    color: #cccccc;
    transition: color 0.25s ease;
}

.filters label:hover {
    color: #a1186a;
}

.filters input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filters input.checkbox-avc185 {
    accent-color: #D904A0;
}

.filters input.checkbox-avc200 {
    accent-color: #04B2D9;
}

.filters input.checkbox-avc240 {
    accent-color: #590242;
}

.filters input.checkbox-avc287 {
    accent-color: #F5A623;
}

.filters input.checkbox-semester {
    accent-color: #a1186a;
}

/* Course Links */
.course-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #252222;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.course-links-label {
    color: #888888;
    font-size: 0.95rem;
}

.course-link {
    color: #4a9eff;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid #4a9eff;
    border-radius: 4px;
    transition: all 0.25s ease;
}

.course-link:hover {
    background: #4a9eff;
    color: #000000;
}

/* Week Links */
.week-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.week-links-course {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.week-label {
    color: #666;
    font-size: 0.8rem;
    margin-right: 0.15rem;
}

.week-links-course a {
    color: #4a9eff;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid #333;
    min-width: 1.8rem;
    text-align: center;
    transition: all 0.25s ease;
}

.week-links-course a:hover {
    background: #4a9eff;
    color: #000;
    border-color: #4a9eff;
}

.course-label {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    color: #fff;
}

.course-label.avc185 {
    background: #D904A0;
}

.course-label.avc200 {
    background: #10B981;
}

.course-label.avc287 {
    background: #F59E0B;
    color: #000;
}

/* Stats */
.stats {
    background: #0d0d0d;
    padding: 1rem 1.5rem;
    border-radius: 0;
    border: 1px solid #252222;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #999999;
}

/* Results */
.results {
    background: #0d0d0d;
    border-radius: 0;
    border: 1px solid #252222;
    overflow: hidden;
}

.loading {
    padding: 3rem;
    text-align: center;
    color: #666666;
    font-size: 1.1rem;
}

.no-results {
    padding: 3rem;
    text-align: center;
}

.no-results h3 {
    color: #a1186a;
    margin-bottom: 1rem;
}

.no-results p {
    color: #999999;
}

/* Result Item */
.result-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid #252222;
    transition: all 0.25s ease;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #1a1a1a;
    border-color: #555555;
}

.result-thumbnail {
    width: 320px;
    height: 180px;
    object-fit: cover;
    border: 1px solid #252222;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.course-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    border: 1px solid;
}

.course-badge.avc185 {
    background: #D904A0;
    border-color: #D904A0;
}

.course-badge.avc200 {
    background: #04B2D9;
    border-color: #04B2D9;
}

.course-badge.avc240 {
    background: #590242;
    border-color: #590242;
}

.course-badge.avc287 {
    background: #F5A623;
    border-color: #F5A623;
}

.result-date {
    color: #999999;
    font-size: 0.9rem;
}

.result-title {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.result-excerpt {
    font-size: 0.95rem;
    color: #999999;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.result-excerpt mark {
    background-color: #a1186a;
    color: #ffffff;
    padding: 0.15rem 0.3rem;
    font-style: normal;
    font-weight: 500;
}

.result-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: white;
    text-decoration: none;
    border: 1px solid #555555;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.result-link:hover {
    background: #a1186a;
    color: #ffffff;
    border-color: #a1186a;
    text-decoration: underline;
}

.result-link:active {
    background: #8a1459;
}

.timestamp {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Footer */
footer {
    background: #000000;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    border-top: 1px solid #252222;
}

footer p {
    margin: 0.5rem 0;
    color: #999999;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
    }

    #searchButton {
        width: 100%;
    }

    .filters {
        flex-direction: column;
        gap: 1rem;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-item {
        flex-direction: column;
    }

    .result-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
