/* MiDashengLM-Gen Demo Gallery — Academic Style */

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

body {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.8;
    color: #1a1a1a;
    background: #ffffff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 40px 0 20px;
}

.hero h1 {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.hero .subtitle {
    font-size: 20px;
    font-style: italic;
    color: #444;
    line-height: 1.5;
    margin-bottom: 20px;
}

.hero .authors {
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

.hero .affiliation {
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
}

.hero .links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero .links a {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.hero .links a:hover {
    border-bottom-color: #0066cc;
}

/* Sections */
hr {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 40px 0;
}

section {
    margin-top: 40px;
}

section h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
}

section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
}

section p {
    margin-bottom: 14px;
}

/* Highlights */
.highlights {
    list-style: none;
    padding-left: 0;
}

.highlights li {
    padding: 6px 0 6px 20px;
    position: relative;
    font-size: 15px;
    line-height: 1.7;
}

.highlights li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #666;
}

/* Architecture figure */
.figure {
    text-align: center;
    margin: 20px 0;
}

.arch-img {
    max-width: 70%;
    height: auto;
}

.figure figcaption {
    font-size: 14px;
    color: #888;
    font-style: italic;
    margin-top: 8px;
}

/* Component table */
.component-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 15px;
}

.component-table th {
    text-align: left;
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 2px solid #ccc;
    background: #fafafa;
}

.component-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
}

.component-table td:first-child {
    white-space: nowrap;
    font-weight: 600;
    color: #444;
    width: 30%;
}

#input-format .component-table td:first-child {
    width: 15%;
}

#input-format .component-table td:nth-child(2) {
    width: 35%;
}

/* Code block */
.code-block {
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    padding: 16px;
    overflow-x: auto;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    margin: 16px 0;
}

.code-block code {
    font-family: inherit;
}

/* Inline code */
code {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 14px;
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 2px;
    color: #333;
}

/* Demo sections */
.demo-section {
    margin-bottom: 40px;
}

.demo-section h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.demo-section .section-desc {
    font-size: 15px;
    color: #666;
    margin-bottom: 16px;
    font-style: italic;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

/* Demo card */
.demo-card {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    padding: 16px;
    transition: border-color 0.2s;
}

.demo-card.playing {
    border-left: 3px solid #0066cc;
}

/* Audio player */
.audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.play-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #0066cc;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.play-btn:hover {
    background: #0052a3;
}

.play-btn.playing {
    background: #cc3300;
}

.audio-bar {
    flex: 1;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.audio-progress {
    height: 100%;
    background: #0066cc;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    font-size: 12px;
    color: #888;
    font-family: monospace;
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
}

/* Caption fields */
.caption-main {
    font-size: 15px;
    margin-bottom: 10px;
    line-height: 1.6;
    color: #1a1a1a;
}

.caption-fields {
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.caption-field {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.field-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    width: 70px;
    flex-shrink: 0;
    padding-top: 2px;
    font-weight: 600;
}

.field-value {
    color: #333;
    flex: 1;
}

/* Tags */
.demo-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.demo-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    background: #e8e8e8;
    padding: 2px 8px;
    border-radius: 2px;
}

/* License */
.license {
    font-size: 14px;
    color: #888;
    margin-top: 8px;
}

/* Demo tabs */
.demo-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 20px;
}

.demo-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.demo-tab:hover {
    color: #0066cc;
}

.demo-tab.active {
    color: #1a1a1a;
    border-bottom-color: #0066cc;
    font-weight: 600;
}

/* Sub-filter bar */
.demo-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    min-height: 0;
}

.demo-filter:empty {
    display: none;
}

.filter-btn {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    padding: 4px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 2px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #0066cc;
    color: #0066cc;
}

.filter-btn.active {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* Demo section title (inside active container) */
.demo-section-title {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.demo-section-desc {
    font-size: 15px;
    color: #666;
    margin-bottom: 16px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px 16px 60px;
    }
    .hero h1 {
        font-size: 26px;
    }
    .hero .subtitle {
        font-size: 17px;
    }
    .demo-grid {
        grid-template-columns: 1fr;
    }
}
