

.strategy-content {
    display: none;
    animation: fadeInStrategy 0.3s ease-in-out;
    max-width: 280px;
    width: 100%;
    margin-top: 20px;
}

@keyframes fadeInStrategy {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.strategy-section {
    background: rgba(75, 45, 85, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 10px 12px;
    transition: all 0.3s ease;
    position: relative;
}

.strategy-section:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
}

.strategy-section-header {
    color: #d4af37;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strategy-toggle-section {
    background: rgba(75, 45, 85, 0.12);
    border-color: rgba(212, 175, 55, 0.3);
}

.strategy-content.strategy-active .strategy-toggle-section {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2);
}

.strategy-toggle-container {
    display: flex;
    align-items: center;
}

.strategy-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 10px;
}

.strategy-checkbox {
    display: none;
}

.strategy-toggle-slider {
    position: relative;
    width: 45px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.strategy-toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #666;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.strategy-checkbox:checked + .strategy-toggle-slider {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}

.strategy-checkbox:checked + .strategy-toggle-slider::before {
    transform: translateX(21px);
    background: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.strategy-toggle-text {
    color: #e0e0e0;
    font-size: 11px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.strategy-checkbox:checked + .strategy-toggle-slider + .strategy-toggle-text {
    color: #4CAF50;
}

.trading-config-container {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-height: 500px; 
}

.trading-config-container.minimized {
    max-height: 35px; 
    padding: 8px 15px;
    border-color: #d4af37;;
    background: rgba(75, 45, 85, 0.05);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2);
}

.trading-config-container.minimized .strategy-subsection,
.trading-config-container.minimized .apply-button-section {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.trading-config-container.minimized .strategy-section-header {
    opacity: 1;
    transform: none;
    color: #d4af37;
    position: relative;
}

.trading-config-container .strategy-subsection,
.trading-config-container .apply-button-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.applied-indicator {
    color: #d4af37 !important;
    font-size: 12px !important;
    font-weight: bold !important;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.8), 0 0 12px rgba(212, 175, 55, 0.6) !important;
    animation: fadeInSuccess 0.5s ease-in-out;
}

@keyframes fadeInSuccess {
    from { 
        opacity: 0; 
        transform: scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.balance-feedback {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3) !important;
    transition: box-shadow 0.5s ease;
}

.commission-feedback {
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3) !important;
    transition: box-shadow 0.5s ease;
}

.commission-input-feedback {
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.4) !important;
    transition: box-shadow 0.3s ease;
}

.trading-container-apply-glow {
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.4) !important;
    transition: box-shadow 0.3s ease;
}

.strategy-subsection {
    background: rgba(40, 44, 52, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 10px 12px;
    transition: all 0.3s ease;
}

.strategy-subsection:last-child {
    margin-bottom: 0;
}

.strategy-subsection:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.1);
}

.strategy-subsection-header {
    color: #d4af37;
    font-size: 9px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.balance-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.balance-option {
    display: flex;
    align-items: center;
}

.balance-option input[type="radio"] {
    display: none;
}

.balance-option-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    background: rgba(40, 44, 52, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e0e0e0;
    font-size: 11px;
    font-weight: 500;
}

.balance-option-label:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(40, 44, 52, 0.8);
}

.balance-option input[type="radio"]:checked + .balance-option-label {
    background: rgba(212, 175, 55, 0.15);
    border-color: #d4af37;
    color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.balance-description {
    font-size: 8px;
    color: #999;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-option input[type="radio"]:checked + .balance-option-label .balance-description {
    color: #d4af37;
    opacity: 0.8;
}

.commission-options {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.commission-option {
    display: flex;
    align-items: center;
}

.commission-option input[type="radio"] {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    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;
    flex-shrink: 0;
}

.commission-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);
}

.commission-option input[type="radio"]:hover {
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.commission-option-label {
    font-size: 11px;
    color: #e8d5e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 6px 8px;
    margin: 4px 0;
    border-radius: 4px;
    background: rgba(30, 25, 32, 0.3);
}

.commission-option-label:hover {
    color: #f0e6f0;
    background: rgba(30, 25, 32, 0.5);
}

.commission-input {
    background: rgba(15, 20, 25, 0.8);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 4px;
    color: #d4af37;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    width: 50px;
    text-align: center;
    transition: all 0.3s ease;
    margin-left: 15px;
    flex-shrink: 0;
}

.commission-input:enabled {
    background: rgba(25, 22, 28, 0.9);
    border-color: #d4af37;
}

.commission-input:enabled:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(30, 25, 32, 0.9);
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.2);
}

