

.panel-title {
    margin: 15px 0 20px 0;
    width: 100%;
    text-align: center;
    position: relative; 
}

.panel-title::after {
    content: '';
    position: absolute !important;
    bottom: -8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 120px !important; 
    height: 2px !important;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.4) 20%, 
        #d4af37 50%, 
        rgba(212, 175, 55, 0.4) 80%, 
        transparent 100%
    ) !important;
    transition: all 0.4s ease !important;
    border-radius: 1px !important;
    z-index: 10 !important;
}

.panel-title-text:hover ~ .panel-title::after,
.panel-title:hover::after {
    width: 150px !important;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.6) 10%, 
        #d4af37 25%, 
        #f4d76b 50%, 
        #d4af37 75%, 
        rgba(212, 175, 55, 0.6) 90%, 
        transparent 100%
    ) !important;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5) !important;
    filter: brightness(1.2) !important;
}

.panel-title-text {
    font-size: 19px;
    font-weight: 600;
    color: #b88a2f;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
    overflow: hidden;
    white-space: nowrap;
    width: auto;
    min-width: 20px;
    cursor: pointer;
}

.panel-title-text:hover {
    color: #d4af37;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
    letter-spacing: 2px;
}

.right-panel {
    container-type: inline-size;
}

@container (max-width: 219px) {
    .panel-title-text {
        font-size: 0 !important;
        gap: 0 !important;
        width: 20px !important;
        justify-content: center;
    }
    
    .diamond-svg {
        opacity: 1;
        margin: 0;
    }
}

.right-panel[style*="--right-panel-width"] .panel-title-text {
    font-size: 19px; 
}

@media (max-width: 1px) {
    .right-panel[style*="150px"] .panel-title-text,
    .right-panel[style*="160px"] .panel-title-text,
    .right-panel[style*="170px"] .panel-title-text {
        font-size: 0 !important;
        gap: 0 !important;
        width: 20px !important;
        justify-content: center;
    }
}

.right-panel.collapsed .panel-title-text .diamond-svg {
    margin: 0;
}

.diamond-svg {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
    transition: all 0.4s ease;
    flex-shrink: 0; 
}

.panel-title-text:hover .diamond-svg {
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 1));
    transform: rotateY(180deg);
}

@keyframes spinHorizontal {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

.main-container {
    display: grid;
    grid-template-columns: 300px 1fr var(--right-panel-width, 260px);
    grid-template-rows: 1fr auto;
    gap: 10px;
    padding: 10px;
    height: calc(100vh - 80px);
    transition: grid-template-columns 0.1s ease;
}

.right-panel {
    position: relative;
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);
    border: 1px solid rgba(255, 107, 53, 0.1);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: #666;
    font-size: 14px;
    min-width: 150px;
    max-width: 700px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(75, 45, 85, 0.1);

    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 100px); 
}

.right-panel::-webkit-scrollbar {
    width: 8px;
}

.right-panel::-webkit-scrollbar-track {
    background: rgba(15, 20, 25, 0.5);
    border-radius: 4px;
    margin: 5px 0;
}

.right-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(212, 175, 55, 0.6) 0%, 
        rgba(212, 175, 55, 0.4) 50%,
        rgba(212, 175, 55, 0.6) 100%
    );
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.right-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(212, 175, 55, 0.8) 0%, 
        rgba(212, 175, 55, 0.6) 50%,
        rgba(212, 175, 55, 0.8) 100%
    );
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.right-panel::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, 
        #d4af37 0%, 
        #f4d76b 50%,
        #d4af37 100%
    );
    border-color: #d4af37;
}

.right-panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.6) rgba(15, 20, 25, 0.5);
}

.right-panel > * {
    flex-shrink: 0; 
}

.right-panel::before {
    content: '';
    position: sticky;
    top: 0;
    height: 10px;
    background: linear-gradient(to bottom, 
        rgba(15, 20, 25, 1) 0%, 
        rgba(15, 20, 25, 0) 100%
    );
    z-index: 10;
    pointer-events: none;
    margin: -15px -15px 5px -15px;
}

