/* public/assets/css/tools/text/morse-code.css */
.morse-workspace {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.morse-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.morse-panel-header {
    background: var(--bg-body);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.morse-panel-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-main);
}

.morse-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.morse-btn-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid transparent;
    border-radius: 6px; cursor: pointer; font-size: 1rem;
    transition: all 0.2s; color: var(--text-main);
}
.morse-btn-icon:hover {
    background: rgba(0,0,0,0.05); border-color: var(--border-color);
}

.morse-btn-audio {
    padding: 6px 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; gap: 6px;
}
.morse-btn-audio:hover { background: var(--primary-hover); transform: translateY(-1px); }
.morse-btn-audio.playing { background: #ef4444; animation: pulse 1.5s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.morse-textarea {
    width: 100%;
    min-height: 180px;
    padding: 24px;
    border: none;
    resize: vertical;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-main);
    background: transparent;
    outline: none;
}
.morse-textarea:focus { background: rgba(var(--primary-rgb, 0, 102, 204), 0.02); }

.morse-font {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary-color);
}

.morse-divider {
    display: flex; align-items: center; justify-content: center;
    position: relative; height: 20px;
}
.morse-swap-icon {
    background: var(--bg-body); border: 1px solid var(--border-color);
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--text-muted); z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.morse-warning {
    padding: 12px 24px; background: rgba(245, 158, 11, 0.1);
    color: #d97706; font-size: 0.9rem; font-weight: 500;
    border-top: 1px solid rgba(245, 158, 11, 0.2);
}

/* 摩斯密码对照表 */
.morse-table-container {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px;
}
.morse-table-title { margin: 0 0 20px 0; font-size: 1.1rem; }
.morse-grid-dict {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.morse-dict-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: 6px;
    background: var(--bg-body); border: 1px solid var(--border-color);
}
.morse-dict-char { font-weight: 700; color: var(--text-main); font-size: 1.1rem; }
.morse-dict-code { font-family: monospace; font-weight: 800; color: var(--primary-color); }

/* Toast */
.morse-toast {
    position: fixed; top: 24px; left: 50%; transform: translate(-50%, -20px);
    background: #10b981; color: #fff; padding: 12px 24px; border-radius: 50px;
    font-weight: 600; box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    opacity: 0; visibility: hidden; transition: all 0.4s; z-index: 9999;
}
.morse-toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

[data-theme="dark"] .morse-btn-icon:hover { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .morse-swap-icon { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .morse-dict-item { background: #0f172a; border-color: #334155; }