.commission-input:enabled:hover {
    background: rgba(30, 25, 32, 0.8);
    border-color: #d4af37;
}

.commission-input::-webkit-outer-spin-button,
.commission-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.commission-input[type=number] {
    -moz-appearance: textfield;
}

.commission-input.invalid {
    border-color: #f44336 !important;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.4) !important;
    color: #f44336 !important;
}

.commission-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease !important;
}

.strategy-content input[type="number"]::-webkit-outer-spin-button,
.strategy-content input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.strategy-content input[type="number"] {
    -moz-appearance: textfield;
}

.commission-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(15, 20, 25, 0.4);
    border-color: rgba(255, 107, 53, 0.1);
    color: rgba(255, 107, 53, 0.3);
}

.strategy-content.strategy-active {
    position: relative;
}

.strategy-content.strategy-active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    border-radius: 10px;
    z-index: -1;
    opacity: 0.6;
    animation: strategyActiveGlow 2s ease-in-out infinite alternate;
}

@keyframes strategyActiveGlow {
    from { opacity: 0.3; }
    to { opacity: 0.6; }
}

.strategy-content.strategy-frozen {
    position: relative !important;
}

.strategy-frozen .trading-config-container {
    opacity: 0.2 !important;
    filter: grayscale(100%) contrast(0.5) brightness(0.4) !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    position: relative !important;
}

.strategy-frozen .trading-config-container::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 30px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    z-index: 1000 !important;
    pointer-events: none !important;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 1) !important;
    animation: lockBlink 1.5s ease-in-out infinite !important;
}

@keyframes lockBlink {
    0%, 50%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    25%, 75% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.strategy-frozen .balance-option-label {
    background: rgba(20, 20, 20, 0.5) !important;
    border: 2px solid rgba(80, 80, 80, 0.3) !important;
    color: #444 !important;
    cursor: not-allowed !important;
}

.strategy-frozen .balance-option-label:hover {
    background: rgba(20, 20, 20, 0.5) !important;
    border: 2px solid rgba(80, 80, 80, 0.3) !important;
    color: #444 !important;
    box-shadow: none !important;
}

.strategy-frozen .balance-option input[type="radio"]:checked + .balance-option-label {
    background: rgba(20, 20, 20, 0.5) !important;
    border: 2px solid rgba(80, 80, 80, 0.3) !important;
    color: #444 !important;
    box-shadow: none !important;
}

.strategy-frozen .balance-description {
    color: #333 !important;
}

.strategy-frozen .commission-option-label {
    background: rgba(20, 20, 20, 0.5) !important;
    color: #444 !important;
    cursor: not-allowed !important;
}

.strategy-frozen .commission-option-label:hover {
    background: rgba(20, 20, 20, 0.5) !important;
    color: #444 !important;
}

.strategy-frozen .commission-option input[type="radio"] {
    border-color: rgba(80, 80, 80, 0.3) !important;
    background: rgba(20, 20, 20, 0.5) !important;
    cursor: not-allowed !important;
}

.strategy-frozen .commission-option input[type="radio"]:checked {
    border-color: rgba(80, 80, 80, 0.3) !important;
    background: rgba(20, 20, 20, 0.5) !important;
    box-shadow: none !important;
}

.strategy-frozen .commission-input {
    background: rgba(20, 20, 20, 0.4) !important;
    border: 1px solid rgba(80, 80, 80, 0.3) !important;
    color: #444 !important;
    cursor: not-allowed !important;
}

.strategy-frozen .strategy-subsection-header {
    color: #444 !important;
}

.strategy-frozen .strategy-toggle-section {
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
    cursor: auto !important;
}

.strategy-frozen .strategy-toggle-section::after {
    display: none !important;
}

.strategy-frozen .strategy-toggle-label {
    cursor: pointer !important;
}

.strategy-frozen .strategy-toggle-slider {
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(212, 175, 55, 0.3) !important;
}

.strategy-frozen .strategy-toggle-text {
    color: #e0e0e0 !important;
}

.apply-button-section {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.apply-config-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    color: #d4af37;
    font-size: 10px;
    font-weight: 500;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apply-config-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(212, 175, 55, 0.7));
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
}

.apply-config-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
}

