/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #000000; /* 纯黑色背景保护OLED */
    color: #e0e0e0; /* 柔和的白色文字 */
    overflow: hidden;
}

/* 容器样式 */
.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #000000; /* 容器也使用纯黑色 */
}

/* 头部样式 */
.header {
    background-color: #1a1a1a; /* 深灰色头部 */
    color: #e0e0e0; /* 柔和的白色文字 */
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* 加深阴影 */
    border-bottom: 1px solid #333; /* 添加边框分隔 */
}

/* 分类导航样式 */
.category-nav {
    background-color: #111111; /* 深灰色导航栏 */
    padding: 15px 0;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid #333; /* 边框分隔 */
    display: flex;
    gap: 15px;
    align-items: center;
    padding-left: 20px;
    padding-right: 20px;
}

.category-item {
    padding: 10px 20px;
    margin-right: 10px;
    background-color: #222222; /* 导航项背景色 */
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    color: #b0b0b0; /* 导航项文字颜色 */
    border: 2px solid transparent;
    display: inline-block;
    min-width: 100px;
    text-align: center;
}

.category-item:hover,
.category-item:focus,
.category-item.active,
.category-item.focused {
    background-color: #333333; /* 悬停时的背景色 */
    color: #ffffff; /* 悬停时的文字颜色 */
    border-color: #555555; /* 悬停时的边框颜色 */
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3); /* 添加柔和的发光效果 */
}

/* 内容区域样式 */
.content {
    flex: 1;
    display: flex;
    overflow: hidden;
    background-color: #000000; /* 内容区域背景色 */
}

/* 应用列表样式 */
.app-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #000000; /* 应用列表背景色 */
}

/* 应用网格布局 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

/* 应用卡片样式 */
.app-card {
    background-color: #111111; /* 应用卡片背景色 */
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-card:hover,
.app-card:focus,
.app-card.focused {
    background-color: #222222; /* 悬停时的背景色 */
    border-color: #555555; /* 悬停时的边框颜色 */
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.2); /* 柔和的发光效果 */
}

/* 应用头部样式 */
.app-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 应用图标样式 */
.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    background-color: transparent; /* 透明背景，让图标直接显示 */
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* 应用信息样式 */
.app-info {
    flex: 1;
    min-width: 0;
}

