.help-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 1.6em;
    font-weight: 800;
    color: white;
    cursor: pointer;
    z-index: 1400;
    background: linear-gradient(135deg, #14b8a6, #22c55e);
    box-shadow: 0 10px 28px rgba(20, 184, 166, 0.45);
    animation: helpPulse 2.2s infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.help-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 34px rgba(20, 184, 166, 0.6);
}
.help-fab.open {
    transform: rotate(45deg);
    animation: none;
}

.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.help-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.help-panel {
    position: fixed;
    top: 76px;
    right: 22px;
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100vh - 110px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
    box-shadow: 0 25px 60px rgba(30, 41, 59, 0.3);
    z-index: 1350;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.help-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.help-header {
    color: white;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(125deg, #0ea5e9, #6366f1, #14b8a6);
    background-size: 220% 220%;
    animation: helpShimmer 8s ease infinite;
}
.help-header h3 {
    margin: 0;
    font-size: 1.15em;
    letter-spacing: 0.2px;
}

.help-close {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1em;
    cursor: pointer;
}

.help-content {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 190px);
}

.help-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.help-action-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 6px;
    font-size: 0.82em;
    font-weight: 700;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}
.help-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(20, 184, 166, 0.32);
}
.help-action-btn:active {
    transform: translateY(0);
}

.help-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.help-chip-btn {
    font-size: 0.78em;
    font-weight: 700;
    color: #0f766e;
    background: #ccfbf1;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    padding: 5px 10px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.help-chip-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(20, 184, 166, 0.22);
}
.help-chip-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
    border-color: transparent;
}

.help-list {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.help-item.hidden {
    display: none;
}

.help-item {
    border-radius: 12px;
    border: 1px solid #dbeafe;
    background: white;
    padding: 11px 12px;
    animation: helpCardIn 0.35s ease both;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.help-item:nth-child(1) { animation-delay: 0.03s; }
.help-item:nth-child(2) { animation-delay: 0.07s; }
.help-item:nth-child(3) { animation-delay: 0.11s; }
.help-item:nth-child(4) { animation-delay: 0.15s; }

.help-item-toggle {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    padding: 0;
    color: #1e3a8a;
    font-size: 0.96em;
    font-weight: 800;
}

.help-item-arrow {
    font-size: 0.95em;
    color: #64748b;
    transition: transform 0.2s ease, color 0.2s ease;
}

.help-item:focus-within {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.help-item.open {
    border-color: #60a5fa;
    background: rgba(219, 234, 254, 0.92);
}

.help-item b {
    color: inherit;
}

.help-item p {
    color: #475569;
    font-size: 0.9em;
    line-height: 1.35;
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.2s ease;
}
.help-item.open p {
    max-height: 800px;
    overflow-y: auto;
    opacity: 1;
    margin-top: 8px;
}

.help-item p code {
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.88em;
    font-family: ui-monospace, monospace;
}

.help-item p ol, .help-item p ul {
    margin: 6px 0 0 16px;
    padding: 0;
    color: #475569;
}
.help-item p li {
    margin-bottom: 3px;
}

.help-item.open .help-item-arrow {
    transform: rotate(180deg);
    color: #2563eb;
}

.help-shortcut {
    margin-top: 12px;
    background: #f1f5f9;
    border-left: 4px solid #6366f1;
    border-radius: 10px;
    padding: 10px 12px;
    color: #334155;
    font-size: 0.9em;
}

.help-target-flash {
    animation: helpTargetFlash 0.9s ease;
}

@keyframes helpPulse {
    0%, 100% { box-shadow: 0 10px 28px rgba(20, 184, 166, 0.45); }
    50% { box-shadow: 0 10px 34px rgba(34, 197, 94, 0.65); }
}

@keyframes helpShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes helpCardIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes helpTargetFlash {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45); }
    40% { box-shadow: 0 0 0 9px rgba(14, 165, 233, 0.18); }
    100% { box-shadow: 0 0 0 14px rgba(14, 165, 233, 0); }
}

@media (max-width: 700px) {
    .help-panel {
        right: 12px;
        left: 12px;
        width: auto;
        top: 68px;
    }
    .help-actions {
        grid-template-columns: 1fr;
    }
    .help-fab {
        right: 16px;
        bottom: 16px;
    }
}
