/* Custom CSS for Kalshi Market Data Web App */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar customization */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Card enhancements */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none;
}

/* Input group styling */
.input-group-text {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Button styling */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Badge styling */
.badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

/* Alert styling */
.alert {
    border-radius: 10px;
    border: none;
}

/* Market detail specific styles */
.market-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.pricing-card {
    min-height: 200px;
}

.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: scale(1.05);
}

/* Icon styling */
.fa-3x {
    transition: transform 0.3s ease;
}

.card:hover .fa-3x {
    transform: scale(1.1);
}

/* Time display styling */
.time-display {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body h3 {
        font-size: 1.5rem;
    }
    
    .time-display {
        font-size: 2rem;
    }
    
    .fa-3x {
        font-size: 2rem !important;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Footer styling */
footer {
    margin-top: auto;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Price highlighting */
.price-yes {
    color: var(--success-color) !important;
    font-weight: 600;
}

.price-no {
    color: var(--danger-color) !important;
    font-weight: 600;
}

/* Status indicators */
.status-open {
    color: var(--success-color);
}

.status-closed {
    color: var(--danger-color);
}

/* Animation for new data */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom form validation */
.was-validated .form-control:valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.was-validated .form-control:invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* MathJax styling */
.math-formula {
    text-align: center;
    padding: 1rem;
    background-color: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.math-formula .MathJax {
    font-size: 1.2em;
}

/* MathJax display equations */
.MathJax_Display {
    margin: 1rem 0 !important;
}

/* Inline math styling */
.MathJax {
    color: var(--primary-color);
    font-weight: 500;
}

/* Math formula cards */
.card .math-formula {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dark theme math formulas */
.bg-dark .math-formula {
    background-color: rgba(33, 37, 41, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Math formula hover effects */
.math-formula:hover {
    background-color: rgba(248, 249, 250, 1);
    border-color: var(--primary-color);
    transition: all 0.2s ease-in-out;
}