.right-panel::after {
    content: '';
    position: sticky;
    bottom: 0;
    height: 10px;
    background: linear-gradient(to top, 
        rgba(15, 20, 25, 1) 0%, 
        rgba(15, 20, 25, 0) 100%
    );
    z-index: 10;
    pointer-events: none;
    margin: 5px -15px -15px -15px;
}

.resize-handle {
    position: absolute;
    left: -5px;
    top: 0;
    width: 10px;
    height: calc(100% + 720px); 
    cursor: col-resize;
    z-index: 10;
    transition: background 0.2s ease;
}

.resize-handle:hover {
    background: linear-gradient(to right, 
        transparent, 
        rgba(70, 23, 85, 0.3), 
        transparent
    );
}

.resize-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 30px;
    background: rgba(54, 17, 59, 0.5);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resize-handle:hover::after {
    opacity: 1;
}

.resizing .chart-container {
    pointer-events: none;
    user-select: none;
}

.resizing .right-panel {
    border-left: 2px solid rgba(205, 53, 255, 0.097);
    box-shadow: -5px 0 15px rgba(255, 107, 53, 0.2);
}

.candle-limit-selector {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 16px;
    margin: 15px 0;
    width: 100%;
    transition: all 0.3s ease;
}

.candle-limit-selector:hover {
    background: rgba(25, 22, 28, 0.7);
    border-color: rgba(212, 175, 55, 0.25);
}

.candle-limit-header {
    font-size: 12px;
    font-weight: 500;
    color: #d4af37;
    margin-bottom: 0;
    text-align: left;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.candle-limit-header::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.3s ease;
    color: rgba(212, 175, 55, 0.7);
}

.candle-limit-header.collapsed::after {
    transform: rotate(-90deg);
}

.candle-limit-controls {
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 8px;
}

.candle-limit-controls.collapsed {
    max-height: 0;
    margin-top: 0;
}

.limit-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin: 6px 0;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.limit-option:hover {
    background: rgba(30, 25, 32, 0.5);
}

.limit-option input[type="radio"] {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    accent-color: #d4af37;
    appearance: none;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    background: rgba(75, 45, 85, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.limit-option input[type="radio"]:checked {
    border-color: #d4af37;
    background: radial-gradient(circle, #d4af37 30%, rgba(75, 45, 85, 0.3) 40%);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.limit-option input[type="radio"]:hover {
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.limit-option-label {
    font-size: 12px;
    color: #e8d5e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.limit-option:hover .limit-option-label {
    color: #f0e6f0;
}

.limit-description {
    font-size: 14px;
    color: #d4af37;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
}

.limit-input {
    background: rgba(15, 20, 25, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: #d4af37;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    width: 60px;
    text-align: center;
    transition: all 0.3s ease;
}

.limit-input:enabled {
    background: rgba(25, 22, 28, 0.9);
    border-color: rgba(212, 175, 55, 0.4);
}

.limit-input:enabled:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(30, 25, 32, 0.9);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.limit-input:enabled:hover {
    background: rgba(30, 25, 32, 0.8);
    border-color: rgba(212, 175, 55, 0.5);
}

.limit-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(15, 20, 25, 0.4);
    border-color: rgba(212, 175, 55, 0.1);
    color: rgba(212, 175, 55, 0.3);
}

.candle-limit-selector:disabled,
.candle-limit-selector.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.3);
}

.limit-option input[type="radio"]:disabled + .limit-option-label {
    opacity: 0.6;
    cursor: not-allowed;
    color: #888;
}

@media (max-width: 1200px) {
    .panel-title-text {
        font-size: 17px;
    }
    
    .candle-limit-header {
        font-size: 11px;
    }
}

.user-parameters-selector {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 16px;
    margin: 15px 0;
    width: 100%;
    transition: all 0.3s ease;
}

.user-parameters-selector:hover {
    background: rgba(25, 22, 28, 0.7);
    border-color: rgba(212, 175, 55, 0.25);
}

.user-parameters-header {
    font-size: 15px !important;  
    font-weight: 700 !important; 
    color: #d4af37 !important;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3); 
}

.user-parameters-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.parameter-option {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.parameter-label {
    font-size: 11px;
    color: #e8d5e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    transition: color 0.3s ease;
}

.parameter-value {
    font-size: 12px;
    color: #d4af37;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
    min-width: 35px;
    text-align: right;
}

.parameter-value.auto-calculated {
    color: #ff6b35;
    text-shadow: 0 0 6px rgba(255, 107, 53, 0.3);
}

.parameter-slider {
    width: 100%;
    height: 4px;
    background: rgba(75, 45, 85, 0.3);
    border-radius: 2px;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
}

.parameter-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: #d4af37;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.parameter-slider::-webkit-slider-thumb:hover {
    background: #f4d76b;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
    transform: scale(1.1);
}

.parameter-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #d4af37;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.parameter-slider::-moz-range-thumb:hover {
    background: #f4d76b;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
    transform: scale(1.1);
}

.ranging-display {
    opacity: 0.8;
    padding: 8px 0;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.ranging-display .parameter-label {
    font-style: italic;
    color: #ccc;
}

.user-parameters-selector.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.3);
}

