/* ====== Android 2.3 Gingerbread 增强样式 ====== */
* { margin:0; padding:0; }
body {
    font-family: "Droid Sans", "Roboto", Arial, sans-serif;
    font-size: 14px;
    background: #1a1a1a;
    color: #ffffff;
    -webkit-text-size-adjust: none;
}
a { color: #A4C639; text-decoration: none; }
img { border: 0; }
table { border-collapse: collapse; }
input, select, button { font-family: inherit; font-size: inherit; }

/* ====== Header (渐变增强) ====== */
.header {
    background: #2a2a2a;
    background: -webkit-gradient(linear, left top, left bottom, from(#333), to(#1a1a1a));
    background: -webkit-linear-gradient(top, #333, #1a1a1a);
    border-bottom: 2px solid #A4C639;
    height: 48px;
    line-height: 48px;
    padding: 0 8px;
    position: relative;
    -webkit-box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
.header h1 {
    font-size: 17px;
    font-weight: bold;
    color: #A4C639;
    text-align: center;
    margin: 0 100px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0 1px 1px rgba(0,0,0,0.8);
}
.header .btn-left {
    position: absolute;
    left: 4px;
    top: 6px;
    height: 34px;
    line-height: 34px;
    padding: 0 12px;
    background: #333;
    background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#222));
    color: #ccc;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.header .btn-right {
    position: absolute;
    right: 4px;
    top: 6px;
    height: 34px;
    line-height: 34px;
    padding: 0 12px;
    background: #333;
    background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#222));
    color: #ccc;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
/* 头部上传按钮 - 醒目绿色 */
.header .btn-upload {
    position: absolute;
    right: 4px;
    top: 6px;
    height: 34px;
    line-height: 34px;
    padding: 0 16px;
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    color: #000;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #6E9F2B;
    border-radius: 4px;
    cursor: pointer;
    -webkit-box-shadow: 0 1px 3px rgba(164,198,57,0.4);
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* ====== Search Bar ====== */
.search-bar {
    padding: 8px 8px;
    background: #111;
    background: -webkit-gradient(linear, left top, left bottom, from(#1a1a1a), to(#0a0a0a));
    border-bottom: 1px solid #2a2a2a;
}
.search-bar table { width: 100%; }
.search-bar input[type="text"] {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    background: #000;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    -webkit-appearance: none;
    -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.search-bar input[type="text"]:focus {
    border-color: #A4C639;
    outline: none;
    -webkit-box-shadow: 0 0 4px rgba(164,198,57,0.4), inset 0 1px 3px rgba(0,0,0,0.5);
}
.search-bar .btn-search {
    width: 56px;
    height: 36px;
    padding: 0;
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    color: #000;
    border: 1px solid #6E9F2B;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ====== Hero Banner (主页顶部横幅) ====== */
.hero-banner {
    background: #1a2a1a;
    background: -webkit-gradient(linear, left top, left bottom, from(#2a3a2a), to(#1a2a1a));
    padding: 16px 12px;
    border-bottom: 1px solid #3a5a3a;
    text-align: center;
}
.hero-banner .hero-title {
    font-size: 18px;
    font-weight: bold;
    color: #A4C639;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    margin-bottom: 4px;
}
.hero-banner .hero-sub {
    font-size: 12px;
    color: #8aba6a;
}
.hero-banner .hero-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 24px;
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    color: #000;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #6E9F2B;
    border-radius: 5px;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* ====== Section Title ====== */
.section-title-bar {
    background: #222;
    background: -webkit-gradient(linear, left top, left bottom, from(#2a2a2a), to(#1a1a1a));
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    border-top: 1px solid #333;
}
.section-title-bar .st-text {
    font-size: 13px;
    font-weight: bold;
    color: #A4C639;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ====== App List (卡片式增强) ====== */
.app-list { padding: 0; }
.app-item {
    background: #1e1e1e;
    background: -webkit-gradient(linear, left top, left bottom, from(#222), to(#1a1a1a));
    border-bottom: 1px solid #2a2a2a;
    padding: 0;
    overflow: hidden;
    position: relative;
}
.app-item:active {
    background: #2a2a2a;
}
.app-item-inner {
    display: block;
    padding: 12px 10px;
    color: #fff;
    overflow: hidden;
}
.app-item-inner:active { background: #2a2a2a; }
.app-item .icon {
    float: left;
    width: 56px;
    height: 56px;
    background: #2a2a2a;
    background: -webkit-gradient(linear, left top, left bottom, from(#333), to(#222));
    margin-right: 12px;
    border: 1px solid #444;
    border-radius: 6px;
    text-align: center;
    line-height: 56px;
    font-size: 24px;
    color: #888;
    overflow: hidden;
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.app-item .icon img { width: 56px; height: 56px; display: block; border-radius: 5px; }
.app-item .info { overflow: hidden; }
.app-item .name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 3px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.6);
}
.app-item .desc {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-item .meta {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}
.app-item .meta .ver-badge {
    display: inline-block;
    background: #333;
    color: #A4C639;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 4px;
}
.app-item .actions {
    float: right;
    padding: 18px 8px 0 0;
}
.app-item .btn {
    display: inline-block;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: bold;
    background: #333;
    background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#2a2a2a));
    color: #A4C639;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 4px;
    text-decoration: none;
    -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.app-item .btn:active { background: #444; }
.app-item .btn-download {
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    color: #000;
    border-color: #6E9F2B;
    text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}

/* ====== Preview Page (增强) ====== */
.preview-header {
    background: #1e1e1e;
    background: -webkit-gradient(linear, left top, left bottom, from(#2a2a2a), to(#1a1a1a));
    padding: 16px 12px;
    border-bottom: 1px solid #333;
    overflow: hidden;
    -webkit-box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.preview-icon {
    float: left;
    width: 64px;
    height: 64px;
    background: #2a2a2a;
    background: -webkit-gradient(linear, left top, left bottom, from(#333), to(#222));
    border: 1px solid #444;
    border-radius: 8px;
    margin-right: 14px;
    text-align: center;
    line-height: 64px;
    font-size: 28px;
    color: #888;
    overflow: hidden;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.preview-icon img { width: 64px; height: 64px; display: block; border-radius: 7px; }
.preview-info { overflow: hidden; padding-top: 4px; }
.preview-info h2 { font-size: 20px; color: #A4C639; margin-bottom: 4px; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.preview-info .ver { font-size: 13px; color: #888; }
.preview-info .by { font-size: 11px; color: #666; margin-top: 3px; }
.preview-body { padding: 14px 10px; }
.preview-body .section-title {
    font-size: 14px;
    font-weight: bold;
    color: #A4C639;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.preview-body .desc-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 18px;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
}
.preview-body .detail-table { width: 100%; margin-bottom: 18px; }
.preview-body .detail-table td {
    padding: 8px 6px;
    font-size: 12px;
    border-bottom: 1px solid #222;
    vertical-align: top;
}
.preview-body .detail-table .dl { color: #888; width: 80px; font-weight: bold; }
.preview-body .detail-table .dv { color: #ccc; }
.preview-screenshots { padding: 0 10px 14px; }
.preview-screenshots .ss-item {
    display: inline-block;
    margin: 0 8px 8px 0;
    max-width: 240px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #1a1a1a;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    overflow: hidden;
}
.preview-screenshots .ss-item img {
    display: block;
    max-width: 100%;
    height: auto;
}
.preview-actions {
    padding: 12px 10px;
    background: #1e1e1e;
    background: -webkit-gradient(linear, left top, left bottom, from(#2a2a2a), to(#1a1a1a));
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    overflow: hidden;
    text-align: center;
}
.preview-actions .btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: bold;
    background: #333;
    background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#2a2a2a));
    color: #A4C639;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 8px;
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.preview-actions .btn:active { background: #444; }
.preview-actions .btn-primary {
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    color: #000;
    border-color: #6E9F2B;
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.preview-actions .btn-danger {
    background: #cc0000;
    background: -webkit-gradient(linear, left top, left bottom, from(#dd1111), to(#aa0000));
    color: #fff;
    border-color: #aa0000;
}

/* ====== Upload Form (增强) ====== */
.upload-form { padding: 14px 10px; }
.upload-form .form-title {
    font-size: 16px;
    font-weight: bold;
    color: #A4C639;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}
.upload-form .form-group { margin-bottom: 14px; }
.upload-form label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    font-weight: bold;
}
.upload-form input[type="file"] {
    width: 100%;
    padding: 8px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ccc;
    font-size: 13px;
    -webkit-appearance: none;
}
.upload-form .upload-zone {
    background: #1a1a1a;
    background: -webkit-gradient(linear, left top, left bottom, from(#222), to(#1a1a1a));
    border: 2px dashed #444;
    border-radius: 6px;
    padding: 36px 10px;
    text-align: center;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 14px;
    -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.upload-form .upload-zone:active {
    border-color: #A4C639;
    color: #A4C639;
    background: #1a2a1a;
}
.upload-form .upload-zone .up-icon { font-size: 40px; margin-bottom: 10px; }
.upload-form .upload-zone .up-hint { font-size: 12px; color: #666; margin-top: 6px; }
.upload-form .btn-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    color: #000;
    border: 1px solid #6E9F2B;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.upload-form .btn-submit:active { background: #8EBF3B; }
.upload-form .btn-submit:disabled {
    background: #444;
    background: -webkit-gradient(linear, left top, left bottom, from(#555), to(#333));
    color: #999;
    cursor: default;
    border-color: #444;
    text-shadow: none;
    -webkit-box-shadow: none;
}
.upload-progress {
    margin-top: 12px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    display: none;
    -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.upload-progress .bar-bg {
    height: 8px;
    background: #333;
    border-radius: 4px;
    margin-top: 8px;
    -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}
.upload-progress .bar-fill {
    height: 8px;
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    border-radius: 4px;
    width: 0%;
}
.upload-result {
    margin-top: 12px;
    padding: 10px;
    font-size: 13px;
    display: none;
    border-radius: 4px;
}
.upload-result.success {
    background: #1a2a1a;
    border: 1px solid #3a6a3a;
    color: #A4C639;
}
.upload-result.error {
    background: #2a1a1a;
    border: 1px solid #6a3a3a;
    color: #ff4444;
}

/* ====== Info Card (说明区域) ====== */
.info-card {
    margin: 14px 10px;
    background: #1a1a1a;
    background: -webkit-gradient(linear, left top, left bottom, from(#222), to(#1a1a1a));
    border: 1px solid #333;
    border-radius: 6px;
    padding: 14px;
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.info-card .ic-title {
    font-size: 14px;
    font-weight: bold;
    color: #A4C639;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #333;
}
.info-card .ic-body {
    font-size: 12px;
    color: #999;
    line-height: 1.8;
}
.info-card .ic-body p { margin-bottom: 4px; }
.info-card .ic-body .tag {
    display: inline-block;
    background: #333;
    color: #A4C639;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-family: monospace;
}

/* ====== Empty State (增强) ====== */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #555;
    font-size: 14px;
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.empty-state .empty-text { font-size: 15px; color: #777; margin-bottom: 6px; }
.empty-state .empty-hint { font-size: 12px; color: #555; }
.empty-state .empty-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 24px;
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    color: #000;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #6E9F2B;
    border-radius: 5px;
    text-decoration: none;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* ====== Toast ====== */
.toast {
    position: fixed;
    bottom: 70px;
    left: 50%;
    margin-left: -130px;
    width: 260px;
    padding: 12px;
    background: #333;
    background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#2a2a2a));
    color: #fff;
    font-size: 13px;
    text-align: center;
    z-index: 999;
    display: none;
    opacity: 0;
    border-radius: 6px;
    border: 1px solid #555;
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

/* ====== Clearfix ====== */
.clearfix { zoom: 1; }
.clearfix:after { content: ""; display: block; clear: both; height: 0; visibility: hidden; }

/* ====== Lua render ====== */
.lua-widget { margin: 8px 0; }
.lua-text { font-size: 14px; color: #ccc; line-height: 1.6; }
.lua-button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #A4C639;
    background: -webkit-gradient(linear, left top, left bottom, from(#B4D649), to(#8EBF3B));
    color: #000;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #6E9F2B;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    margin: 8px 0;
}
.lua-button:active { background: #8EBF3B; }
.lua-input {
    width: 100%;
    padding: 8px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    margin: 8px 0;
    -webkit-appearance: none;
}
.lua-image { max-width: 100%; display: block; margin: 8px 0; border: 1px solid #444; border-radius: 4px; }
.lua-checkbox { margin: 8px 0; font-size: 14px; color: #ccc; }
.lua-checkbox input { margin-right: 6px; }
.lua-spacer { height: 12px; }

/* ====== Code Block ====== */
.code-block {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
    overflow: auto;
    font-size: 12px;
    color: #ccc;
    max-height: 300px;
    font-family: monospace;
    -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

/* ====== Footer ====== */
.footer {
    padding: 20px 10px;
    text-align: center;
    font-size: 11px;
    color: #444;
    border-top: 1px solid #222;
    margin-top: 20px;
}

/* ====== Nav Bar (底部导航增强) ====== */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111;
    background: -webkit-gradient(linear, left top, left bottom, from(#1a1a1a), to(#0a0a0a));
    border-top: 1px solid #333;
    border-top: 2px solid #A4C639;
    overflow: hidden;
    z-index: 100;
    -webkit-box-shadow: 0 -2px 6px rgba(0,0,0,0.5);
}
.nav-bar a {
    display: block;
    float: left;
    width: 33.33%;
    text-align: center;
    padding: 8px 0 6px;
    color: #888;
    font-size: 12px;
    font-weight: bold;
}
.nav-bar a.active {
    color: #A4C639;
}
.nav-bar a:active { background: #222; }
.nav-bar .nav-icon { font-size: 22px; display: block; margin-bottom: 2px; }

/* ====== content padding for bottom nav ====== */
.content-with-nav { padding-bottom: 64px; }

/* ====== DB Status Banner ====== */
.db-status {
    padding: 6px 10px;
    background: #2a1a1a;
    border-bottom: 1px solid #444;
    font-size: 11px;
    color: #ff8866;
    text-align: center;
}
.db-status.ok {
    background: #1a2a1a;
    color: #A4C639;
    border-bottom-color: #3a5a3a;
}
