

.my-scenarios-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08) 0%, rgba(155, 89, 182, 0.15) 50%, rgba(212, 175, 55, 0.12) 100%);
    border: 1px solid rgba(200, 120, 80, 0.4);
    color: #d4af37;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(155, 89, 182, 0.1);
}

.my-scenarios-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.my-scenarios-btn:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(155, 89, 182, 0.25) 50%, rgba(212, 175, 55, 0.20) 100%);
    border-color: rgba(200, 120, 80, 0.6);
    color: #e6c76a;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 4px 20px rgba(200, 120, 80, 0.2),
        0 0 15px rgba(212, 175, 55, 0.15);
}

.my-scenarios-btn:hover::before {
    left: 100%;
}

.my-scenarios-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(200, 120, 80, 0.15);
}

.my-scenarios-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(200, 120, 80, 0.3),
        0 4px 20px rgba(212, 175, 55, 0.2);
}

.my-scenarios-container {
    margin-top: 15px !important;
}

.scenarios-side-panel {
    position: fixed;
    top: 0;
    left: -320px; 
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%, #0f0f0f 100%);
    border-right: 3px solid;
    border-image: linear-gradient(180deg, rgba(255, 107, 53, 0.6) 0%, rgba(212, 175, 55, 0.8) 50%, rgba(155, 89, 182, 0.6) 100%) 1;
    z-index: 999999;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    box-shadow: 
        2px 0 30px rgba(0, 0, 0, 0.7),
        inset -1px 0 0 rgba(255, 107, 53, 0.1);
}

.scenarios-side-panel::-webkit-scrollbar {
    width: 8px;
}

.scenarios-side-panel::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.8) 0%, rgba(26, 26, 26, 0.9) 50%, rgba(15, 15, 15, 0.8) 100%);
    border-radius: 4px;
    margin: 10px 0;
}

.scenarios-side-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.6) 0%, rgba(212, 175, 55, 0.8) 50%, rgba(155, 89, 182, 0.6) 100%);
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 
        0 0 10px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.scenarios-side-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.8) 0%, rgba(212, 175, 55, 1) 50%, rgba(155, 89, 182, 0.8) 100%);
    box-shadow: 
        0 0 15px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.scenarios-side-panel::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, rgba(255, 107, 53, 1) 0%, rgba(212, 175, 55, 1) 50%, rgba(155, 89, 182, 1) 100%);
}

.scenarios-side-panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.8) rgba(26, 26, 26, 0.9);
}

.scenarios-side-panel.active {
    left: 0; 
}

.scenarios-panel-header {
    display: flex;
    align-items: center;
    padding: 25px 20px;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, rgba(212, 175, 55, 0.4) 0%, rgba(255, 107, 53, 0.6) 50%, rgba(212, 175, 55, 0.4) 100%) 1;
    background: linear-gradient(135deg, 
        #1a1a1a 0%, 
        rgba(255, 107, 53, 0.15) 15%, 
        rgba(155, 89, 182, 0.20) 40%, 
        rgba(212, 175, 55, 0.18) 65%, 
        #2a2a2a 100%),
        linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%, #0f0f0f 100%);
    position: relative;
}

.scenarios-panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
}

.back-arrow-btn {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(212, 175, 55, 0.15) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-right: 15px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.back-arrow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s;
}

.back-arrow-btn:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(212, 175, 55, 0.25) 100%);
    border-color: rgba(212, 175, 55, 0.6);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.back-arrow-btn:hover::before {
    left: 100%;
}

.scenarios-panel-title {
    color: #d4af37;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin: 0;
}

.scenarios-panel-content {
    padding: 20px;
}

.scenarios-section {
    margin-bottom: 30px;
}

.scenarios-section-title {
    color: #ff6b35;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    padding: 8px 12px;
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.1) 0%, transparent 100%);
    border-left: 3px solid #ff6b35;
    border-radius: 0 6px 6px 0;
    position: relative;
}

.scenarios-section-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.05), transparent);
    border-radius: 0 6px 6px 0;
}

.scenario-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scenario-item {
    padding: 18px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(20, 20, 20, 0.6) 100%);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: #fff;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.scenario-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s;
}

.scenario-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.3), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.scenario-item:hover {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.15) 0%, rgba(255, 107, 53, 0.1) 100%);
    border-color: rgba(155, 89, 182, 0.4);
    transform: translateX(6px) scale(1.02);
    box-shadow: 
        0 5px 20px rgba(155, 89, 182, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.scenario-item:hover::before {
    left: 100%;
}

.scenario-item:hover::after {
    transform: scaleX(1);
}

.scenario-item.active {
    border: 2px solid;
    border-image: linear-gradient(45deg, rgba(212, 175, 55, 0.8) 0%, rgba(255, 107, 53, 0.6) 100%) 1;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(255, 107, 53, 0.08) 100%);
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(212, 175, 55, 0.2);
}

.scenario-item.active::after {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.6), rgba(255, 107, 53, 0.6), rgba(212, 175, 55, 0.6));
    transform: scaleX(1);
}

.scenario-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.scenario-item.active .scenario-name {
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.scenario-description {
    font-size: 12px;
    opacity: 0.75;
    line-height: 1.4;
    color: #ccc;
}

.scenario-item.active .scenario-description {
    opacity: 0.9;
    color: #e6e6e6;
}

.scenarios-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scenarios-overlay.active {
    opacity: 1;
    visibility: visible;
}

.save-scenario-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.save-scenario-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid;
    border-image: linear-gradient(45deg, rgba(212, 175, 55, 0.8) 0%, rgba(255, 107, 53, 0.6) 100%) 1;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(212, 175, 55, 0.2);
    width: 400px;
    max-width: 90vw;
    color: white;
    text-align: center;
}