.apply-config-btn:disabled {
    background: rgba(80, 80, 80, 0.3);
    border-color: rgba(80, 80, 80, 0.4);
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.apply-config-btn:disabled:hover {
    background: rgba(80, 80, 80, 0.3);
    border-color: rgba(80, 80, 80, 0.4);
    transform: none;
    box-shadow: none;
}

.apply-config-btn.applied {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.8), rgba(76, 175, 80, 0.6));
    border-color: #4CAF50;
    color: #1a1a1a;
}

@media (max-width: 400px) {
    .strategy-content {
        max-width: 260px;
    }
    
    .balance-option-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .strategy-toggle-label {
        gap: 8px;
    }
    
    .strategy-toggle-slider {
        width: 40px;
        height: 22px;
    }
    
    .strategy-toggle-slider::before {
        width: 14px;
        height: 14px;
    }
    
    .strategy-checkbox:checked + .strategy-toggle-slider::before {
        transform: translateX(18px);
    }
    
    .strategy-frozen .trading-config-container::after {
        font-size: 24px !important;
    }
    
    .commission-input {
        width: 45px;
        font-size: 10px;
    }
    
    .commission-option-label {
        padding: 5px 6px;
        font-size: 10px;
    }
    
    .strategy-section {
        padding: 8px 10px;
    }
    
    .trading-config-container {
        padding: 10px 12px;
    }
    
    .strategy-subsection {
        padding: 8px 10px;
    }
    
    .apply-config-btn {
        font-size: 10px;
        padding: 6px 12px;
        min-width: 120px;
    }
    
    .apply-button-section {
        margin-top: 12px;
        padding-top: 10px;
    }
}

.balance-option-label:focus,
.commission-option-label:focus,
.strategy-toggle-label:focus {
    outline: 2px solid rgba(212, 175, 55, 0.5);
    outline-offset: 2px;
}

.strategy-section:focus-within {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

* {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.exposure-config-container {
    display: none;
}

.leverage-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leverage-option {
    display: flex;
    align-items: center;
}

.leverage-checkbox {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    accent-color: #d4af37;
    appearance: none;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 3px;
    background: rgba(75, 45, 85, 0.3);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.leverage-checkbox:checked {
    border-color: #d4af37;
    background: #d4af37;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.leverage-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 1px;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: bold;
}

.leverage-checkbox:hover {
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.leverage-option-label {
    font-size: 11px;
    color: #e8d5e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 6px 8px;
    margin: 4px 0;
    border-radius: 4px;
    background: rgba(30, 25, 32, 0.3);
}

.leverage-option-label:hover {
    color: #f0e6f0;
    background: rgba(30, 25, 32, 0.5);
}

.leverage-input {
    background: rgba(15, 20, 25, 0.8);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 4px;
    color: #d4af37;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    width: 60px;
    text-align: center;
    transition: all 0.3s ease;
    margin-left: 15px;
    flex-shrink: 0;
}

.leverage-input:enabled {
    background: rgba(25, 22, 28, 0.9);
    border-color: #d4af37;
}

.leverage-input:enabled:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(30, 25, 32, 0.9);
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.2);
}

.leverage-input:enabled:hover {
    background: rgba(30, 25, 32, 0.8);
    border-color: #d4af37;
}

.leverage-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(15, 20, 25, 0.4);
    border-color: rgba(255, 107, 53, 0.1);
    color: rgba(255, 107, 53, 0.3);
}

.exposure-config-container input[type="number"]::-webkit-outer-spin-button,
.exposure-config-container input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.exposure-config-container input[type="number"] {
    -moz-appearance: textfield;
}

.strategy-frozen .exposure-config-container {
    opacity: 0.2 !important;
    filter: grayscale(100%) contrast(0.5) brightness(0.4) !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}
.strategy-frozen .leverage-option-label {
    background: rgba(20, 20, 20, 0.5) !important;
    color: #444 !important;
    cursor: not-allowed !important;
}

.strategy-frozen .leverage-checkbox {
    border-color: rgba(80, 80, 80, 0.3) !important;
    background: rgba(20, 20, 20, 0.5) !important;
    cursor: not-allowed !important;
}

.strategy-frozen .leverage-input {
    background: rgba(20, 20, 20, 0.4) !important;
    border: 1px solid rgba(80, 80, 80, 0.3) !important;
    color: #444 !important;
    cursor: not-allowed !important;
}

.leverage-input.invalid {
    border-color: #f44336 !important;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.4) !important;
    color: #f44336 !important;
}

.leverage-input {
    background: rgba(15, 20, 25, 0.8);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 4px;
    color: #d4af37;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 6px;
    width: 40px; 
    text-align: center;
    transition: all 0.3s ease;
    margin-left: 0;
    flex-shrink: 0;
}

.leverage-input-container {
    display: flex;
    align-items: center;
    gap: 5px; 
    margin-left: 15px;
}

.leverage-ratio-text {
    color: #d4af37;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}

.leverage-display {
    font-size: 10px;
    color: #d4af37;
    font-weight: 500;
    opacity: 0.8;
    min-width: 30px;
}

.exposure-container-apply-glow {
    box-shadow: 0 0 20px #d4af37 !important;
    transition: box-shadow 0.3s ease;
}

.exposure-config-container.minimized {
    max-height: 35px;
    padding: 8px 15px;
    border-color: #d4af37;
    background: rgba(75, 45, 85, 0.05);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.2);
}

.exposure-config-container.minimized .strategy-subsection,
.exposure-config-container.minimized .apply-button-section {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.exposure-config-container.minimized .strategy-section-header {
    opacity: 1;
    transform: none;
    color: #d4af37;
    position: relative;
}

.exposure-config-container .strategy-subsection,
.exposure-config-container .apply-button-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.apply-config-btn.ready {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
    cursor: pointer;
}

.apply-config-btn.ready:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.2));
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.apply-config-btn.invalid {
    background: rgba(60, 60, 60, 0.3);
    border-color: rgba(100, 100, 100, 0.4);
    color: rgba(140, 140, 140, 0.8);
    cursor: not-allowed;
}

