* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: #111;
}

.hero {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    padding: 20px;
}
.hero-inner {
    width: 100%;
    max-width: 960px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}
.app-logo img {
    width: 160px;
    height: 160px;
    border-radius: 32px;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.app-name {
    font-size: 48px;
    font-weight: 700;
    color: #111;
}
.version {
    font-size: 16px;
    color: #666;
}
.desc {
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    max-width: 600px;
    padding: 0 20px;
}

/* ===== 多按钮布局 ===== */
.buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    width: 100%;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 60px;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px;
    cursor: pointer;
    border: none;
}

.download-btn:hover {
    transform: translateY(-2px);
}

/* 手机端竖排显示 */
@media (max-width: 768px) {
    .hero { padding: 10px; }
    .app-logo img { width: 140px; height: 140px; border-radius: 28px; }
    .app-name { font-size: 38px; }
    .desc { font-size: 17px; }

    .buttons-container {
        flex-direction: column;
        align-items: center;
    }
    .download-btn {
        padding: 16px 50px;
        font-size: 17px;
        width: 85%;
        max-width: 380px;
    }
}
@media (max-width: 380px) {
    .app-name { font-size: 34px; }
    .app-logo img { width: 120px; height: 120px; }
}

/* ===== 登录 ===== */
.login-box {
    max-width: 360px;
    margin: 100px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}
.login-box h2 {
    margin-bottom: 24px;
    color: #333;
}
.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.login-box button {
    width: 100%;
    padding: 12px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* ===== 后台管理 ===== */
.admin-container {
    max-width: 780px;
    margin: 40px auto;
    padding: 0 20px;
}
.admin-container h2 {
    text-align: center;
    margin-bottom: 24px;
}
.success {
    background: #e6ffed;
    color: #00b42a;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
}
.admin-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.admin-form h3 {
    margin: 24px 0 16px;
    color: #444;
    border-left: 4px solid #409eff;
    padding-left: 10px;
}
.admin-form h3:first-child {
    margin-top: 0;
}
.form-item {
    margin-bottom: 18px;
}
.form-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.form-item input,
.form-item textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.form-item textarea {
    min-height: 80px;
    resize: vertical;
}

/* ===== 图标上传 ===== */
.icon-upload {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.icon-preview {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px dashed #ddd;
    flex-shrink: 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.icon-upload-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.icon-upload-right input[type="file"] {
    padding: 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}
.icon-upload-right input[type="file"]::file-selector-button {
    padding: 6px 16px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 12px;
}
.icon-upload-right input[type="file"]::file-selector-button:hover {
    background: #337ecc;
}
.icon-delete {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ff4d4f;
    cursor: pointer;
}
.icon-delete input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}
.form-tip {
    font-size: 12px;
    color: #999;
    margin: 0;
}

@media (max-width: 600px) {
    .icon-upload { flex-direction: column; align-items: center; }
    .icon-upload-right { width: 100%; }
}

/* ===== 后台按钮管理 ===== */
.buttons-manager {
    margin-top: 10px;
}

.button-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.btn-drag {
    cursor: grab;
    color: #999;
    font-size: 18px;
    user-select: none;
}

.btn-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    border-radius: 50px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 60px;
}

.button-item input[type="text"],
.button-item input[type="url"] {
    flex: 1;
    min-width: 100px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}
.button-item input[type="text"] { min-width: 80px; max-width: 140px; }

.color-picker {
    width: 44px !important;
    height: 36px;
    padding: 2px !important;
    cursor: pointer;
    border: 1px solid #ddd !important;
    border-radius: 6px;
    flex: none !important;
}

.del-btn {
    padding: 6px 14px;
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}
.del-btn:hover {
    background: #d9363e;
}

.add-btn {
    width: 100%;
    padding: 12px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s;
}
.add-btn:hover {
    background: #337ecc;
}

.save-btn {
    width: 100%;
    padding: 14px;
    background: #00b42a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}
.save-btn:hover {
    background: #009a25;
}

/* ===== 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-content h3 {
    margin: 0 0 20px;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.modal-actions button {
    padding: 10px 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.modal-actions button:first-child {
    background: #f0f0f0;
    color: #333;
}
.modal-actions button:first-child:hover {
    background: #e0e0e0;
}

.btn-primary {
    background: #409eff !important;
    color: #fff !important;
}
.btn-primary:hover {
    background: #337ecc !important;
}

@media (max-width: 600px) {
    .button-item input[type="text"] { min-width: 70px; max-width: none; }
    .button-item input[type="url"] { min-width: 100%; order: 1; }
    .btn-preview { min-width: 50px; }
}