/* inspiration.css - 碎碎念 Y2K复古风样式 */

/* 碎碎念图标 */
.app-inspiration .app-icon-img {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* ==================== 碎碎念 Y2K复古风 ==================== */
.insp-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 7px, #ddd0e8 7px, #ddd0e8 8px),
        repeating-linear-gradient(90deg, transparent, transparent 7px, #ddd0e8 7px, #ddd0e8 8px),
        #faf8fd;
    --insp-bg: #faf8fd;
    --insp-cream: #fdf8f0;
    --insp-pink: #f8e2ea;
    --insp-purple: #c0a8d8;
    --insp-purple-lt: #ddd0e8;
    --insp-purple-dk: #a888c0;
    --insp-txt: #b098c8;
    --insp-txt-dk: #6a5880;
    --insp-txt-body: #7a6890;
    --insp-txt-lt: #c8b8d8;
    --insp-bar-blue: #dce8f4;
    --insp-bar-yellow: #f4ecd8;
}
.insp-header {
    display: flex; align-items: center;
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    background: var(--insp-pink);
    border-bottom: 2px dashed var(--insp-purple);
    gap: 12px; flex-shrink: 0;
}
.insp-header .page-back { color: var(--insp-purple); }
.insp-header-title {
    flex: 1; font-size: 18px; font-weight: 600;
    color: var(--insp-txt-dk);
    letter-spacing: 2px;
    font-family: "ZLabsBitmap", "Courier New", monospace;
}
.insp-header-search-btn {
    cursor: pointer; padding: 4px;
    display: flex; align-items: center; justify-content: center;
}
.insp-search-bar {
    display: none; padding: 8px 16px;
    background: var(--insp-pink);
    border-bottom: 2px dashed var(--insp-purple);
    flex-shrink: 0;
}
.insp-search-bar.show { display: flex; align-items: center; gap: 8px; }
.insp-search-bar input {
    flex: 1; padding: 8px 12px;
    border: 2px solid var(--insp-purple);
    border-radius: 8px; background: var(--insp-cream);
    font-size: 14px; font-family: "ZLabsBitmap", monospace;
    outline: none; color: var(--insp-txt-dk);
}
.insp-search-bar input::placeholder { color: var(--insp-txt-lt); }
.insp-search-bar input:focus { border-color: var(--insp-purple-dk); }
.insp-search-close {
    cursor: pointer; font-size: 16px;
    color: var(--insp-txt); padding: 4px;
    font-family: "ZLabsBitmap", monospace;
}
.insp-tabs {
    display: flex; padding: 6px 10px; gap: 6px;
    background: var(--insp-pink);
    border-bottom: 3px solid var(--insp-purple);
    overflow-x: auto; flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}
.insp-tabs::-webkit-scrollbar { display: none; }
.insp-tab {
    padding: 5px 14px; font-size: 13px;
    white-space: nowrap; cursor: pointer;
    background: var(--insp-cream);
    color: var(--insp-txt);
    border: 2px solid var(--insp-purple-lt);
    border-radius: 14px;
    transition: all 0.2s;
    font-family: "ZLabsBitmap", monospace;
    letter-spacing: 1px;
}
.insp-tab:active { transform: scale(0.96); }
.insp-tab.active {
    background: var(--insp-purple);
    color: #fff; border-color: var(--insp-purple-dk);
}
.insp-list {
    flex: 1; overflow-y: auto; padding: 12px;
    -webkit-overflow-scrolling: touch;
}
.insp-empty {
    text-align: center; color: var(--insp-txt-lt);
    padding: 60px 20px; font-size: 14px;
    font-family: "ZLabsBitmap", monospace;
}
/* 卡片 - 双线窗口 */
.insp-card {
    background: var(--insp-cream);
    border: 2px solid var(--insp-purple);
    border-radius: 4px;
    margin-bottom: 14px;
    animation: inspCardIn 0.3s ease;
    position: relative;
}
.insp-card::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border: 2px solid var(--insp-purple-lt);
    border-radius: 6px;
    pointer-events: none;
}
@keyframes inspCardIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.insp-card-titlebar {
    display: flex; align-items: center;
    padding: 4px 8px; gap: 6px;
    border-bottom: 2px solid var(--insp-purple);
    min-height: 28px;
    border-radius: 2px 2px 0 0;
}
.insp-card-titlebar.link-bar { background: var(--insp-bar-blue); }
.insp-card-titlebar.text-bar { background: var(--insp-bar-yellow); }
.insp-card-titlebar.murmur-bar { background: #f8e2ea; }
.insp-card.murmur-card { border-color: var(--insp-purple); }
.insp-card.murmur-card::before { border-color: var(--insp-purple-lt); }
.insp-tag {
    display: inline-block;
    padding: 1px 10px; font-size: 11px; font-weight: 500;
    font-family: "ZLabsBitmap", monospace;
    border: 1.5px solid var(--insp-purple);
    border-radius: 10px;
    background: var(--insp-cream); color: var(--insp-txt-dk);
}
.insp-tag.todo { background: #dce0f0; color: #7888a8; border-color: #c0c8e0; }
.insp-tag.clip { background: #e8e4dc; color: #908878; border-color: #c8c0b8; }
.insp-tag.idea { background: #f0e8d4; color: #a89060; border-color: #d8c8a0; }
.insp-tag.bug { background: #f0d8d4; color: #b08070; border-color: #d8b0a8; }
.insp-tag.chen { background: #e8d8f0; color: #9878a8; border-color: #c8a8d8; }
.insp-tag.link_tutorial { background: #dce0f0; color: #7888a8; border-color: #c0c8e0; }
.insp-tag.link_resource { background: #e8e4dc; color: #908878; border-color: #c8c0b8; }
.insp-tag.link_tool { background: #f0e8d4; color: #a89060; border-color: #d8c8a0; }
.insp-tag.link_beauty { background: #f0d8d4; color: #b08070; border-color: #d8b0a8; }
.insp-tag.link_inspo { background: #e8d8f0; color: #9878a8; border-color: #c8a8d8; }
.insp-tag.murmur { background: #f8e2ea; color: #b07888; border-color: #e0a8c0; }
.insp-card-time {
    font-size: 11px; color: var(--insp-txt);
    font-family: "ZLabsBitmap", monospace;
}
.insp-card-source { font-size: 11px; color: var(--insp-txt-lt); display: none; }
.insp-card-actions { margin-left: auto; display: flex; gap: 6px; }
.insp-card-action-btn {
    width: 22px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; background: var(--insp-cream);
    border: 1.5px solid var(--insp-purple);
    border-radius: 3px; color: var(--insp-txt);
    font-size: 10px; padding: 0;
    transition: background 0.15s;
}
.insp-card-action-btn:active { background: var(--insp-purple-lt); }
.insp-card-action-btn svg { width: 10px; height: 10px; }
.insp-card-body { padding: 10px 12px; }
.insp-card-content {
    font-size: 14px; line-height: 1.7;
    color: var(--insp-txt-body);
    word-break: break-word; white-space: pre-wrap;
    font-family: "ZLabsBitmap", monospace;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.insp-card-content.expanded {
    -webkit-line-clamp: unset;
    display: block;
}
.insp-expand-btn {
    display: block; text-align: center;
    padding: 2px 0 6px; cursor: pointer;
    color: var(--insp-txt-lt); font-size: 16px;
    font-family: "ZLabsBitmap", monospace;
    letter-spacing: 3px;
    user-select: none;
    -webkit-user-select: none;
}
.insp-expand-btn:active { color: var(--insp-purple); }
.insp-card-footer { padding: 0 12px 10px; }
.insp-card-url {
    display: block; font-size: 12px;
    color: var(--insp-txt); text-decoration: none;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "ZLabsBitmap", monospace;
    border-top: 1px dashed var(--insp-purple-lt);
    padding-top: 8px;
}
.insp-card-url:active { color: var(--insp-purple-dk); }
/* 操作菜单 */
.insp-bottom {
    background: var(--insp-pink);
    border-top: 3px solid var(--insp-purple);
    padding: 8px 10px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
}
.insp-input-row {
    display: flex; align-items: flex-end;
    gap: 8px; margin-bottom: 4px;
}
.insp-input-box {
    flex: 1; background: var(--insp-cream);
    border: 2px solid var(--insp-purple);
    border-radius: 8px; padding: 8px 12px;
    min-height: 36px; max-height: 100px;
    overflow-y: auto; display: flex;
    align-items: center; gap: 8px;
    transition: border-color 0.2s;
}
.insp-input-box:focus-within { border-color: var(--insp-purple-dk); }
.insp-input-box textarea {
    flex: 1; border: none; background: none;
    resize: none; font-size: 14px; line-height: 1.4;
    outline: none; font-family: "ZLabsBitmap", monospace;
    min-height: 20px; max-height: 80px; padding: 0;
    color: var(--insp-txt-dk);
}
.insp-input-box textarea::placeholder { color: var(--insp-txt-lt); }
.insp-voice-btn {
    background: none; border: none; padding: 2px;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    color: var(--insp-txt);
    flex-shrink: 0; width: 28px; height: 28px;
}
.insp-voice-btn:active { color: var(--insp-purple-dk); }
.insp-voice-btn.recording {
    color: #d87088;
    animation: voicePulse 0.8s ease-in-out infinite;
}
@keyframes voicePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.insp-send-btn {
    width: 38px; height: 38px;
    border: none; background: none;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0; padding: 0;
    transition: transform 0.15s;
}
.insp-send-btn:active { transform: scale(0.9); }
.insp-link-subtabs {
    display: flex; gap: 6px; padding: 6px 12px 8px;
    background: var(--insp-bg);
    overflow-x: auto;
    border-bottom: 3px solid var(--insp-purple-lt);
}
.insp-subtab {
    padding: 4px 10px;
    border: 2px solid var(--insp-purple-lt);
    border-radius: 12px;
    background: var(--insp-cream);
    font-size: 12px; color: var(--insp-txt);
    cursor: pointer; white-space: nowrap; flex-shrink: 0;
    font-family: "ZLabsBitmap", monospace;
}
.insp-subtab.active {
    background: var(--insp-purple);
    color: #fff; border-color: var(--insp-purple-dk);
}
.insp-subtab.link_tutorial { background: #dce0f0; color: #7888a8; border-color: #c0c8e0; }
.insp-subtab.link_resource { background: #e8e4dc; color: #908878; border-color: #c8c0b8; }
.insp-subtab.link_tool { background: #f0e8d4; color: #a89060; border-color: #d8c8a0; }
.insp-subtab.link_beauty { background: #f0d8d4; color: #b08070; border-color: #d8b0a8; }
.insp-subtab.link_inspo { background: #e8d8f0; color: #9878a8; border-color: #c8a8d8; }
.insp-subtab.active.link_tutorial { background: #7888a8; color: #fff; border-color: #6878a0; }
.insp-subtab.active.link_resource { background: #908878; color: #fff; border-color: #807868; }
.insp-subtab.active.link_tool { background: #a89060; color: #fff; border-color: #988050; }
.insp-subtab.active.link_beauty { background: #b08070; color: #fff; border-color: #a07060; }
.insp-subtab.active.link_inspo { background: #9878a8; color: #fff; border-color: #886898; }
.insp-input-btn {
    width: 36px; height: 36px;
    border: none; background: none;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; flex-shrink: 0;
}
.insp-input-btn:active { background: var(--insp-purple-lt); }
.insp-input-btn.recording {
    color: #d87088; animation: inspRecPulse 1s infinite;
}
@keyframes inspRecPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.insp-url-row { display: none; margin-bottom: 8px; }
.insp-url-row.show { display: flex; align-items: center; gap: 8px; }
.insp-url-row input {
    flex: 1; padding: 8px 12px;
    border: 2px solid var(--insp-purple);
    border-radius: 8px; background: var(--insp-cream);
    font-size: 13px; font-family: "ZLabsBitmap", monospace;
    outline: none; color: var(--insp-txt-dk);
}
.insp-url-row input::placeholder { color: var(--insp-txt-lt); }
.insp-url-row input:focus { border-color: var(--insp-purple-dk); }
.insp-tag-row {
    display: flex; gap: 6px; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 8px;
    animation: inspTagRowIn 0.2s ease;
}
@keyframes inspTagRowIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.insp-tag-row::-webkit-scrollbar { display: none; }
.insp-tag-btn {
    padding: 6px 14px; font-size: 12px; font-weight: 500;
    border: 2px solid var(--insp-purple-lt);
    border-radius: 14px; cursor: pointer;
    white-space: nowrap; transition: transform 0.1s;
    font-family: "ZLabsBitmap", monospace;
    letter-spacing: 1px;
}
.insp-tag-btn:active { transform: scale(0.95); }
.insp-tag-btn.todo { background: #dce0f0; color: #7888a8; border-color: #c0c8e0; }
.insp-tag-btn.clip { background: #e8e4dc; color: #908878; border-color: #c8c0b8; }
.insp-tag-btn.idea { background: #f0e8d4; color: #a89060; border-color: #d8c8a0; }
.insp-tag-btn.bug { background: #f0d8d4; color: #b08070; border-color: #d8b0a8; }
.insp-tag-btn.chen { background: #e8d8f0; color: #9878a8; border-color: #c8a8d8; }
.insp-tag-btn.link_tutorial { background: #dce0f0; color: #7888a8; border-color: #c0c8e0; }
.insp-tag-btn.link_resource { background: #e8e4dc; color: #908878; border-color: #c8c0b8; }
.insp-tag-btn.link_tool { background: #f0e8d4; color: #a89060; border-color: #d8c8a0; }
.insp-tag-btn.link_beauty { background: #f0d8d4; color: #b08070; border-color: #d8b0a8; }
.insp-tag-btn.link_inspo { background: #e8d8f0; color: #9878a8; border-color: #c8a8d8; }

/* 存灵感浮层 */
/* 导出格式选择弹窗 */
.export-format-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}
.export-format-modal.show {
    display: flex;
}
.export-format-content {
    background: #fff;
    width: 280px;
    border-radius: 16px;
    padding: 24px 20px;
    animation: inspModalUp 0.3s ease;
}
.export-format-title {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}
.export-format-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.export-format-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}
.export-format-btn:active {
    background: #f5f5f5;
    transform: scale(0.98);
}
.export-format-btn .export-icon {
    font-size: 24px;
    width: 36px;
    text-align: center;
}
.export-format-btn .export-label {
    font-weight: 500;
}
.export-format-btn .export-desc {
    font-size: 12px;
    color: #999;
}

/* 文本替换弹窗 */
.text-replace-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}
.text-replace-modal.show {
    display: flex;
}
.text-replace-content {
    background: #fff;
    width: 240px;
    border-radius: 14px;
    padding: 20px 16px;
    animation: inspModalUp 0.3s ease;
}
.text-replace-title {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 14px;
}
.text-replace-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}
.text-replace-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}
.text-replace-input:focus {
    border-color: #576b95;
}
.text-replace-arrow {
    font-size: 16px;
    color: #999;
    flex-shrink: 0;
}
.text-replace-preview {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-bottom: 12px;
    min-height: 16px;
}
.text-replace-btns {
    display: flex;
    gap: 8px;
}
.text-replace-btns button {
    flex: 1;
    height: 36px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}
.text-replace-cancel {
    background: #f0f0f0;
    color: #333;
}
.text-replace-confirm {
    background: #576b95;
    color: #fff;
}
.text-replace-confirm:active {
    background: #4a5b80;
}
.export-format-cancel {
    margin-top: 12px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: #f5f5f5;
    color: #666;
    font-size: 15px;
    cursor: pointer;
}

.insp-save-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(90,72,112,0.35);
    z-index: 99999;
    justify-content: center;
    align-items: flex-end;
}
.insp-save-modal.show {
    display: flex;
}
.insp-save-modal-content {
    background: #fdf8f0;
    width: 100%;
    border: 2px solid #c0a8d8;
    border-radius: 8px 8px 0 0;
    padding: 20px 16px;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    animation: inspModalUp 0.3s ease;
}
@keyframes inspModalUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.insp-save-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.insp-save-modal-header span {
    font-size: 16px;
    font-weight: 600;
    color: #6a5880;
    font-family: "ZLabsBitmap", monospace;
}
.insp-save-modal-close {
    font-size: 22px;
    cursor: pointer;
    color: #b098c8;
    padding: 4px;
}
.insp-save-modal textarea {
    width: 100%;
    min-height: 80px;
    max-height: 150px;
    padding: 12px;
    border: 2px solid #c0a8d8;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    outline: none;
    margin-bottom: 12px;
    box-sizing: border-box;
    font-family: "ZLabsBitmap", monospace;
    line-height: 1.5;
    background: #fdf8f0;
    color: #6a5880;
}
.insp-save-modal textarea:focus {
    border-color: #a888c0;
}
.insp-save-modal .insp-tag-row {
    justify-content: center;
}