.apply-config-btn.invalid:hover {
    background: rgba(60, 60, 60, 0.3);
    border-color: rgba(100, 100, 100, 0.4);
    color: rgba(140, 140, 140, 0.8);
    transform: none;
    box-shadow: none;
}

.apply-config-btn:disabled.invalid {
    background: rgba(60, 60, 60, 0.3) !important;
    border-color: rgba(100, 100, 100, 0.4) !important;
    color: rgba(140, 140, 140, 0.8) !important;
    cursor: not-allowed !important;
}

.apply-config-btn:disabled:not(.invalid) {
    background: rgba(80, 80, 80, 0.3);
    border-color: rgba(80, 80, 80, 0.4);
    color: #666;
    cursor: not-allowed;
}

.apply-config-btn.ready {
    animation: readyPulse 2s infinite;
}

@keyframes readyPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    }
}

.apply-config-btn.ready:hover {
    animation: none;
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.lock-status-main {
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.lock-status-sub {
    color: #999;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0.8;
}

.lock-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.lock-config-btn,
.unlock-config-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    color: #d4af37;
    font-size: 10px;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.lock-config-btn.ready {
    background: transparent;
    border-color: rgba(212, 175, 55, 0.6);
    color: #d4af37;
    cursor: pointer;
    animation: lockReadyPulse 2s infinite;
}

.lock-config-btn.ready:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
    animation: none;
}

@keyframes lockReadyPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    }
}

.lock-config-btn.invalid {
    background: rgba(60, 60, 60, 0.3);
    border-color: rgba(100, 100, 100, 0.4);
    color: rgba(140, 140, 140, 0.8);
    cursor: not-allowed;
}

.lock-config-btn.invalid:hover {
    background: rgba(60, 60, 60, 0.3);
    border-color: rgba(100, 100, 100, 0.4);
    transform: none;
    box-shadow: none;
}

.lock-config-btn:disabled.invalid {
    background: rgba(60, 60, 60, 0.3) !important;
    border-color: rgba(100, 100, 100, 0.4) !important;
    color: rgba(140, 140, 140, 0.8) !important;
    cursor: not-allowed !important;
}

.unlock-config-btn {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.4);
    color: #ff6b35;
}

.unlock-config-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transform: translateY(-1px);
}

.unlock-config-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.4);
}

.configuration-locked {
    opacity: 0.6;
    filter: grayscale(30%);
    pointer-events: none;
    position: relative;
}

.configuration-locked::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    z-index: 10;
    opacity: 0.7;
    animation: lockIndicatorPulse 2s infinite ease-in-out;
}

@keyframes lockIndicatorPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.configuration-feedback {
    animation: slideInRight 0.3s ease-out;
}

.configuration-feedback .feedback-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.configuration-feedback .feedback-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.configuration-feedback .feedback-text {
    flex: 1;
    line-height: 1.3;
}

@media (max-width: 400px) {
    
    .lock-status-main {
        font-size: 11px;
    }
    
    .lock-status-sub {
        font-size: 9px;
    }
    
    .lock-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .lock-config-btn,
    .unlock-config-btn {
        font-size: 9px;
        padding: 6px 10px;
        min-height: 26px;
    }
}

