* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: #000;
    overflow: hidden;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
canvas { display: block; }

/* 中央文字 */
.center-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 28px;
    text-shadow: 0 0 20px rgba(255,100,150,0.8), 0 0 40px rgba(255,100,150,0.5);
    z-index: 10;
    pointer-events: none;
    animation: textGlow 2s ease-in-out infinite alternate;
}
@keyframes textGlow {
    from { text-shadow: 0 0 20px rgba(255,100,150,0.8), 0 0 40px rgba(255,100,150,0.5); }
    to { text-shadow: 0 0 30px rgba(255,100,150,1), 0 0 60px rgba(255,100,150,0.8); }
}

/* 顶部按钮 */
.top-btns {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 200;
}
.top-btns button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.top-btns button:hover { background: rgba(255, 255, 255, 0.2); }
.top-btns button:disabled { opacity: 0.6; cursor: not-allowed; }
.top-btns svg { width: 14px; height: 14px; }

/* 编辑弹窗 */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 300;
}
.edit-modal.active { display: flex; }
.edit-modal-content {
    background: rgba(20, 20, 40, 0.95);
    border-radius: 12px;
    width: 280px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.edit-modal-header h3 { color: #fff; font-size: 14px; margin: 0; }
.close-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}
.close-btn:hover { background: rgba(255, 100, 100, 0.3); }
.edit-modal-body { padding: 15px; }
.form-group { margin-bottom: 12px; }
.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    margin-bottom: 5px;
}
.form-group input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    outline: none;
}
.form-group input[type="text"]:focus { border-color: rgba(255, 100, 150, 0.5); }
.color-row { display: flex; align-items: center; gap: 10px; }
.form-group input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}
.color-preview {
    flex: 1;
    height: 30px;
    border-radius: 4px;
    background: #ff0d4d;
}
.preset-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.preset {
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}
.preset:hover { transform: scale(1.1); border-color: #fff; }
.edit-modal-footer {
    padding: 12px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
}
.save-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #ff0d4d, #1a66ff);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.save-btn:hover { opacity: 0.9; transform: scale(1.02); }

/* 友情链接 */
.friend-links {
    position: fixed;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 150;
}
.friend-links a {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s;
}
.friend-links a:hover { color: rgba(255, 255, 255, 0.7); }

/* 移动端适配 */
@media (max-width: 480px) {
    .center-text { font-size: 22px; }
    .top-btns { top: 8px; right: 8px; }
    .top-btns button { padding: 5px 8px; font-size: 11px; }
    .edit-modal-content { width: 90%; max-width: 280px; }
}