/* Lock Enhancer - Hard difficulty pin & tension system */

/* Hide original UI elements when hard mode is active */
.lockpicking-modal.hard-mode-active .proximity-indicator {
    display: none !important;
}

.lockpicking-modal.hard-mode-active .lock-slider-container {
    display: none !important;
}

.lockpicking-modal.hard-mode-active .lockpicking-hint {
    display: none !important;
}

/* Hard mode custom UI container */
.hard-lock-ui {
    padding: 8px 0 4px;
    animation: hard-lock-fade-in 0.4s ease;
}

@keyframes hard-lock-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pin display area */
.hard-pins-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 8px 0 12px;
    padding: 10px 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hard-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 4px 8px;
    border-radius: 6px;
}

.hard-pin:active {
    transform: scale(0.95);
}

.hard-pin-label {
    font-size: 10px;
    color: rgba(212, 197, 160, 0.5);
    letter-spacing: 0.5px;
}

.hard-pin-visual {
    width: 14px;
    height: 36px;
    border-radius: 7px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hard-pin-visual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
    transition: height 0.3s ease;
}

/* Pin states */
.hard-pin.active .hard-pin-visual {
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.3);
    border-color: rgba(212, 160, 23, 0.4);
}

.hard-pin.active .hard-pin-label {
    color: #d4a017;
}

.hard-pin.set .hard-pin-visual {
    background: linear-gradient(180deg, #4ade80 0%, #22a55a 100%);
    border-color: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
}

.hard-pin.set .hard-pin-label {
    color: #4ade80;
}

.hard-pin.set .hard-pin-visual::after {
    height: 100%;
}

.hard-pin.failed .hard-pin-visual {
    animation: pin-shake 0.4s ease;
    border-color: rgba(248, 113, 113, 0.5);
}

@keyframes pin-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Angle dial - custom visual feedback */
.hard-angle-section {
    margin: 8px 0;
}

.hard-angle-dial {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, #1a1a2e 0%, #0f0f1a 100%);
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: grab;
    touch-action: none;
}

.hard-angle-dial:active {
    cursor: grabbing;
}

/* Color zones based on proximity */
.hard-angle-dial.zone-cold {
    border-color: rgba(100, 150, 200, 0.2);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 12px rgba(100, 150, 200, 0.1);
}

.hard-angle-dial.zone-warm {
    border-color: rgba(200, 180, 100, 0.3);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 16px rgba(200, 180, 100, 0.15);
}

.hard-angle-dial.zone-hot {
    border-color: rgba(250, 150, 80, 0.5);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(250, 150, 80, 0.25);
}

.hard-angle-dial.zone-perfect {
    border-color: rgba(74, 222, 128, 0.6);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 24px rgba(74, 222, 128, 0.35);
    animation: perfect-pulse 0.8s ease infinite;
}

@keyframes perfect-pulse {
    0%, 100% { box-shadow: inset 0 2px 8px rgba(0,0,0,0.6), 0 0 24px rgba(74,222,128,0.35); }
    50% { box-shadow: inset 0 2px 8px rgba(0,0,0,0.6), 0 0 32px rgba(74,222,128,0.5); }
}

/* Dial pointer */
.hard-dial-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 42px;
    background: linear-gradient(0deg, transparent 0%, #d4a017 30%, #f0c040 100%);
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(0deg);
    border-radius: 2px;
    transition: transform 0.1s ease-out;
    box-shadow: 0 0 6px rgba(212, 160, 23, 0.4);
}

.hard-dial-pointer::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f0c040;
    box-shadow: 0 0 8px rgba(240, 192, 64, 0.6);
}

.hard-dial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2a2a3e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2;
}

/* Dial vibration when near */
.hard-angle-dial.vibrate {
    animation: dial-vibrate 0.1s linear infinite;
}

@keyframes dial-vibrate {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 1px); }
}

/* Angle value display (no text hint, just number) */
.hard-angle-value {
    text-align: center;
    font-size: 11px;
    color: rgba(212, 197, 160, 0.4);
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

/* Tension/force bar */
.hard-tension-section {
    margin: 10px 0 6px;
}

.hard-tension-label {
    text-align: center;
    font-size: 10px;
    color: rgba(212, 197, 160, 0.4);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.hard-tension-bar {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

/* Target zone */
.hard-tension-target {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(74, 222, 128, 0.15);
    border-left: 2px solid rgba(74, 222, 128, 0.4);
    border-right: 2px solid rgba(74, 222, 128, 0.4);
    transition: opacity 0.3s ease;
}

/* Moving indicator */
.hard-tension-indicator {
    position: absolute;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background: #d4a017;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(212, 160, 23, 0.6);
    left: 0%;
    transition: none;
}

.hard-tension-indicator.active {
    background: #f0c040;
    box-shadow: 0 0 12px rgba(240, 192, 64, 0.8);
}

/* Tension button */
.hard-tension-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.3);
    color: #d4a017;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    text-align: center;
}

.hard-tension-btn:active,
.hard-tension-btn.pressing {
    background: rgba(212, 160, 23, 0.25);
    border-color: rgba(212, 160, 23, 0.6);
    transform: scale(0.98);
    color: #f0c040;
}

.hard-tension-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Status feedback */
.hard-status {
    text-align: center;
    font-size: 11px;
    color: rgba(212, 197, 160, 0.5);
    min-height: 16px;
    margin-top: 6px;
    transition: color 0.3s;
}

.hard-status.success {
    color: #4ade80;
}

.hard-status.fail {
    color: #f87171;
}

/* Attempts indicator */
.hard-attempts {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
}

.hard-attempt-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.3s;
}

.hard-attempt-dot.used {
    background: rgba(248, 113, 113, 0.6);
}

/* Small screens */
@media (max-width: 380px) {
    .hard-angle-dial {
        width: 100px;
        height: 100px;
    }
    .hard-pins-container {
        gap: 12px;
    }
    .hard-pin-visual {
        height: 30px;
        width: 12px;
    }
}