.strategy-frozen .lock-config-btn,
.strategy-frozen .unlock-config-btn {
    background: rgba(60, 60, 60, 0.3) !important;
    border-color: rgba(100, 100, 100, 0.4) !important;
    color: rgba(140, 140, 140, 0.6) !important;
    cursor: not-allowed !important;
}

.strategy-frozen .lock-status-main,
.strategy-frozen .lock-status-sub {
    color: #444 !important;
}

.lock-config-btn[disabled]::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(40, 44, 52, 0.95);
    color: #e0e0e0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 9px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.lock-config-btn[disabled]:hover::before {
    opacity: 1;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.config-summary {
    margin-top: 15px;
    margin-bottom: 25px !important;  
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    max-width: 280px;
    width: 100%;
}

.config-summary.summary-visible {
    opacity: 1;
    transform: translateY(0);
}

.summary-header {
    color: #d4af37;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-align: center;
}

.summary-table {
    background: rgba(75, 45, 85, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 8px 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-key {
    color: #e0e0e0;
    font-size: 11px;
    font-weight: 500;
}

.summary-val {
    color: #d4af37;
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.strategy-frozen .config-summary {
    opacity: 0.4;
    filter: grayscale(50%);
}

@media (max-width: 400px) {
    .config-summary {
        max-width: 260px;
    }
    
    .summary-header {
        font-size: 9px;
    }
    
    .summary-key,
    .summary-val {
        font-size: 10px;
    }
    
    .summary-table {
        padding: 6px 8px;
    }
}

.reconfigure-confirmation {
    background: rgba(40, 44, 52, 0.95);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
}

.reconfigure-confirmation.confirmation-visible {
    opacity: 1;
    transform: translateY(0);
}

.confirmation-message {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #d4af37;  
    font-size: 13px;
    font-weight: 500;
}

.warning-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.confirmation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-btn, .cancel-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 10px;      
    font-weight: 500;     
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
    letter-spacing: 0.5px;
}

.confirm-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
}

.confirm-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
}

.confirm-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
}

.cancel-btn {
    background: transparent;
    color: #a8a8a8;  
    border: 1px solid rgba(168, 168, 168, 0.6);  
}

.cancel-btn:hover {
    background: rgba(168, 168, 168, 0.2);  
    color: #e0e0e0;  
    border-color: #c0c0c0;  
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 168, 168, 0.3);
}

.cancel-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(168, 168, 168, 0.4);
}

@media (max-width: 480px) {
    .confirmation-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .confirm-btn, .cancel-btn {
        width: 100%;
    }
}

@container (max-width: 219px) {

    .strategy-content > *:not(.technical-lines-section) {
        pointer-events: none !important;
    }

    .technical-lines-section {
        pointer-events: auto !important;
    }
    
    .technical-lines-section * {
        pointer-events: auto !important;
    }

    .strategy-toggle-section,
    .balance-options,
    .commission-options,
    .leverage-container,
    .apply-button-section,
    .lock-actions,
    .reconfigure-confirmation,
    .trading-config-container,
    .exposure-config-container {
        display: none !important;
    }

    .config-summary {
        opacity: 1 !important;
        transform: none !important;
        margin-top: 0 !important;
        margin-bottom: 15px !important;
        filter: none !important;
    }
    
    .summary-header {
        font-size: 13px !important;
        font-weight: 700 !important;
        margin-bottom: 15px !important;
        text-align: center;
        color: #d4af37 !important;
        text-shadow: 0 0 10px rgba(212, 175, 55, 0.5) !important;
        letter-spacing: 0.8px !important;
    }
    
    .summary-table {
        background: rgba(75, 45, 85, 0.15);
        border: 1px solid rgba(212, 175, 55, 0.35);
        padding: 12px 10px;
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
    }

    .summary-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px 0;
        margin: 10px 0;
        border-bottom: 1px solid rgba(212, 175, 55, 0.15);
        gap: 6px;
    }
    
    .summary-row:last-child {
        border-bottom: none;
    }
    
    .summary-key {
        font-size: 10px !important;
        font-weight: 600;
        color: #d4af37 !important;
        text-transform: uppercase;
        letter-spacing: 0.6px !important;
        opacity: 0.9;
    }
    
    .summary-val {
        font-size: 16px !important;
        font-weight: 700;
        color: #d4af37;
        text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
        text-align: center !important;
        width: 100%;
        display: block;
    }
}

.strategy-content {
    max-width: 600px !important;
}

