:root {
    --primary-color: #0366d6;
    --background-color: #f5f5f5;
    --card-background: white;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--background-color);
    color: #333;
}

h1 {
    color: #222;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 0.5em;
    margin-bottom: 0.8em;
}

h2 {
    color: #333;
    margin-top: 2em;
    margin-bottom: 0.6em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.4em;
    font-size: 1.4em;
    font-weight: 600;
}

h3 {
    color: #444;
    margin-top: 1.8em;
    margin-bottom: 0.5em;
    font-size: 1.15em;
    font-weight: 600;
    padding-left: 0;
}

.category-description {
    color: #666;
    font-style: italic;
    margin-top: -0.3em;
    margin-bottom: 1em;
    font-size: 0.95em;
}

.pdf-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

dt { font-weight: 500; }
dd + dt { padding-top: 10px; }

.pdf-item, .lecture-block {
    background: var(--card-background);
    margin: 10px 0;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: box-shadow 0.2s ease;
}

.lecture-block {
    font-weight: 500;
    color: #555;
    margin: 5px 0;
    padding: 10px 20px;
}

.lecture-block > ul { 
    display: flex; 
    flex-grow: 1;
    align-items: flex-start; 
    flex-wrap: wrap; 
    gap: 20px; 
    padding-left: 0; 
    list-style: none; 
    margin-left: 10px;
    margin-top: 0;
    margin-bottom: 0;
}

.lecture-block > ul > li > a { 
    text-decoration: none; 
    color: var(--primary-color);
    font-weight: 500;
}

.lecture-block > ul > li { 
    padding-left: 0;
    margin-left: 0;
}


.lecture-block > ul > li > a:hover { 
    text-decoration: underline;
}

.lecture-block:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.pdf-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.pdf-name {
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    flex-grow: 1;
    min-width: 200px;
    font-size: 1em;
}

.pdf-name:hover {
    text-decoration: underline;
}

.pdf-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pdf-date {
    color: #666;
    font-size: 0.9em;
}

.pdf-history-link {
    color: #666;
    font-size: 0.85em;
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.2s;
}

.pdf-history-link:hover {
    background-color: #f0f0f0;
    border-color: #999;
    text-decoration: none;
}

.pdf-size {
    color: #666;
    font-size: 0.9em;
}

.version-badge {
    background-color: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    margin-left: 10px;
}

.old-version-badge {
    background-color: #6c757d;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    margin-left: 10px;
}

.footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.category {
    margin-bottom: 30px;
}

.empty-category {
    color: #999;
    font-style: italic;
    padding: 10px;
}

div.footer > div { margin-top: 0.5em; }
div.footer > div > * { display: inline; font-style: italic; }
div.footer > div > * > span { margin: 0 0.1em 0 0.1em; }

/* Responsive design for smartphones */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .pdf-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pdf-name {
        min-width: 100%;
        margin-bottom: 5px;
    }

    .pdf-info {
        width: 100%;
        justify-content: flex-start;
    }
    div.footer { text-align: left; }
    div.footer > div > * > span { margin: 0 0 0 1.8em; }
    div.footer > div > address > span { display: block; }
}