.save-scenario-title {
    color: #d4af37;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.save-scenario-message {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.scenario-name-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.scenario-name-input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.8);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.scenario-name-input::placeholder {
    color: #666;
}

.save-scenario-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.save-btn, .cancel-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.save-btn {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.8) 0%, rgba(255, 107, 53, 0.6) 100%);
    color: #1a1a1a;
    border: 1px solid rgba(212, 175, 55, 0.5);
}

.save-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 1) 0%, rgba(255, 107, 53, 0.8) 100%);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.cancel-btn {
    background: rgba(100, 100, 100, 0.2);
    color: #ccc;
    border: 1px solid rgba(100, 100, 100, 0.3);
}

.cancel-btn:hover {
    background: rgba(100, 100, 100, 0.3);
    color: white;
    transform: scale(1.05);
}

.scenarios-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.scenarios-popup {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    padding: 30px;
    border-radius: 15px;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.3);
    width: 400px;
    max-width: 90vw;
}

.scenarios-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scenarios-popup-title {
    margin: 0;
    color: #d4af37;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.scenarios-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.scenarios-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(1.1);
}

.scenarios-popup-content {
    padding: 0;
}

.scenarios-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scenario-item {
    padding: 15px;
    margin: 10px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scenario-item:hover {
    background: rgba(155, 89, 182, 0.1);
    border-color: rgba(155, 89, 182, 0.3);
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .my-scenarios-btn {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    #myScenariosPopup {
        width: 95vw !important;
        max-height: 90vh !important;
        padding: 20px !important;
    }
    
    .scenarios-popup {
        width: 95vw;
        max-height: 90vh;
        margin: 20px;
    }
    
    .scenarios-popup-header {
        padding: 16px 20px;
    }
    
    .scenarios-popup-content {
        padding: 20px;
    }
}

.scenario-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scenario-item:hover .scenario-actions {
    opacity: 1;
}

.delete-scenario-btn {
    background: none;
    border: none;
    color: #ff6b35;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.delete-scenario-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: scale(1.1);
}

.scenario-item {
    position: relative;
}

.clear-button {
    background: linear-gradient(135deg, rgba(102, 51, 153, 0.08) 0%, rgba(77, 45, 115, 0.15) 50%, rgba(212, 175, 55, 0.12) 100%) !important;
    border: 1px solid rgba(102, 51, 153, 0.4) !important;
    color: #d4af37 !important;
    box-shadow: 0 2px 10px rgba(102, 51, 153, 0.1) !important;
    position: relative;
    overflow: hidden;
}

.clear-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 51, 153, 0.1), transparent);
    transition: left 0.5s;
}

.clear-button:hover {
    background: linear-gradient(135deg, rgba(102, 51, 153, 0.15) 0%, rgba(77, 45, 115, 0.25) 50%, rgba(212, 175, 55, 0.20) 100%) !important;
    border-color: rgba(102, 51, 153, 0.6) !important;
    color: #e6c76a !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 4px 20px rgba(102, 51, 153, 0.2),
        0 0 15px rgba(212, 175, 55, 0.15) !important;
}

.clear-button:hover::before {
    left: 100%;
}

.clear-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        0 2px 8px rgba(155, 89, 182, 0.4),
        inset 0 2px 8px rgba(155, 89, 182, 0.2);
}

.regenerate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.regenerate-content {
    background: linear-gradient(135deg, #1a2332, #0f1419);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.regenerate-title {
    color: #ff6b35;
    margin-bottom: 20px;
    font-size: 18px;
}

.regenerate-message {
    color: #fff;
    margin-bottom: 25px;
    line-height: 1.4;
}

.regenerate-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.regenerate-yes-btn, .regenerate-cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.regenerate-yes-btn {
    background: linear-gradient(45deg, #ff4444, #cc3333);
    color: #fff;
}

.regenerate-cancel-btn {
    background: linear-gradient(45deg, #8b4513, #d4af37);
    color: #fff;
}

.regenerate-yes-btn:hover, .regenerate-cancel-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

#scenariosCounter {
    margin-left: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;  
}

#scenariosCounter span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;        
    border-radius: 14px;      
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    line-height: 1.2;         
    min-width: 50px;          
    text-align: center;       

    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.15) 0%, 
        rgba(212, 175, 55, 0.12) 100%
    );
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: 
        0 2px 8px rgba(76, 175, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#scenariosCounter span[style*="ff9800"] {
    background: linear-gradient(135deg, 
        rgba(255, 152, 0, 0.2) 0%, 
        rgba(255, 107, 53, 0.15) 50%,
        rgba(212, 175, 55, 0.12) 100%
    );
    border: 1px solid rgba(255, 152, 0, 0.4);
    box-shadow: 
        0 2px 10px rgba(255, 152, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#scenariosCounter span[style*="ef4444"] {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.25) 0%, 
        rgba(255, 107, 53, 0.2) 50%,
        rgba(155, 89, 182, 0.15) 100%
    );
    border: 1px solid rgba(239, 68, 68, 0.5);
    animation: counterPulse 2s ease-in-out infinite;
    box-shadow: 
        0 0 15px rgba(239, 68, 68, 0.3),
        0 2px 12px rgba(255, 107, 53, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes counterPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 0 15px rgba(239, 68, 68, 0.3),
            0 2px 12px rgba(255, 107, 53, 0.2);
    }
    50% { 
        transform: scale(1.08);
        box-shadow: 
            0 0 25px rgba(239, 68, 68, 0.5),
            0 4px 18px rgba(255, 107, 53, 0.3);
    }
}

#scenariosCounter span:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(212, 175, 55, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}