* {
    -webkit-tap-highlight-color: transparent;
}

body {
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    padding: 12px;
}

header {
    padding: 12px 0;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav {
    display: flex;
    gap: 4px;
}

nav a {
    padding: 8px 14px;
    border-radius: 6px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h2 {
    margin: 0;
    font-size: 20px;
}

#refresh-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    min-height: 44px;
    white-space: nowrap;
    flex-shrink: 0;
}

#refresh-btn:hover {
    background: #f5f5f5;
}

.search-bar {
    margin-top: 12px;
}

#search {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    box-sizing: border-box;
    min-height: 44px;
    border-radius: 6px;
}

.app-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-icon-placeholder {
    background: #eee;
}

.app-name {
    margin: 0;
    font-size: 17px;
}

.app-desc {
    margin: 4px 0 0;
    font-size: 14px;
    color: #888;
}

.versions-title {
    cursor: pointer;
    font-size: 15px;
    color: #666;
    padding: 12px 0 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-user-select: none;
    user-select: none;
}

.versions-title::before {
    content: "▶ ";
    font-size: 10px;
    display: inline-block;
    margin-right: 4px;
    transition: transform 0.2s;
}

.versions-title.open::before {
    transform: rotate(90deg);
}

.versions-body {
    display: none;
}

.versions-body.open {
    display: block;
}

.version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    min-height: 44px;
}

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

.version-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 14px;
    flex: 1;
    min-width: 0;
}

.version-number {
    font-weight: bold;
}

.version-ios {
    color: #999;
    font-size: 12px;
}

.version-desc {
    color: #666;
    width: 100%;
    font-size: 13px;
}

.version-download {
    padding: 8px 18px;
    background: #007FFF;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    flex-shrink: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.version-download:hover {
    background: #0069d9;
}

.loading,
.empty,
.error {
    text-align: center;
    padding: 32px 0;
    color: #999;
}

.error-detail {
    font-size: 13px;
    color: #c00;
}

footer {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    padding: 24px 0;
}

.title {
    font-size: 28px;
    margin-bottom: 10px;
}

a {
    color: #007FFF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}