.parameter-slider:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.parameter-slider:disabled::-webkit-slider-thumb {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.parameter-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.parameter-arrow {
    width: 24px;
    height: 24px;
    background: rgba(75, 45, 85, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: #d4af37;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
}

.parameter-arrow:hover {
    background: rgba(75, 45, 85, 0.6);
    border-color: rgba(212, 175, 55, 0.5);
    color: #f4d76b;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.parameter-arrow:active {
    transform: scale(0.95);
    background: rgba(212, 175, 55, 0.2);
}

.parameter-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.parameter-slider-container {
    flex: 1;
    margin: 0 4px;
}

.parameter-option.liquidity-stress {
   background: rgba(255, 107, 53, 0.04);
   border: 1px solid rgba(255, 107, 53, 0.12);
   border-radius: 6px;
   padding: 12px;
   margin: 8px 0;
   position: relative;
   overflow: hidden;
}

.parameter-option.liquidity-stress::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   height: 2px;
   background: linear-gradient(90deg, 
       transparent 0%, 
       rgba(255, 107, 53, 0.3) 20%, 
       rgba(255, 107, 53, 0.5) 50%, 
       rgba(255, 107, 53, 0.3) 80%, 
       transparent 100%
   );
   z-index: 1;
}

.parameter-option.liquidity-stress:hover {
   background: rgba(255, 107, 53, 0.07);
   border-color: rgba(255, 107, 53, 0.18);
   box-shadow: 0 4px 15px rgba(255, 107, 53, 0.05);
}

.parameter-option.liquidity-stress .parameter-label {
   color: rgba(255, 107, 53, 0.9);
   font-weight: 600;
   font-size: 12px;
   text-shadow: 0 0 4px rgba(255, 107, 53, 0.15);
   position: relative;
}

.parameter-option.liquidity-stress .parameter-label::before {
   content: '⚡';
   margin-right: 6px;
   font-size: 14px;
   filter: drop-shadow(0 0 3px rgba(255, 107, 53, 0.3));
   animation: stressPulse 2s infinite;
}

@keyframes stressPulse {
   0%, 100% { opacity: 0.8; transform: scale(1); }
   50% { opacity: 0.6; transform: scale(1.05); }
}

.parameter-option.liquidity-stress .parameter-value {
   color: rgba(255, 107, 53, 0.9);
   text-shadow: 0 0 5px rgba(255, 107, 53, 0.2);
   font-weight: 700;
   font-size: 13px;
}

.parameter-option.liquidity-stress .parameter-slider {
   background: rgba(255, 107, 53, 0.12);
   height: 6px;
   border-radius: 3px;
}

.parameter-option.liquidity-stress .parameter-slider::-webkit-slider-thumb {
   width: 16px;
   height: 16px;
   background: linear-gradient(135deg, rgba(255, 107, 53, 0.8), rgba(255, 140, 97, 0.8));
   border-radius: 50%;
   box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
   border: 2px solid rgba(255, 255, 255, 0.15);
}

.parameter-option.liquidity-stress .parameter-slider::-webkit-slider-thumb:hover {
   background: linear-gradient(135deg, rgba(255, 140, 97, 0.9), rgba(255, 173, 138, 0.9));
   box-shadow: 0 0 12px rgba(255, 107, 53, 0.6);
   transform: scale(1.15);
}

.parameter-option.liquidity-stress .parameter-arrow {
   background: rgba(255, 107, 53, 0.12);
   border-color: rgba(255, 107, 53, 0.25);
   color: rgba(255, 107, 53, 0.9);
   font-weight: bold;
}

.parameter-option.liquidity-stress .parameter-arrow:hover {
   background: rgba(255, 107, 53, 0.18);
   border-color: rgba(255, 107, 53, 0.35);
   color: rgba(255, 140, 97, 0.95);
   box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.parameter-option.liquidity-stress .parameter-label::after {
   position: absolute;
   bottom: -20px;
   left: 20px;
   font-size: 9px;
   color: rgba(255, 107, 53, 0.5);
   font-style: italic;
   font-weight: 400;
   text-shadow: none;
   opacity: 0;
   transition: opacity 0.3s ease;
   pointer-events: none;
   white-space: nowrap;
}

.parameter-option.liquidity-stress:hover .parameter-label::after {
   opacity: 1;
}

@container (max-width: 219px) {
   .parameter-option.liquidity-stress .parameter-label::after {
       display: none;
   }
   
   .parameter-option.liquidity-stress .parameter-label::before {
       margin-right: 3px;
   }

   .resize-handle {
        position: absolute !important;
        left: -5px !important;
        top: 0 !important;
        width: 10px !important;
        height: calc(100% + 920px) !important; 
        z-index: 9999 !important;
        cursor: col-resize !important;
        pointer-events: auto !important;
    }

}

.black-swan-container {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 6px;
    padding: 16px;
    margin: 15px 0;
    width: 100%;
    transition: all 0.3s ease;
}

.black-swan-container:hover {
    background: rgba(25, 22, 28, 0.7);
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.1);
}

.black-swan-header {
    font-size: 12px;
    font-weight: 500;
    color: #ff6b35;
    margin-bottom: 12px;
    text-align: left;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.black-swan-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.4));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.black-swan-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.black-swan-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(75, 45, 85, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    color: #e8d5e8;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.black-swan-btn:hover {
    background: rgba(75, 45, 85, 0.5);
    border-color: rgba(212, 175, 55, 0.4);
    color: #f0e6f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 45, 85, 0.3);
}

