/*
 * ═══════════════════════════════════════
 * 本源码由爱网者原创开发
 * 官网 https://www.iwzhe.com/
 * ═══════════════════════════════════════
 */
* {
    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;
}

.glass-card {
    width: 100%;
    max-width: 760px;
    padding: 55px 60px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(24px) saturate(100%);
    backdrop-filter: blur(24px) saturate(100%);
    transform: translateZ(0);
    will-change: transform;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

body.bg-dark .glass-card {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.site-footer {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}
.site-footer a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}
.site-footer a:hover {
    opacity: 0.7;
}
.app-logo img {
    width: 140px;
    height: 140px;
    border-radius: 30px;
    object-fit: cover;
}
.app-name {
    font-size: 42px;
    font-weight: 700;
    color: #111;
}
.version {
    font-size: 16px;
    color: #666;
    margin-top: -12px;
}
.desc {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    max-width: 600px;
    margin-top: -12px;
}

.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 (min-width: 769px) {
    .buttons-container {
        flex-wrap: nowrap;
    }
    .download-btn {
        flex: 1;
        min-width: 0;
        padding: 18px 30px;
        white-space: nowrap;
    }

    .buttons-container.btns-many {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .buttons-container.btns-many .download-btn {
        flex: 0 0 calc(25% - 12px);
        max-width: calc(25% - 12px);
        padding: 18px 16px;
        font-size: 16px;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .hero { padding: 10px; }
    .glass-card { padding: 40px 24px; border-radius: 24px; }
    .app-logo img { width: 120px; height: 120px; border-radius: 26px; }
    .app-name { font-size: 34px; }
    .desc { font-size: 16px; }

    .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: 30px; }
    .app-logo img { width: 100px; height: 100px; }
}

.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;
}


.text-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.text-color-row input[type="text"],
.text-color-row textarea {
    flex: 1;
    width: auto;
}
.text-color-row-top {
    align-items: flex-start;
}
.text-color-row-top .color-picker {
    margin-top: 6px;
}
@media (max-width: 600px) {
    .text-color-row { flex-wrap: nowrap; }
    .text-color-row input[type="text"] { flex: 1; min-width: 0; }
}

.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;
}

.bg-preview {
    width: 240px;
    height: 135px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px dashed #ddd;
    flex-shrink: 0;
    background: #f8f9fa;
}

.bg-mode-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

@media (max-width: 600px) {
    .bg-preview { width: 100%; height: 180px; }
}
.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;
}

.admin-footer {
    text-align: center;
    padding: 20px 0 30px;
    color: #999;
    font-size: 13px;
}
.admin-footer a {
    color: #409eff;
    text-decoration: none;
}
.admin-footer a:hover {
    text-decoration: underline;
}

.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) {
    .btn-drag { display: none; }
    .btn-preview { order: 1; min-width: 70px; }
    .button-item .color-picker { order: 2; }
    .del-btn { order: 3; margin-left: auto; }
    .button-item input[type="text"],
    .button-item input[type="url"] {
        order: 4;
        flex: 1 1 45%;
        min-width: 0;
        max-width: none;
    }
}