/* ==========================================
   HK REPOSITORY - SHARED STYLESHEET
   Academic Archive Theme
   ========================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Courier New", Courier, monospace;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border: 1px solid #ccc;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    font-size: 13px;
}

.top-bar a {
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

.top-bar a:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.top-bar a.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Typography */
h1 {
    font-size: 20px;
    font-weight: normal;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

h2 {
    font-size: 16px;
    font-weight: normal;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    margin: 25px 0 15px 0;
}

h3 {
    font-size: 14px;
    font-weight: bold;
    margin: 20px 0 10px 0;
}

p {
    margin-bottom: 10px;
    font-size: 14px;
}

.subtitle {
    font-size: 12px;
    color: #666;
    margin-bottom: 20px;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navigation */
.nav {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 12px;
}

.nav a {
    margin-right: 15px;
}

.nav .lang-switch {
    float: right;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 12px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #0066cc;
}

/* File/Event Listing */
.file-list, .event-list {
    list-style: none;
    padding: 0;
}

.file-list li, .event-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

.file-list li:last-child, .event-list li:last-child {
    border-bottom: none;
}

.event-list .event-date {
    display: inline-block;
    width: 100px;
    color: #666;
    font-size: 12px;
}

.event-list .event-id {
    display: inline-block;
    width: 80px;
    color: #999;
    font-size: 11px;
}

/* Info Box */
.info-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 20px 0;
    font-size: 13px;
}

.info-box dt {
    font-weight: bold;
    float: left;
    width: 120px;
    clear: left;
}

.info-box dd {
    margin-left: 130px;
    margin-bottom: 8px;
}

/* Media Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.gallery-item {
    border: 1px solid #ddd;
    padding: 5px;
    background: #fafafa;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item .caption {
    font-size: 11px;
    color: #666;
    padding: 5px 0;
    text-align: center;
}

/* Timeline */
.timeline {
    border-left: 2px solid #ccc;
    margin-left: 10px;
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #eee;
}

.timeline-item:before {
    content: "";
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: #666;
    border-radius: 50%;
}

.timeline-item .time {
    font-weight: bold;
    font-size: 13px;
    color: #333;
    margin-bottom: 5px;
}

.timeline-item .content {
    font-size: 13px;
    color: #444;
}

/* Sources Table */
.sources-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 15px 0;
}

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

.sources-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.sources-table tr:nth-child(even) {
    background: #fafafa;
}

/* Warning/Notice */
.notice {
    background: #fff9e6;
    border: 1px solid #e6d9a6;
    padding: 15px;
    margin: 20px 0;
    font-size: 12px;
}

.notice.archived {
    background: #f0f0f0;
    border-color: #ccc;
}

/* Footer */
.footer {
    margin-top: 40px;
    font-size: 11px;
    color: #888;
    border-top: 1px solid #ccc;
    padding-top: 15px;
}

.footer p {
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .nav .lang-switch {
        float: none;
        display: block;
        margin-top: 10px;
    }

    .info-box dt {
        float: none;
        width: auto;
    }

    .info-box dd {
        margin-left: 0;
        margin-bottom: 15px;
    }

    .event-list .event-date,
    .event-list .event-id {
        display: block;
        width: auto;
    }
}