.black-swan-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(75, 45, 85, 0.2);
}

.event-icon {
    font-size: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px currentColor);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    text-align: left;
}

.event-name {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.event-description {
    font-size: 10px;
    opacity: 0.8;
    font-style: italic;
    color: #ccc;
}

@container (max-width: 219px) {
    .black-swan-header {
        font-size: 0 !important; 
        text-align: center;
        margin-bottom: 12px;
        display: block !important;
        justify-content: center !important;
    }
    
    .black-swan-header::before {
        content: "Trading Session"; 
        font-size: 11px !important; 
        font-weight: 500;
        color: #ff6b35;
        display: block;
        text-align: center;
        width: 100%;
        
        white-space: normal !important; 
        word-break: break-word !important; 
        line-height: 1.2 !important; 
        overflow-wrap: break-word !important; 
    }
    
    .black-swan-icon {
        display: none !important; 
    }
    
    .black-swan-btn {
        padding: 8px 6px;
        gap: 6px;
    }
    
    .event-details {
        gap: 1px;
    }

    .event-name {
        font-size: 0 !important; 
        position: relative;
    }

    .black-swan-btn:first-child .event-name::before {
        content: "London-NY";
        font-size: 8px !important;
        font-weight: 600;
        color: #e8d5e8;
        display: block;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.1 !important;
        text-align: left !important;
        overflow-wrap: break-word !important;
    }

    .black-swan-btn:last-child .event-name::before {
        content: "Reset";
        font-size: 9px !important;
        font-weight: 600;
        color: #e8d5e8;
        display: block;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.1 !important;
        text-align: left !important;
        overflow-wrap: break-word !important;
    }
    
    .event-description {
        display: none; 
    }
    
    .event-icon {
        font-size: 14px;
        align-self: flex-start !important; 
    }
}

@keyframes blackSwanFeedbackIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes blackSwanFeedbackOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

.black-swan-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.95), rgba(25, 22, 28, 0.95));
    border-radius: 12px;
    padding: 20px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    animation: blackSwanFeedbackIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.feedback-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feedback-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 8px currentColor);
}

