/* ===================================== */
/*              HOTKEYS STYLES           */
/* ===================================== */

/* Помощь по горячим клавишам */
.hotkeys-help {
    padding: 10px;
    max-height: 70vh;
    overflow-y: auto;
}

.hotkeys-category {
    margin-bottom: 24px;
}

.hotkeys-category h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hotkeys-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hotkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    font-size: 13px;
}

.hotkey-item:hover {
    background: rgba(255,255,255,0.05);
}

.hotkey-combo {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--accent);
    font-weight: 600;
    font-size: 12px;
    border: 1px solid rgba(255,215,0,0.2);
}

.hotkey-description {
    color: var(--text-dim);
}

/* Подсказки для кнопок */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(0,0,0,0.9);
    color: white;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 100;
    letter-spacing: 0.5px;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Индикатор нажатой клавиши */
.key-pressed {
    position: fixed;
    bottom: 150px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    z-index: 10000;
    animation: keyPop 0.2s ease;
    box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.key-pressed kbd {
    background: var(--accent);
    color: #000;
    padding: 4px 10px;
    border-radius: 8px;
    margin: 0 4px;
    font-size: 16px;
}

@keyframes keyPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Страница настроек горячих клавиш */
.hotkeys-settings {
    padding: 20px;
}

.hotkey-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hotkey-label {
    color: white;
    font-size: 14px;
}

.hotkey-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotkey-keys {
    background: rgba(0,0,0,0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: monospace;
    color: var(--accent);
    border: 1px solid rgba(255,215,0,0.2);
}

.hotkey-edit {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hotkey-edit:hover {
    color: var(--accent);
    background: rgba(255,255,255,0.1);
}

.hotkey-reset {
    background: rgba(255,75,75,0.1);
    border: 1px solid rgba(255,75,75,0.3);
    color: #ff6b6b;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 20px;
    transition: all 0.2s ease;
}

.hotkey-reset:hover {
    background: rgba(255,75,75,0.2);
}

/* Режим записи горячей клавиши */
.hotkey-recording {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #282828;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 2px solid var(--accent);
    z-index: 10001;
    text-align: center;
    animation: recordingPulse 1.5s infinite;
}

.hotkey-recording h3 {
    color: white;
    margin: 0 0 20px 0;
    font-size: 18px;
}

.hotkey-recording .key-display {
    background: rgba(0,0,0,0.5);
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
    font-family: monospace;
    border: 2px dashed var(--accent);
    margin-bottom: 20px;
}

.hotkey-recording .recording-hint {
    color: var(--text-dim);
    font-size: 14px;
}

@keyframes recordingPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255,215,0,0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(255,215,0,0.6);
    }
}

/* Адаптив */
@media (max-width: 768px) {
    .hotkeys-help {
        padding: 5px;
    }

    .hotkey-item {
        padding: 6px 10px;
        font-size: 12px;
    }

    .hotkey-combo {
        font-size: 11px;
        padding: 3px 6px;
    }

    .key-pressed {
        bottom: 120px;
        right: 10px;
        left: 10px;
        font-size: 16px;
        text-align: center;
    }

    [data-tooltip]:before {
        display: none;
    }

    .hotkey-recording {
        width: 90%;
        padding: 20px;
    }

    .hotkey-recording .key-display {
        padding: 15px 20px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hotkey-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .hotkey-combo {
        align-self: flex-start;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .hotkey-item {
        background: rgba(255,255,255,0.03);
    }
}

/* Уменьшение анимации */
@media (prefers-reduced-motion: reduce) {
    .key-pressed,
    .hotkey-recording,
    [data-tooltip]:before {
        animation: none;
        transition: none;
    }
}