/*
Theme Name: iOS OTA Store
Theme URI: https://example.com/
Description: 面向大众的 iOS 5+ 在线安装应用商店模板，内置前端用户系统（登录/注册/我的应用）、分类、搜索、评分评论。CSS 完全兼容 iOS 5 Safari（无 flexbox、全 -webkit- 前缀、px 单位）。
Author: WorkBuddy
Version: 2.0
License: GPLv2
*/

/* ========== 基础重置（iOS5 安全） ========== */
html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
* { margin: 0; padding: 0; -webkit-box-sizing: border-box; box-sizing: border-box; }
body {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	background: #eef1f4; color: #1c2530;
	font-size: 16px; line-height: 1.5;
	-webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
img { border: 0; max-width: 100%; vertical-align: middle; }
a { color: #0a6dd0; text-decoration: none; }

/* ========== 顶栏 ========== */
.site-header {
	background: #24303e;
	background: -webkit-linear-gradient(top, #3a4a5c 0%, #24303e 100%);
	background: linear-gradient(to bottom, #3a4a5c 0%, #24303e 100%);
	border-bottom: 1px solid #10161d;
	padding: 12px 16px 0 16px;
	overflow: hidden;
}
.site-title {
	font-size: 20px; font-weight: bold; color: #ffffff;
	float: left; text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
}
.user-links { float: right; padding-top: 3px; font-size: 13px; }
.user-links a { color: #cfe0f2; margin-left: 10px; }
.user-links a b { color: #ffffff; }

/* 搜索框 */
.search-form { clear: both; margin: 10px 0 0 0; padding-bottom: 12px; overflow: hidden; }
.search-form input[type=text] {
	float: left; width: 70%; height: 34px;
	border: 1px solid #17202a; -webkit-border-radius: 6px 0 0 6px; border-radius: 6px 0 0 6px;
	padding: 0 10px; font-size: 14px;
	-webkit-appearance: none; background: #ffffff; color: #1c2530;
}
.search-form button {
	float: left; width: 30%; height: 34px; border: 1px solid #17202a;
	border-left: 0; -webkit-border-radius: 0 6px 6px 0; border-radius: 0 6px 6px 0;
	background: #0a6dd0;
	background: -webkit-linear-gradient(top, #3d92e6 0%, #0a6dd0 100%);
	background: linear-gradient(to bottom, #3d92e6 0%, #0a6dd0 100%);
	color: #ffffff; font-size: 14px; font-weight: bold;
	-webkit-appearance: none; text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

/* 顶部分类导航 */
.top-nav { clear: both; background: #1c2530; overflow: hidden; }
.top-nav a {
	display: block; float: left; padding: 9px 13px;
	color: #9fb2c6; font-size: 13px; border-right: 1px solid #141b23;
}
.top-nav a.cur { color: #ffffff; background: #0a6dd0; }

/* ========== 页面容器 ========== */
.page-wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 12px 40px 12px; }

/* ========== 提示条 ========== */
.device-tip {
	border: 1px solid #d9c36a; background: #fdf6d8; color: #6b5a1e;
	padding: 8px 10px; -webkit-border-radius: 6px; border-radius: 6px;
	font-size: 13px; margin-bottom: 14px;
}
.device-tip.ok { border-color: #a8cfa0; background: #e8f6e4; color: #2f6b2a; }

/* ========== 应用卡片 ========== */
.app-card {
	background: #ffffff; border: 1px solid #ccd4dc;
	-webkit-border-radius: 10px; border-radius: 10px;
	padding: 14px; margin-bottom: 14px; overflow: hidden;
	-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.08); box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.app-icon {
	float: left; width: 57px; height: 57px;
	-webkit-border-radius: 10px; border-radius: 10px;
	border: 1px solid #b9c2cb; margin-right: 12px; background: #dfe5ea;
}
.app-info { margin-left: 69px; margin-right: 82px; min-height: 57px; }
.app-name { font-size: 17px; font-weight: bold; color: #10161d; }
.app-meta { font-size: 12px; color: #7c8894; margin-top: 2px; }
.app-desc {
	clear: both; font-size: 14px; color: #3c4753;
	margin-top: 10px; padding-top: 10px; border-top: 1px solid #e4e9ee;
	word-break: break-word;
}

/* 星级 */
.stars .star { color: #c9d1d9; font-size: 14px; }
.stars .star.on { color: #f5a623; }
.rating-num { color: #7c8894; font-size: 12px; }

/* ========== 分类标签 ========== */
.cat-chips { margin-bottom: 14px; overflow: hidden; }
.cat-chips a {
	display: block; float: left; margin: 0 8px 8px 0;
	padding: 6px 14px; font-size: 13px; color: #3c4753;
	background: #ffffff; border: 1px solid #ccd4dc;
	-webkit-border-radius: 15px; border-radius: 15px;
}
.cat-chips a.cur { background: #0a6dd0; border-color: #0857a6; color: #ffffff; }

/* ========== 卡片右侧「获取」按钮 ========== */
.btn-get {
	float: right;
	width: 70px; text-align: center;
	padding: 7px 0; margin: 6px 0 0 10px;
	font-size: 14px; font-weight: bold; color: #ffffff;
	text-shadow: 0 -1px 0 rgba(0,0,0,0.35);
	background: #3fa233;
	background: -webkit-linear-gradient(top, #6cc25c 0%, #3fa233 50%, #2f8a26 51%, #3fa233 100%);
	background: linear-gradient(to bottom, #6cc25c 0%, #3fa233 50%, #2f8a26 51%, #3fa233 100%);
	border: 1px solid #2c7a22;
	-webkit-border-radius: 7px; border-radius: 7px;
	-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-get:active {
	background: #2f8a26;
	background: -webkit-linear-gradient(top, #2f8a26 0%, #3fa233 100%);
	background: linear-gradient(to bottom, #2f8a26 0%, #3fa233 100%);
}
.btn-get.disabled {
	background: #a9b4bf;
	background: -webkit-linear-gradient(top, #c2cad2 0%, #a9b4bf 100%);
	background: linear-gradient(to bottom, #c2cad2 0%, #a9b4bf 100%);
	border-color: #8d99a5; color: #eef1f4;
	-webkit-box-shadow: none; box-shadow: none;
}

/* ========== 安装按钮 ========== */
.btn-install {
	display: block; text-align: center; margin-top: 12px; padding: 11px 10px;
	font-size: 16px; font-weight: bold; color: #ffffff;
	text-shadow: 0 -1px 0 rgba(0,0,0,0.35);
	background: #3fa233;
	background: -webkit-linear-gradient(top, #6cc25c 0%, #3fa233 50%, #2f8a26 51%, #3fa233 100%);
	background: linear-gradient(to bottom, #6cc25c 0%, #3fa233 50%, #2f8a26 51%, #3fa233 100%);
	border: 1px solid #2c7a22;
	-webkit-border-radius: 8px; border-radius: 8px;
	-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-install:active {
	background: #2f8a26;
	background: -webkit-linear-gradient(top, #2f8a26 0%, #3fa233 100%);
	background: linear-gradient(to bottom, #2f8a26 0%, #3fa233 100%);
}
.btn-install.disabled {
	background: #a9b4bf;
	background: -webkit-linear-gradient(top, #c2cad2 0%, #a9b4bf 100%);
	background: linear-gradient(to bottom, #c2cad2 0%, #a9b4bf 100%);
	border-color: #8d99a5; color: #eef1f4; -webkit-box-shadow: none; box-shadow: none;
}

/* ========== 详情页 ========== */
.app-hero { padding: 6px 0 2px 0; }
.app-hero .app-name { font-size: 20px; }
.app-hero .app-icon { width: 64px; height: 64px; }
.app-hero .app-info { margin-left: 76px; margin-right: 82px; min-height: 64px; }
.install-hint { text-align: center; font-size: 12px; color: #7c8894; margin-top: 8px; }

.app-section {
	background: #ffffff; border: 1px solid #ccd4dc;
	-webkit-border-radius: 10px; border-radius: 10px;
	padding: 14px; margin-top: 14px;
}
.app-section h2 {
	font-size: 15px; color: #5b6875; text-transform: uppercase;
	margin-bottom: 8px; border-bottom: 1px solid #e4e9ee; padding-bottom: 6px;
}
.app-section p { font-size: 14px; color: #3c4753; }

/* 截图横滑（老式横向排布 + overflow，iOS5 不支持 scroll-snap） */
.screens { overflow-x: auto; white-space: nowrap; padding-bottom: 6px; }
.screens img {
	display: inline-block; width: 150px; margin-right: 8px;
	border: 1px solid #ccd4dc; -webkit-border-radius: 6px; border-radius: 6px;
}

/* 版本记录 */
.version-item { padding: 8px 0; border-bottom: 1px solid #eef1f4; font-size: 14px; }
.version-item:last-child { border-bottom: 0; }
.version-item .ver-num { font-weight: bold; color: #10161d; }
.version-item .ver-date { float: right; color: #9aa5b1; font-size: 12px; }

/* 评论 / 评分 */
.review-item { padding: 10px 0; border-bottom: 1px solid #eef1f4; }
.review-item:last-child { border-bottom: 0; }
.review-head { overflow: hidden; }
.review-author { float: left; font-weight: bold; font-size: 14px; color: #10161d; }
.review-date { float: right; font-size: 12px; color: #9aa5b1; }
.review-body { font-size: 14px; color: #3c4753; margin-top: 4px; }
.comment-form-rating select, .ota-form select {
	width: 100%; height: 38px; font-size: 15px; padding: 0 8px;
	border: 1px solid #ccd4dc; -webkit-border-radius: 6px; border-radius: 6px;
	background: #ffffff; -webkit-appearance: none;
}

/* ========== 用户系统表单 ========== */
.ota-panel {
	background: #ffffff; border: 1px solid #ccd4dc;
	-webkit-border-radius: 10px; border-radius: 10px;
	padding: 18px 14px; margin-top: 14px;
}
.ota-panel h1 { font-size: 20px; margin-bottom: 14px; color: #10161d; }
.ota-form p { margin-bottom: 12px; }
.ota-form label { display: block; font-size: 13px; color: #5b6875; margin-bottom: 4px; }
.ota-form input[type=text], .ota-form input[type=password], .ota-form input[type=email] {
	width: 100%; height: 40px; padding: 0 10px; font-size: 16px;
	border: 1px solid #ccd4dc; -webkit-border-radius: 6px; border-radius: 6px;
	-webkit-appearance: none; background: #ffffff; color: #1c2530;
}
.ota-form .remember { font-size: 13px; color: #5b6875; }
.ota-form .remember input { margin-right: 6px; }
.btn-main {
	display: block; width: 100%; text-align: center; margin-top: 6px; padding: 12px 10px;
	font-size: 16px; font-weight: bold; color: #ffffff; border: 1px solid #0857a6;
	background: #0a6dd0;
	background: -webkit-linear-gradient(top, #3d92e6 0%, #0a6dd0 100%);
	background: linear-gradient(to bottom, #3d92e6 0%, #0a6dd0 100%);
	-webkit-border-radius: 8px; border-radius: 8px; -webkit-appearance: none;
	text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
.btn-main:active { background: #0857a6; }
.btn-secondary {
	display: inline-block; padding: 8px 16px; font-size: 13px; color: #3c4753;
	background: #ffffff; border: 1px solid #ccd4dc;
	-webkit-border-radius: 6px; border-radius: 6px;
}
.form-error {
	border: 1px solid #e0a0a0; background: #fdeaea; color: #a03030;
	padding: 8px 10px; -webkit-border-radius: 6px; border-radius: 6px;
	font-size: 13px; margin-bottom: 12px;
}
.form-ok {
	border: 1px solid #a8cfa0; background: #e8f6e4; color: #2f6b2a;
	padding: 8px 10px; -webkit-border-radius: 6px; border-radius: 6px;
	font-size: 13px; margin-bottom: 12px;
}
.form-alt { text-align: center; font-size: 13px; color: #7c8894; margin-top: 14px; }

/* 个人中心 */
.profile-head { overflow: hidden; padding-bottom: 12px; border-bottom: 1px solid #e4e9ee; margin-bottom: 12px; }
.avatar { float: left; width: 56px; height: 56px; -webkit-border-radius: 8px; border-radius: 8px; margin-right: 12px; border: 1px solid #ccd4dc; }
.profile-name { font-size: 18px; font-weight: bold; color: #10161d; }
.profile-sub { font-size: 12px; color: #7c8894; }

/* ========== 页脚 ========== */
.site-footer { text-align: center; color: #9aa5b1; font-size: 12px; padding: 20px 0 30px 0; }

/* ========== 工具类 ========== */
.clearfix { overflow: hidden; }
.clear { clear: both; height: 0; font-size: 0; line-height: 0; }

/* ========== 小屏适配 ========== */
@media only screen and (max-width: 360px) {
	.site-title { font-size: 17px; }
	.app-icon { width: 48px; height: 48px; }
	.app-info { margin-left: 58px; margin-right: 74px; min-height: 48px; }
	.btn-get { width: 62px; padding: 6px 0; }
	.app-hero .app-icon { width: 56px; height: 56px; }
	.app-hero .app-info { margin-left: 68px; margin-right: 74px; min-height: 56px; }
	.screens img { width: 120px; }
}