.feedback-text {
    white-space: nowrap;
    text-shadow: 0 0 8px currentColor;
}

.user-parameters-selector.session-frozen .parameter-slider {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.user-parameters-selector.session-frozen .parameter-slider::-webkit-slider-thumb {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.reset-btn:hover {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.reset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

@container (max-width: 180px) {

    .parameter-slider-container {
        display: none;
    }
    
    .parameter-controls-row {
        justify-content: center;
        gap: 6px;
    }
    
    .parameter-arrow {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .parameter-label {
        font-size: 9px !important;
        color: #e8d5e8 !important;
        font-weight: 600 !important;
        text-shadow: 0 0 2px rgba(232, 213, 232, 0.4);
    }

    .parameter-value {
        font-size: 13px !important;
        font-weight: 700;
    }
    
}

@container (max-width: 219px) {

    .candle-limit-selector {
    pointer-events: none !important;
    opacity: 0.6 !important;
    }

    .candle-limit-header {
        text-align: center !important; 
        justify-content: center !important; 
    }

    .candle-limit-controls {
    display: none !important;
    }

    .candle-limit-header::after {
        display: none !important;
    }

    .candle-limit-selector::after {
        content: var(--candle-limit-value, "1000");
        display: block;
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: #d4af37;
        margin-top: 4px;
        padding: 8px;
        background: rgba(25, 22, 28, 0.6);
        border-radius: 4px;
    }

    .user-parameters-header {
        font-size: 12px !important;
        text-align: center;
        margin-bottom: 12px;
        font-weight: 600;
    }

    .candle-limit-selector,
    .user-parameters-selector,
    .black-swan-container {
        padding: 12px 8px;
        margin: 8px 0;
    }

    .parameter-option {
        background: rgba(15, 20, 25, 0.8);
        border-radius: 6px;
        padding: 12px 8px;
        margin: 6px 0;
        border: 1px solid rgba(212, 175, 55, 0.15);
        text-align: center;
    }
    
    .parameter-option:hover {
        background: rgba(25, 22, 28, 0.9);
        border-color: rgba(212, 175, 55, 0.25);
    }

    .parameter-label {
        display: block !important;
        text-align: center !important;
        margin-bottom: 6px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #e8d5e8 !important;
        width: 100%;
    }

    .parameter-label .parameter-value {
        display: block !important;
        text-align: center !important;
        margin: 6px 0 10px 0 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-shadow: 0 0 8px currentColor !important;
        width: 100%;
        position: relative;
        color: #d4af37 !important;
    }

    .parameter-controls-row {
        margin-top: 8px !important;
        gap: 10px;
        justify-content: center;
    }

    .parameter-arrow {
        width: 32px;
        height: 30px;
        font-size: 16px;
        font-weight: 900;
        background: rgba(75, 45, 85, 0.6);
        border: 2px solid rgba(212, 175, 55, 0.4);
        border-radius: 6px;
    }
    
    .parameter-arrow:hover {
        background: rgba(212, 175, 55, 0.2);
        border-color: rgba(212, 175, 55, 0.7);
        transform: scale(1.1);
    }
}

@container (max-width: 219px) {
    .parameter-option.liquidity-stress {
        background: rgba(255, 107, 53, 0.08) !important;
        border: 1px solid rgba(255, 107, 53, 0.2) !important;
    }
    
    .parameter-option.liquidity-stress::before {
        display: none !important;
    }
    
    .parameter-option.liquidity-stress .parameter-label::before {
        display: none !important;
    }
    
    .parameter-option.liquidity-stress .parameter-label {
        color: rgba(255, 107, 53, 0.9) !important;
    }
    
    .parameter-option.liquidity-stress .parameter-label .parameter-value {
        color: rgba(255, 107, 53, 0.95) !important;
        text-shadow: 0 0 8px rgba(255, 107, 53, 0.4) !important;
    }
    
    .parameter-option.liquidity-stress .parameter-arrow {
        background: rgba(255, 107, 53, 0.15) !important;
        border-color: rgba(255, 107, 53, 0.4) !important;
        color: rgba(255, 107, 53, 0.9) !important;
    }
}

@container (max-width: 180px) {
    .parameter-slider-container {
        display: none;
    }
    
    .parameter-arrow {
        width: 34px;
        height: 32px;
        font-size: 17px;
    }
    
    .parameter-label .parameter-value {
        font-size: 18px !important;
    }
    
    .parameter-label {
        font-size: 13px !important;
    }

}

.ny-london-btn:disabled,
.ny-london-btn.session-active {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.ny-london-btn.session-active::before {
    content: "✓ ";
}

.data-export-selector {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 16px;
    margin: 15px 0;
    width: 100%;
    transition: all 0.3s ease;
}

.data-export-selector:hover {
    background: rgba(25, 22, 28, 0.7);
    border-color: rgba(212, 175, 55, 0.25);
}

.data-export-header {
    font-size: 15px !important;  
    font-weight: 700 !important; 
    color: #d4af37 !important;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3); 
}

.data-export-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.export-option {
    width: 100%;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    width: 100%;
    background: rgba(75, 45, 85, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    color: #e8d5e8;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.export-btn:hover {
    background: rgba(75, 45, 85, 0.5);
    border-color: rgba(212, 175, 55, 0.4);
    color: #f0e6f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 45, 85, 0.3);
}

.export-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(75, 45, 85, 0.2);
}

.export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
    transform: none;
}

.export-icon {
    font-size: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px currentColor);
}

.export-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    text-align: left;
}

.export-name {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.export-description {
    font-size: 10px;
    opacity: 0.8;
    font-style: italic;
    color: #ccc;
}

@container (max-width: 219px) {
    .data-export-header {
        text-align: center !important;
        font-size: 11px !important;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.2 !important;
        overflow-wrap: break-word !important;
    }
    
    .export-btn {
        padding: 8px 6px;
        gap: 6px;
    }
    
    .export-details {
        gap: 1px;
    }
    
    .export-name {
        font-size: 9px !important;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.1 !important;
        overflow-wrap: break-word !important;
    }
    
    .export-description {
        font-size: 8px;
        display: block; 
    }
    
    .export-icon {
        font-size: 14px;
        align-self: flex-start !important;
    }
}

@container (max-width: 180px) {
    .data-export-selector {
        padding: 12px 8px;
        margin: 8px 0;
    }
    
    .export-btn {
        padding: 10px 8px;
        gap: 8px;
    }
    
    .export-name {
        font-size: 10px !important;
    }
    
    .export-description {
        display: none; 
    }
}

.export-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(0.5);
    background: rgba(75, 45, 85, 0.1) !important;
    border-color: rgba(212, 175, 55, 0.1) !important;
    color: #666 !important;
}

.export-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    background: rgba(75, 45, 85, 0.1) !important;
}

.export-btn:disabled .export-icon {
    filter: grayscale(1) opacity(0.5);
}

.export-btn:disabled .export-name,
.export-btn:disabled .export-description {
    color: #666 !important;
}

.black-swan-container.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.3);
}

