/* ==================== EQUATION SELECTOR ==================== */

.equation-selector {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid #e0e0e0;
    animation: slideInDown 0.6s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selector-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.selector-header h3 {
    color: #2d1810;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.selector-desc {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Equation Buttons Container */
.equation-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Equation Button Base */
.equation-btn {
    background: white;
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.equation-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.equation-btn:hover::before {
    left: 100%;
}

/* Practice Button (Blue) */
.practice-btn {
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.2);
}

.practice-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
    border-color: #357abd;
}

.practice-btn.active {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border-color: #357abd;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.4);
    animation: pulseBlue 2s ease-in-out infinite;
}

@keyframes pulseBlue {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(74, 144, 226, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(74, 144, 226, 0.6);
    }
}

.practice-btn.active .btn-content * {
    color: white !important;
}

.practice-btn.active .btn-icon {
    transform: scale(1.2) rotate(10deg);
}

/* Bitcoin Button (Orange) */
.bitcoin-btn {
    border-color: #f7931a;
    box-shadow: 0 4px 15px rgba(247, 147, 26, 0.2);
}

.bitcoin-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(247, 147, 26, 0.3);
    border-color: #e08316;
}

.bitcoin-btn.active {
    background: linear-gradient(135deg, #f7931a, #e08316);
    border-color: #e08316;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(247, 147, 26, 0.4);
    animation: pulseOrange 2s ease-in-out infinite;
}

@keyframes pulseOrange {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(247, 147, 26, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(247, 147, 26, 0.6);
    }
}

.bitcoin-btn.active .btn-content * {
    color: white !important;
}

.bitcoin-btn.active .btn-icon {
    transform: scale(1.2) rotate(-10deg);
}

/* Button Icon */
.btn-icon {
    font-size: 3rem;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    flex-shrink: 0;
}

/* Button Content */
.btn-content {
    flex: 1;
    text-align: left;
}

.btn-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d1810;
    margin-bottom: 0.3rem;
    transition: color 0.3s;
}

.btn-equation {
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.3rem;
    transition: color 0.3s;
}

.btn-desc {
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
    transition: color 0.3s;
}

/* Current Equation Display */
.current-equation {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.5s ease-out;
}

.equation-label {
    font-weight: 600;
    color: #666;
    font-size: 1rem;
}

.equation-display {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f7931a;
    font-family: 'Courier New', monospace;
    padding: 0.5rem 1rem;
    background: #fff8f0;
    border-radius: 8px;
    border: 2px solid #f7931a;
    animation: equationChange 0.5s ease-out;
}

@keyframes equationChange {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .equation-buttons {
        grid-template-columns: 1fr;
    }
    
    .equation-btn {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-content {
        text-align: center;
    }
    
    .btn-icon {
        font-size: 2.5rem;
    }
}

/* Transition Animation for Switching */
.equation-switching {
    animation: switchPulse 0.6s ease-out;
}

@keyframes switchPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Equation Info Display */
.equation-info {
    background: linear-gradient(135deg, #fff8f0, #ffe8d6);
    border: 2px solid #f7931a;
    border-radius: 15px;
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.equation-info h3 {
    color: #2d1810;
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.equation-info p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
