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

html, body {
    height: 100%;
}

body {
    background-color: #c0c0c0;
    margin: 0;
    padding: 8px;
    font-family: "Consolas", "Microsoft YaHei", "微软雅黑", monospace, sans-serif;
    font-size: 13px;
    color: #000000;
    display: flex;
    flex-direction: column;
}

.main-split {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 4px;
}

.sidebar-section {
    width: 220px;
    min-width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.section {
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    background-color: #c0c0c0;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.section-title {
    margin: 0;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: bold;
    color: #ffffff;
    background-color: #008000;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    flex-shrink: 0;
    user-select: none;
}

.section_content {
    padding: 8px;
    overflow: auto;
    flex: 1;
}

.sidebar-content {
    padding: 2px;
}

.plugin-list {
    list-style: none;
}

.plugin-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    margin: 1px 0;
}

.plugin-item:hover {
    background-color: #d4d4d4;
}

.plugin-item.active {
    background-color: #008000;
    color: #ffffff;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
}

.plugin-icon {
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eeeeee;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
    flex-shrink: 0;
}

.plugin-item.active .plugin-icon {
    background-color: #008000;
    border: 1px solid #FFFFFF;
    box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #000000;
}

.plugin-info {
    flex: 1;
    min-width: 0;
}

.plugin-name {
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plugin-category {
    font-size: 11px;
    color: #666666;
}

.plugin-item.active .plugin-category {
    color: #C0C0FF;
}

.plugin-arrow {
    font-size: 10px;
    color: #808080;
    opacity: 0;
}

.plugin-item.active .plugin-arrow {
    opacity: 1;
    color: #FFFFFF;
}

#welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

#welcome-message h2 {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 8px;
}

#welcome-message p {
    color: #666666;
    font-size: 13px;
    margin-bottom: 24px;
}

.welcome-tips {
    display: flex;
    gap: 12px;
}

.tip-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background-color: #eeeeee;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    font-size: 13px;
    color: #000000;
}

.tip-card:hover {
    background-color: #d4d4d4;
}

.tip-icon {
    font-size: 24px;
}

/* ===== 插件内容样式 ===== */

.plugin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #808080;
}

.plugin-header-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eeeeee;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
    font-weight: bold;
    font-size: 18px;
}

.plugin-title {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
}

.plugin-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    background-color: #c0c0c0;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    color: #000000;
    margin-top: 2px;
}

.plugin-description {
    margin-bottom: 12px;
    line-height: 1.5;
}



.p-section {
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    background-color: #c0c0c0;
    padding: 0;
    margin-bottom: 10px;
}

.p-section .section-title {
    font-size: 12px;
}

.p-section .section_content {
    padding: 6px 8px;
}

.p-section table {
    width: 100%;
}

table {
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    background-color: #c0c0c0;
    border-collapse: separate;
    border-spacing: 1px;
}

th {
    background-color: #c0c0c0;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    padding: 4px 8px;
    font-weight: bold;
    text-align: left;
    font-size: 12px;
}

td {
    background-color: #eeeeee;
    border: 1px solid #808080;
    padding: 4px 8px;
    font-size: 12px;
}

.tips-box {
    background-color: #FFFFCC;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
    padding: 8px;
    margin: 8px 0;
    font-size: 12px;
}

.plugin-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

#content-area:has(.plugin-iframe) {
    padding: 0;
    overflow: hidden;
}

.plugin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 12px;
    color: #666666;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #808080;
    border-top: 2px solid #008000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.plugin-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 8px;
    text-align: center;
}

.error-icon {
    font-size: 32px;
    font-weight: bold;
    color: #800000;
}

.plugin-error h2 {
    font-size: 16px;
    color: #800000;
}

.plugin-error p {
    color: #666666;
    font-size: 13px;
}

/* ===== Windows Group Box 样式 ===== */
.win-group {
    border: 1px solid #808080;
    box-shadow:
        inset 1px 1px 0 #000000,
        inset -1px -1px 0 #FFFFFF;
    background-color: #c0c0c0;
    padding: 16px 8px 8px 8px;
    margin: 12px 0;
    position: relative;
}

.win-group-title {
    position: absolute;
    top: -9px;
    left: 8px;
    padding: 0 4px;
    background-color: #c0c0c0;
    font-size: 12px;
    font-weight: bold;
    color: #000000;
    user-select: none;
    white-space: nowrap;
}

/* ===== 插件卡片网格 ===== */
.plugin-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 8px;
}