.black-swan-container.disabled .black-swan-btn {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(75, 45, 85, 0.1) !important;
    border-color: rgba(212, 175, 55, 0.1) !important;
    color: #666 !important;
}

.black-swan-container.disabled .black-swan-btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

.bot-api-selector {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 16px;
    margin: 15px 0;
    width: 100%;
    transition: all 0.3s ease;
}

.bot-api-selector:hover {
    background: rgba(25, 22, 28, 0.7);
    border-color: rgba(212, 175, 55, 0.25);
}

.bot-api-header {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #d4af37 !important;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.bot-api-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@container (max-width: 219px) {
    .bot-api-header {
        text-align: center !important;
        font-size: 11px !important;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.2 !important;
        overflow-wrap: break-word !important;
    }
    
    .bot-api-selector {
        padding: 12px 8px;
        margin: 8px 0;
    }
}

.candle-limit-selector.limit-locked,
.user-parameters-selector.limit-locked {
    position: relative;
    pointer-events: none; 
    user-select: none;
}

.candle-limit-selector.limit-locked::before,
.user-parameters-selector.limit-locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(2px) saturate(0.85);
    -webkit-backdrop-filter: blur(2px) saturate(0.85);
    background: rgba(20, 20, 30, 0.3);
    border-radius: 8px;
    z-index: 100;
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.4);
    pointer-events: auto;
    cursor: not-allowed;
}

