/* 基础变量 */
:root {
    --primary-color: #009688;
    --text-color: #333;
    --border-color: #e6e6e6;
    --bg-color: #f5f5f5;
    --nav-height: 50px;
    --spacing: 10px;
    --border-radius: 8px;
    --box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* 基础样式 */
html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    height: 100%;
    overflow-x: hidden;
    color: var(--text-color);
}

/* 导航栏样式 */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--primary-color);
    color: #fff;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-shadow: var(--box-shadow);
}

.nav-title,.nav-titles {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

.nav-menu, .nav-version {
    width: 40px;
    text-align: center;
    cursor: pointer;
}

/* 抽屉菜单样式 */
.drawer-menu {
    position: fixed;
    top: 0;
    left: -80%;
    width: 80%;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.drawer-menu.active {
    left: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.drawer-overlay.active {
    display: block;
}

.drawer-header {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 15px;
    background: var(--primary-color);
    color: #fff;
}

.drawer-content {
    padding: 10px 0;
}

.drawer-item {
    padding: 12px 15px;
    cursor: pointer;
}

.drawer-item:active {
    background: rgba(0,0,0,0.05);
}

/* 版本选择弹窗样式 */
.version-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 300px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1002;
}

.version-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.version-list {
    max-height: 300px;
    overflow-y: auto;
}

.version-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.version-item:last-child {
    border-bottom: none;
}

.version-item:active {
    background: rgba(0,0,0,0.05);
}

.version-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* 首页特定样式 */
.index-content {
    padding: 15px;
    margin-top: var(--nav-height);
}

.index-search-box {
    margin-bottom: 15px;
}

.index-version-list {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.index-version-list .hove {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.index-version-list .hove:last-child {
    border-bottom: none;
}

.index-version-list .hove:active {
    background: rgba(0,0,0,0.05);
}

/* 搜索区域样式 */
.search-area {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    padding: 10px;
    background: #fff;
    box-shadow: var(--box-shadow);
    z-index: 999;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
}

/* 内容区域样式 */
.main-content {
    margin-top: calc(var(--nav-height) + 55px);
    padding: 10px;
}

.content-tabs {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: var(--box-shadow);
}

.tab-header {
    display: flex;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    color: var(--text-color);
    font-size: 14px;
    position: relative;
    cursor: pointer;
}

.tab-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.tab-item.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
    padding: 15px;
    background: #fff;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    height: calc(100vh - var(--nav-height) - 180px);
    min-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-content.active {
    display: block;
}

/* 列表项样式 */
.hove {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.hove:last-child {
    border-bottom: none;
}

.hove:hover, .hove:active {
    background: rgba(0,0,0,0.02);
}

/* 卡片样式 */
.info-card {
    background: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.card-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--primary-color);
}

.card-content {
    padding: 15px;
}

/* 搜索建议样式 */
.suggestion-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover, .suggestion-item:active {
    background-color: #f5f5f5;
}

.suggestion-item.selected {
    background-color: #e6e6e6;
}

/* 无结果提示 */
.no-result {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* 响应式调整 */
@media screen and (max-height: 600px) {
    .tab-content {
        height: calc(100vh - var(--nav-height) - 150px);
        min-height: 250px;
    }
}

@media screen and (max-height: 500px) {
    .tab-content {
        height: calc(100vh - var(--nav-height) - 120px);
        min-height: 200px;
    }
}