/* 应用名称样式 */
.app-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff; /* 应用名称颜色 */
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 应用元信息样式 */
.app-meta {
    font-size: 13px;
    color: #888888; /* 元信息颜色 */
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 应用描述样式 */
.app-desc {
    font-size: 14px;
    color: #cccccc; /* 应用描述颜色 */
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* 应用详情样式 */
.app-detail {
    width: 50%;
    background-color: #111111; /* 应用详情背景色 */
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #333333;
    display: none;
}

/* 加载状态样式 */
.loading,
.no-data {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 20px;
    color: #888888; /* 加载状态颜色 */
}

/* 详情区域样式 */
.detail-section {
    background-color: #1a1a1a; /* 详情区域背景色 */
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

/* 详情信息容器样式 */
.detail-info-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 详情标题包装器样式 */
.detail-title-wrapper {
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    text-align: center;
}

/* 详情内容包装器样式 */
.detail-content-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 应用图标详情样式 */
.app-icon-detail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #333;
}

/* 详情图标样式 */
.detail-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* 详情信息包装器样式 */
.detail-info-wrapper {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

/* 详情下载容器样式 */
.detail-download-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 详情标题样式 */
.detail-title {
    font-size: 24px;
    font-weight: bold;
    color: #e0e0e0; /* 详情标题颜色 */
    margin-bottom: 0;
    text-align: center;
    padding-bottom: 0;
}

/* 详情信息样式 */
.detail-info {
    display: flex;
    margin-bottom: 10px;
    font-size: 18px;
    color: #e0e0e0; /* 详情信息颜色 */
    align-items: center;
}

/* 详情标签样式 */
.detail-label {
    font-weight: bold;
    color: #aaaaaa; /* 详情标签颜色 */
    margin-right: 10px;
    min-width: 120px;
    text-align: right;
}

/* 详情值样式 */
.detail-value {
    color: #ffffff; /* 详情值颜色 */
    flex: 1;
    text-align: left;
}

/* 详情描述样式 */
.detail-desc {
    font-size: 16px;
    color: #cccccc; /* 详情描述颜色 */
    line-height: 1.6;
    margin-top: 10px;
}

/* 详情截图样式 */
.detail-screenshots {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

/* 截图样式 */
.screenshot {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #333333;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #000000;
    display: block;
    margin: 0 auto;
}

.screenshot:hover {
    transform: scale(1.05);
    border-color: #555555;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

/* 3D轮播样式 */
.snapShotWrap {
    position: relative;
    overflow: visible;
    margin: 0 auto;
    background-color: #000000;
    border-radius: 8px;
    border: 2px solid #333333;
    margin-top: 15px;
    width: 100%;
    max-width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snapShotCont {
    position: relative;
    overflow: visible;
    width: 100%;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.snopshot {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snopshot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.elementOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    transition: all 0.3s ease;
}

/* 轮播导航按钮样式 */
.snap-shot-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    border-radius: 4px;
}

.snap-shot-btn:hover {
    opacity: 1;
    background-color: rgba(50, 50, 50, 0.9);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.snap-shot-btn.prev {
    left: 10px;
}

.snap-shot-btn.next {
    right: 10px;
}

.snap-shot-btn i {
    display: block;
    width: 20px;
    height: 20px;
    border-top: 3px solid #ffffff;
    border-right: 3px solid #ffffff;
    transition: all 0.3s ease;
}

.snap-shot-btn.prev i {
    transform: rotate(-135deg);
}

.snap-shot-btn.next i {
    transform: rotate(45deg);
}

.snap-shot-btn:hover i {
    border-color: #007bff;
}

/* 轮播容器样式 */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000000;
    border: 2px solid #333333;
    margin-top: 15px;
    height: 400px;
    min-height: 300px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 轮播样式 */
.carousel {
    display: flex;
    transition: transform 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* 轮播项样式 */
.carousel-item {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background-color: #000000;
}

/* 轮播按钮样式 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: 2px solid #555555;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: rgba(50, 50, 50, 0.9);
    border-color: #777777;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
}

.carousel-btn-left {
    left: 10px;
}

.carousel-btn-right {
    right: 10px;
}

/* 轮播指示器样式 */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.carousel-indicator.active,
.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 键盘导航提示样式 */
.key-hint {
    background-color: rgba(0, 0, 0, 0.9); /* 键盘提示背景色 */
    padding: 10px 20px;
    font-size: 16px;
    color: #cccccc; /* 键盘提示文字颜色 */
    text-align: left;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-top: 1px solid #333;
}

/* 页脚样式 */
.footer {
    background-color: #111;
    color: #999;
    text-align: center;
    padding: 15px;
    font-size: 12px;
    border-top: 1px solid #333;
    margin-top: auto;
}

/* 免责声明样式 */
.disclaimer {
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.5;
    padding: 0 20px;
    text-align: justify;
}

/* 下载按钮样式 */
.download-button {
    display: inline-block;
    background-color: #333333; /* 下载按钮背景色 */
    color: #ffffff; /* 下载按钮文字颜色 */
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid #555555;
    cursor: pointer;
}

.download-button:hover,
.download-button:focus,
.download-button.focused {
    background-color: #444444; /* 悬停时的背景色 */
    border-color: #666666;
    transform: scale(1.05);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
}

/* 小下载按钮样式（用于其他版本） */
.download-button-small {
    display: inline-block;
    background-color: #333333;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid #555555;
    cursor: pointer;
}

.download-button-small:hover,
.download-button-small:focus,
.download-button-small.focused {
    background-color: #444444;
    border-color: #666666;
    transform: scale(1.05);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
}

/* 其他版本列表样式 */
.other-versions-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 单个版本项样式 */
.other-version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #222222;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.other-version-item:hover,
.other-version-item:focus,
.other-version-item.focused {
    background-color: #333333;
    border-color: #555555;
    transform: scale(1.02);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.2);
}

/* 版本名称样式 */
.version-name {
    font-size: 18px;
    font-weight: bold;
    color: #e0e0e0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 15px;
    flex: 1;
}

/* 响应式设计 */
/* 展开状态的应用详情 */
.app-detail.expanded {
    display: block;
}

@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }
    
    .app-list {
        width: 100%;
    }
    
    .app-detail {
        width: 100%;
        border-left: none;
        border-top: 1px solid #333333;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* 帮助中心样式 */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.help-card {
    background-color: #111111;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: block;
    text-decoration: none;
    color: inherit;
}

.help-card:hover,
.help-card:focus,
.help-card.focused {
    background-color: #222222;
    border-color: #555555;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.2);
}

.help-card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.help-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.help-card-content h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffffff;
}

.help-card-content p {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 15px;
    line-height: 1.5;
}

.help-meta {
    font-size: 14px;
    color: #888888;
    display: block;
}

/* Markdown渲染样式 */
.markdown-content {
    color: #e0e0e0;
    line-height: 1.6;
}

.markdown-content h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #ffffff;
}

.markdown-content h2 {
    font-size: 24px;
    margin: 20px 0 15px 0;
    color: #ffffff;
}

.markdown-content h3 {
    font-size: 20px;
    margin: 15px 0 10px 0;
    color: #ffffff;
}

.markdown-content p {
    margin-bottom: 15px;
    color: #cccccc;
}

.markdown-content ul,
.markdown-content ol {
    margin: 15px 0;
    padding-left: 25px;
    color: #cccccc;
}

.markdown-content li {
    margin-bottom: 8px;
    position: relative;
}

.markdown-content strong {
    color: #ffffff;
    font-weight: bold;
}

/* 可复制链接样式 */
.copyable-link {
    display: inline-flex;
    align-items: center;
    background-color: #222222;
    border: 1px solid #444444;
    border-radius: 5px;
    padding: 5px 10px;
    margin: 0;
    word-break: break-all;
    vertical-align: middle;
}

.link-text {
    flex: 1;
    color: #cccccc;
    font-family: monospace;
    margin-right: 10px;
    font-size: 14px;
}

.copy-btn {
    background-color: #333333;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 5px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid #555555;
}

.copy-btn:hover,
.copy-btn:focus,
.copy-btn.focused {
    background-color: #444444;
    transform: scale(1.05);
    outline: 2px solid #555555;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
}

/* 适配TV遥控器导航 */
.category-item.focused,
.app-card.focused,
.help-card.focused,
.download-button.focused,
.download-button-small.focused,
.other-version-item.focused,
.copy-btn.focused {
    outline: 2px solid #555555;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #111111;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}