.candle-limit-selector.limit-locked::after {
    content: '🔒\A LIMIT REACHED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    pointer-events: none;

    white-space: pre;
    text-align: center;
    line-height: 1.4;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 900;
    color: #d4af37;
    letter-spacing: 1.5px;
    font-size: 10px;

    text-shadow: 
        0 0 10px rgba(212, 175, 55, 1),
        0 0 20px rgba(212, 175, 55, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.9);
}

.user-parameters-selector.limit-locked::after {
    content: '🔒\A LIMIT REACHED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -80%); 
    z-index: 101;
    pointer-events: none;

    white-space: pre;
    text-align: center;
    line-height: 1.4;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 900;
    color: #d4af37;
    letter-spacing: 1.5px;
    font-size: 12px;

    text-shadow: 
        0 0 10px rgba(212, 175, 55, 1),
        0 0 20px rgba(212, 175, 55, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.9);
}

.limit-upgrade-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 30%); 
    z-index: 102;
    pointer-events: auto !important; 
    cursor: pointer !important;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #d4af37 0%, #f4d76b 50%, #d4af37 100%);
    border: 2px solid #f4d76b;
    border-radius: 8px;
    box-shadow: 
        0 4px 15px rgba(212, 175, 55, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.3),
        0 0 20px rgba(212, 175, 55, 0.4);

    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff; 
    text-align: center;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(0, 0, 0, 0.5);
    white-space: nowrap;

    animation: buttonPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.limit-upgrade-button:hover {
    transform: translate(-50%, 30%) scale(1.08);
    box-shadow: 
        0 6px 20px rgba(212, 175, 55, 0.9),
        inset 0 1px 3px rgba(255, 255, 255, 0.4),
        0 0 30px rgba(212, 175, 55, 0.7);
    background: linear-gradient(135deg, #f4d76b 0%, #ffd700 50%, #f4d76b 100%);
}

.limit-upgrade-button:active {
    transform: translate(-50%, 30%) scale(1.02);
}

.limit-upgrade-button::before {
    display: none;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(212, 175, 55, 0.6),
            inset 0 1px 3px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(212, 175, 55, 0.8),
            inset 0 1px 3px rgba(255, 255, 255, 0.4),
            0 0 30px rgba(212, 175, 55, 0.6);
    }
}

.candle-limit-selector.limit-locked *:not(.limit-upgrade-button),
.user-parameters-selector.limit-locked *:not(.limit-upgrade-button) {
    pointer-events: none !important;
    user-select: none !important;
}

.limit-reached-message {
    position: fixed;
    top: 100px;
    right: 30px;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.95), rgba(75, 45, 85, 0.95));
    border: 2px solid rgba(212, 175, 55, 0.8);
    border-radius: 12px;
    padding: 20px 24px;
    z-index: 950;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 25px rgba(212, 175, 55, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideInFromRight 0.5s ease-out;
    max-width: 320px;
}

.limit-reached-message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.limit-reached-message-icon {
    font-size: 28px;
}

.limit-reached-message-title {
    color: #d4af37;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.limit-reached-message-body {
    color: #e8d5e8;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.limit-reached-message-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 16px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #ff6b35;
}

.limit-reached-message-buttons {
    display: flex;
    gap: 10px;
}

.limit-message-upgrade-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(45deg, #d4af37, #f4d76b);
    border: none;
    border-radius: 6px;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.limit-message-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    background: linear-gradient(45deg, #f4d76b, #d4af37);
}

.limit-message-close-btn {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #e8d5e8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.limit-message-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

@keyframes slideInFromRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.candle-limit-selector,
.user-parameters-selector {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.candle-limit-selector.ready,
.user-parameters-selector.ready {
    opacity: 1;
}

@container (max-width: 219px) {
    
    .candle-limit-selector.limit-locked::after {
        font-size: 8px !important;
        letter-spacing: 0.8px !important;
        line-height: 1.2 !important;
    }
    
    .user-parameters-selector.limit-locked::after {
        font-size: 9px !important;
        letter-spacing: 1px !important;
        line-height: 1.2 !important;
        transform: translate(-50%, -50%) !important; 
    }

    .limit-upgrade-button {
        display: none !important;
    }
}

