/* Enhanced Button Styles for Admin Panels */

/* Primary Buttons - Gradient with glow effect */
.primary-btn,
.submit-btn,
button[type="submit"] {
    position: relative;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #00FF88 0%, #00D4FF 100%);
    border: none;
    border-radius: 12px;
    color: #0A0A0B;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    overflow: hidden;
    text-transform: uppercase;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.primary-btn:hover::before {
    transform: translateX(100%);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.4),
                0 0 50px rgba(0, 255, 136, 0.2);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

.primary-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.primary-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #0A0A0B;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

/* Secondary Buttons - Glass effect */
.secondary-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.secondary-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.secondary-btn:hover::before {
    width: 300px;
    height: 300px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

/* Signal Type Buttons - Modern toggle */
.signal-type-btn {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.signal-type-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #00FF88, #00D4FF);
    transition: width 0.3s ease;
}

.signal-type-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.signal-type-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 212, 255, 0.15));
    border-color: #00FF88;
    color: #00FF88;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.signal-type-btn.active::after {
    width: 100%;
}

/* Direction Buttons - Long/Short */
.direction-btn {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.direction-btn.long:hover,
.direction-btn.long.active {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 255, 136, 0.05));
    border-color: #00FF88;
    color: #00FF88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.direction-btn.short:hover,
.direction-btn.short.active {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 59, 48, 0.05));
    border-color: #FF3B30;
    color: #FF3B30;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.3);
}

/* Confidence Level Buttons */
.confidence-btn {
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.confidence-btn[data-confidence="low"]:hover,
.confidence-btn[data-confidence="low"].active {
    background: rgba(255, 204, 0, 0.1);
    border-color: #FFCC00;
    color: #FFCC00;
}

.confidence-btn[data-confidence="medium"]:hover,
.confidence-btn[data-confidence="medium"].active {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00D4FF;
    color: #00D4FF;
}

.confidence-btn[data-confidence="high"]:hover,
.confidence-btn[data-confidence="high"].active {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00FF88;
    color: #00FF88;
}

/* Template Chip Buttons */
.template-chip {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.template-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease;
    border-radius: 50%;
}

.template-chip:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

.template-chip:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 212, 255, 0.1));
    border-color: #00FF88;
    color: #00FF88;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

/* Action Buttons (Update, Close, etc.) */
.btn-update {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.05));
    border: 1.5px solid rgba(0, 212, 255, 0.3);
    color: #00D4FF;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-update:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
    border-color: #00D4FF;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

.btn-close {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 59, 48, 0.05));
    border: 1.5px solid rgba(255, 59, 48, 0.3);
    color: #FF3B30;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.2), rgba(255, 59, 48, 0.1));
    border-color: #FF3B30;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.3);
    transform: translateY(-1px);
}

/* Icon Buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: rotate(180deg);
}

/* Floating Action Buttons */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00FF88, #00D4FF);
    border: none;
    color: #0A0A0B;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 30px rgba(0, 255, 136, 0.5);
}

/* Disabled State */
button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading Animation */
@keyframes spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple-animation 0.6s ease-out;
}

@keyframes ripple-animation {
    to {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 120px;
}

/* Pulse Animation for Important Actions */
.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    }
}

/* Success/Error Button States */
.btn-success {
    background: linear-gradient(135deg, #00FF88, #00CC6A) !important;
    border-color: #00FF88 !important;
    color: #0A0A0B !important;
}

.btn-error {
    background: linear-gradient(135deg, #FF3B30, #CC0000) !important;
    border-color: #FF3B30 !important;
    color: white !important;
}

.btn-warning {
    background: linear-gradient(135deg, #FFCC00, #FF9500) !important;
    border-color: #FFCC00 !important;
    color: #0A0A0B !important;
}