.config-summary {
    max-width: 600px !important;
}

@media (min-width: 600px) {
    .strategy-content {
        transform: scale(1.02);
        transform-origin: top center;
    }
}

@media (min-width: 700px) {
    .strategy-content {
        transform: scale(1.04);
        transform-origin: top center;
    }
}

@container (max-width: 219px) {
    
    .builder-toggle-section {
        gap: 3px !important;
        padding: 6px 5px !important;
        margin-bottom: 10px !important;
    }
    
    .builder-toggle-btn {
        font-size: 8px !important;
        padding: 5px 8px !important;
        min-width: 55px !important;
        letter-spacing: 0.3px !important;
    }
    
    .builder-toggle-btn.active {
        font-size: 8px !important;
        padding: 5px 8px !important;
    }
}

@container (max-width: 219px) {
    
    .indicator-value,
    .indicator-values {
        display: none !important;
    }

    .indicator-row {
        padding: 5px 6px !important;
        min-height: 28px !important;
    }
    
    .indicator-left {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .indicator-checkbox {
        width: 12px !important;
        height: 12px !important;
    }
    
    .indicator-checkbox:checked::after {
        font-size: 10px !important;
        top: -1px !important;
        left: 1px !important;
    }
    
    .indicator-label {
        font-size: 9px !important;
        flex: 1 !important;
    }

    .indicator-row.multi-value {
        min-height: 28px !important;
    }

    .period-input {
        width: 28px !important;
        height: 14px !important;
        font-size: 8px !important;
    }
}

@container (max-width: 219px) {
    
    .indicator-row[data-indicator="macd"] {
        display: none !important;
    }

    .indicator-value,
    .indicator-values {
        display: none !important;
    }

    .indicator-row {
        padding: 5px 6px !important;
        min-height: 28px !important;
    }
    
    .indicator-left {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .indicator-checkbox {
        width: 12px !important;
        height: 12px !important;
    }
    
    .indicator-checkbox:checked::after {
        font-size: 10px !important;
        top: -1px !important;
        left: 1px !important;
    }
    
    .indicator-label {
        font-size: 9px !important;
        flex: 1 !important;
    }

    .indicator-row.multi-value {
        min-height: 28px !important;
    }

    .period-input {
        width: 28px !important;
        height: 14px !important;
        font-size: 8px !important;
    }
}

#drawLinesSection {
    margin-top: 25px !important;
}

.technical-lines-section #drawLinesSection {
    margin-top: 25px !important;
    padding-top: 20px !important;
    border-top: 2px solid rgba(212, 175, 55, 0.2);
}

@container (max-width: 219px) {
    
    .summary-header {
        font-size: 12px !important;
        font-weight: 600 !important;
        margin-bottom: 12px !important;
        letter-spacing: 0.5px !important;
    }
}

@container (max-width: 219px) {
    
    .indicator-row[data-indicator="macd"] {
        display: none !important;
    }

    .indicator-value,
    .indicator-values {
        display: none !important;
    }

    .indicator-row {
        padding: 3px 4px !important;
        min-height: 22px !important;
        margin-bottom: 2px !important;
    }
    
    .indicator-left {
        width: 100% !important;
        justify-content: flex-start !important;
        gap: 4px !important;
    }
    
    .indicator-checkbox {
        width: 11px !important;
        height: 11px !important;
    }
    
    .indicator-checkbox:checked::after {
        font-size: 9px !important;
        top: -1px !important;
        left: 1px !important;
    }
    
    .indicator-label {
        font-size: 8px !important;
        flex: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .indicators-grid {
        gap: 2px !important;
        margin-bottom: 6px !important;
        padding-bottom: 4px !important;
    }
    
    .technical-lines-section {
        padding: 5px 6px !important;
        margin-bottom: 8px !important;
    }
    
    .technical-lines-header {
        font-size: 9px !important;
        padding: 1px 0 !important;
        margin-bottom: 4px !important;
    }
    
    .technical-lines-controls {
        padding-top: 6px !important;
    }

    .drawing-tool-btn {
        padding: 6px !important;
        justify-content: center !important;
        min-height: 30px !important;
        font-size: 0 !important;
    }
    
    .tool-icon {
        font-size: 18px !important;
        width: auto !important;
        margin: 0 !important;
    }
    
    .clear-all-btn {
        padding: 6px !important;
        justify-content: center !important;
        min-height: 30px !important;
        font-size: 0 !important;
    }
    
    .drawing-tool-row {
        margin: 1px 0 !important;
    }
}

