/* Animation Styles */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
@keyframes shine {
    0% { opacity: 0; }
    50% { opacity: 0.5; }
    100% { opacity: 0; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    /* Current Price Section */
    .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 1rem !important;
    }
    
    /* Market Posts */
    .col-lg-6 {
        margin-bottom: 1rem;
    }
    
    /* Recent Updates Table */
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem !important;
        font-size: 0.8rem;
    }
    
    /* Navigation Buttons */
    .btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem;
    }
    
    .row.g-3 {
        gap: 0.5rem !important;
    }
    
    /* Cards spacing */
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Hero section adjustments */
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .lead {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 576px) {
    /* Extra small screens */
    .card-body {
        padding: 0.75rem !important;
    }
    
    .card-header {
        padding: 0.75rem !important;
    }
    
    /* Table adjustments */
    .table {
        font-size: 0.7rem;
    }
    
    .table th,
    .table td {
        padding: 0.25rem !important;
        font-size: 0.7rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    
    /* Navigation grid */
    .col-md-4 {
        margin-bottom: 0.5rem;
    }
    
    /* Price display */
    .h6 {
        font-size: 0.9rem !important;
    }
    
    /* Badges */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    /* Hero section */
    .display-5 {
        font-size: 1.3rem !important;
    }
    
    .lead {
        font-size: 0.8rem !important;
    }
    
    /* Market status indicator */
    .d-inline-block.p-3 {
        padding: 0.5rem !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .table th,
    .table td {
        min-height: 44px;
    }
    
    /* Larger tap targets */
    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 1rem;
    }
}

/* Hover effects for desktop */
@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    }
    
    .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    }
}

/* Auto-refresh indicator */
.market-status-indicator {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.5);
    }
}

/* Override CanvasJS chart canvas position */
.canvasjs-chart-canvas {
    position: relative !important;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6e27a 0%, #daa520 50%, #b8860b 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.4);
}

.back-to-top-btn i {
    font-size: 1.2rem;
}

/* Mobile optimization for back to top button */
@media (max-width: 768px) {
    .back-to-top-btn {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}