.plugin-card {
    display: block;
    border: 1px solid #808080;
    box-shadow:
        inset 1px 1px 0 #FFFFFF,
        inset -1px -1px 0 #000000;
    background-color: #c0c0c0;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.plugin-card:hover {
    background-color: #d4d4d4;
}

.plugin-card:active {
    box-shadow:
        inset 1px 1px 0 #000000,
        inset -1px -1px 0 #FFFFFF;
}

.plugin-card-img {
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid #808080;
    background-color: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plugin-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.plugin-card-img-ph {
    font-size: 28px;
    font-weight: bold;
    color: #808080;
    user-select: none;
}

.plugin-card-body {
    padding: 6px 8px 8px 8px;
}

.plugin-card-name {
    font-size: 14px;
    font-weight: bold;
    color: #000000;
}

.plugin-card-cat {
    font-size: 12px;
    color: #666666;
    margin: 2px 0 5px 0;
}

.plugin-card-desc {
    font-size: 12px;
    color: #000000;
    line-height: 1.5;
}

.plugin-card-dim {
    opacity: 0.5;
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-family: inherit;
    background-color: #eeeeee;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    text-decoration: none;
    color: #000000;
    cursor: pointer;
}

.demo-btn:hover {
    background-color: #d4d4d4;
}

.demo-btn:active {
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
}

.footer {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: #808080;
    margin-top: 4px;
}

.footer a {
    color: #008000;
    text-decoration: underline;
}

.footer a:hover {
    color: #800080;
}

/* ===== 语言切换栏 ===== */
.lang-bar {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
    margin-bottom: 4px;
}

.lang-link {
    font-family: inherit;
    font-size: 11px;
    padding: 3px 10px;
    text-decoration: none;
    color: #000000;
    background-color: #c0c0c0;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    cursor: pointer;
    user-select: none;
}

.lang-link:hover {
    background-color: #d4d4d4;
}

.lang-link.active {
    background-color: #008000;
    color: #ffffff;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
}

.lang-link.active:hover {
    background-color: #008000;
}

.gh-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 13px;
    font-family: inherit;
    background-color: #eeeeee;
    border: 2px outset #ffffff;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    outline: 1px solid #000000;
    text-decoration: none;
    color: #000000;
    cursor: pointer;
}

.gh-btn:hover {
    background-color: #d4d4d4;
}

.gh-btn:active {
    background-color: #c0c0c0;
    border: 2px inset #808080;
    border-color: #808080 #FFFFFF #FFFFFF #808080;
}

.plugin-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    font-family: inherit;
    background-color: #eeeeee;
    border: 2px outset #ffffff;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    outline: 1px solid #000000;
    text-decoration: none;
    color: #000000;
    cursor: pointer;
}

.dl-btn:hover {
    background-color: #d4d4d4;
}

.dl-btn:active {
    background-color: #c0c0c0;
    border: 2px inset #808080;
    border-color: #808080 #FFFFFF #FFFFFF #808080;
}

/* ===== 内联样式抽离 ===== */
.plugin-header-content {
    flex: 1;
}

.feature-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.plugin-screenshot {
    max-width: 100%;
    height: auto;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
    background-color: #eeeeee;
    padding: 4px;
    margin: 4px 0;
}

.screenshot-caption {
    font-size: 11px;
    color: #666666;
    margin-top: 4px;
}

.audio-item {
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #FFFFFF, inset -1px -1px 0 #000000;
    background-color: #eeeeee;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-item-label {
    font-size: 12px;
    font-weight: bold;
    min-width: 30px;
}

.audio-player {
    flex: 1;
    height: 32px;
}

.demo-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.video-section-header {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 4px;
}

.video-section-mb {
    margin-bottom: 8px;
}

.manual-content {
    padding: 8px;
    background-color: #ffffff;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #FFFFFF;
    font-size: 13px;
    line-height: 1.6;
}

.manual-loading {
    color: #666666;
}

.audio-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.features-with-gui {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.features-gui-image {
    flex: 0 0 auto;
    width: 45%;
}

.features-gui-image img {
    width: 100%;
    height: auto;
}

.features-list-col {
    flex: 1;
    min-width: 0;
}

.audio-table {
    width: 100%;
}

.audio-table th {
    text-align: center;
    font-size: 12px;
}

.audio-table td {
    padding: 4px;
}

.audio-table .audio-item {
    margin: 0;
}

.audio-desc-cell {
    font-size: 12px;
    line-height: 1.5;
    vertical-align: middle;
}

.audio-desc-note {
    font-size: 11px;
    color: #808080;
}
