/* Custom CSS for ALGOMINE India */

/* Theme Variables - Light Theme Only */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #1f2937;
    --text-tertiary: #374151;
    --border-primary: #d1d5db;
    --border-secondary: #9ca3af;

    /* Green Accents */
    --accent-primary: #03543f; /* Deeper green for contrast */
    --accent-secondary: #024f3a;
    --accent-hover: #013528;
    --accent-contrast: #023c2c;
    --accent-light: #d1fae5;
}

.skip-link {
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 0.75rem;
}

.skip-link:focus,
.skip-link:active {
    background-color: var(--accent-primary);
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(4, 120, 87, 0.35);
}

a.btn-primary,
a.btn-secondary,
button,
input,
textarea,
select {
    min-height: 44px;
}

input[type="checkbox"],
input[type="radio"] {
    min-height: initial;
    width: 1rem;
    height: 1rem;
    outline: none;
    box-shadow: none;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Hanging Market Insights Button Container */
.hanging-insights-container {
    position: absolute;
    bottom: -40px; /* Attach to bottom of header */
    right: 50px;
    z-index: -1 !important;
    width: 160px;
}

/* Hanging Market Insights Button */
.hanging-insights-btn {
    position: relative;
    overflow: hidden;
    animation: hanging-blink 2s ease-in-out infinite;
    border-radius: 0 0 8px 8px;
    white-space: nowrap;
    width: 160px;
    height: 40px; /* Fixed height */
    text-decoration: none;
}

.hanging-insights-btn::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

/* Hanging attachment effect */
.hanging-insights-btn::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 4px;
    background: #10b981;
    border-radius: 0 0 2px 2px;
}

/* Enhanced blinking animation for hanging button */
@keyframes hanging-blink {
    0%, 100% { 
        opacity: 1;
        transform: translateY(0px);
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    }
    50% { 
        opacity: 0.8;
        transform: translateY(1px);
        box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
    }
}

/* Hover effect for light green background */
.hanging-insights-btn:hover {
    background-color: #4ade80 !important; /* Light green */
    transform: translateY(-1px);
}

/* Responsive positioning and sizing */
@media (max-width: 768px) {
    .hanging-insights-container {
        right: 50%;
        transform: translateX(50%);
    }
    
    .hanging-insights-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Floating Market Insights Button - Keep for backward compatibility */
.floating-insights-btn {
    position: relative;
    overflow: hidden;
    animation: float-blink 2s ease-in-out infinite;
}

.floating-insights-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

/* Enhanced blinking animation */
@keyframes float-blink {
    0%, 50%, 100% { 
        opacity: 1;
        transform: translateY(0px);
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    }
    25% { 
        opacity: 0.7;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
    }
    75% { 
        opacity: 0.9;
        transform: translateY(1px);
        box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
    }
}

/* Responsive positioning */
@media (max-width: 768px) {
    .floating-insights-btn {
        position: fixed;
        top: 16px;
        right: 12px;
        z-index: 45;
    }
    .floating-insights-btn span:last-child {
        display: none;
    }
}

@media (min-width: 769px) {
    .floating-insights-btn:hover span:last-child {
        opacity: 1;
        max-width: 200px;
    }
}

/* Market Insights Button Animations - Keep existing for backward compatibility */
.market-insights-btn {
    position: relative;
    overflow: hidden;
    animation: gentle-pulse 3s ease-in-out infinite;
}

.market-insights-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 4s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

/* Notification dot animation */
@keyframes notification-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-2px); }
}

.market-insights-btn .animate-bounce {
    animation: notification-bounce 2s infinite;
}

/* Custom Snackbar System */
#snackbar-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.snackbar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.snackbar.show {
    opacity: 1;
    transform: translateX(0);
}

.snackbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
}

.snackbar.success::before {
    background: #10b981;
}

.snackbar.error::before {
    background: #ef4444;
}

.snackbar.warning::before {
    background: #f59e0b;
}

.snackbar.info::before {
    background: #3b82f6;
}

.snackbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.snackbar-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.snackbar-content {
    display: flex;
    align-items: flex-start;
}

.snackbar-message {
    flex: 1;
    font-weight: 500;
}

.snackbar-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s ease;
}

.snackbar-close:hover {
    color: var(--text-primary);
}

.snackbar-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width linear;
}

.snackbar.success .snackbar-progress {
    background: #10b981;
}

.snackbar.error .snackbar-progress {
    background: #ef4444;
}

.snackbar.warning .snackbar-progress {
    background: #f59e0b;
}

.snackbar.info .snackbar-progress {
    background: #3b82f6;
}

/* Password visibility toggle styling */
.password-toggle {
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--accent-primary) !important;
}


/* Apply theme variables */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Removed conflicting Tailwind overrides - let Tailwind handle these classes */

.border-gray-800 {
    border-color: var(--border-primary) !important;
}

.border-gray-600 {
    border-color: var(--border-secondary) !important;
}

.text-gray-400 {
    color: #4b5563 !important;
}

.text-primary-green {
    color: var(--accent-contrast) !important;
}

.bg-primary-green {
    background-color: var(--accent-primary) !important;
    color: #ffffff !important;
}

.bg-primary-green.text-black,
.bg-primary-green .text-black {
    color: #ffffff !important;
}

.hover\:bg-green-400:hover,
.hover\:bg-green-700:hover {
    background-color: var(--accent-hover) !important;
    color: #ffffff !important;
}

.border-primary-green {
    border-color: var(--accent-primary) !important;
}

.hover\:border-primary-green:hover {
    border-color: var(--accent-hover) !important;
}

.bg-primary-green\/20 {
    background-color: rgba(3, 84, 63, 0.16) !important;
    color: var(--accent-contrast) !important;
    border-color: rgba(3, 84, 63, 0.28) !important;
}

[class*="bg-primary-green/"] {
    color: var(--accent-contrast) !important;
}

.text-green-400 {
    color: #046c4e !important;
}

.text-blue-400 {
    color: #1d4ed8 !important;
}

.text-red-400 {
    color: #b91c1c !important;
}

/* Navigation Styles */
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    position: relative;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1.3;
    min-height: 44px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active-nav::after {
    transform: scaleX(1);
}

.nav-link:focus,
.nav-link:focus-visible,
.nav-link:active {
    outline: none;
    box-shadow: none;
}

/* Mobile Navigation */
.mobile-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    min-height: 48px;
    border-radius: 0.375rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
    color: var(--accent-primary);
    background-color: rgba(4, 120, 87, 0.08);
    border-left-color: var(--accent-primary);
}

.mobile-nav-link.active-nav {
    color: var(--accent-primary);
    background-color: rgba(4, 120, 87, 0.12);
    border-left-color: var(--accent-primary);
}

.mobile-nav-link:focus,
.mobile-nav-link:focus-visible,
.mobile-nav-link:active {
    outline: none;
    box-shadow: none;
}

.header-action:focus-visible,
.header-cta:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 3px solid rgba(4, 120, 87, 0.45);
    outline-offset: 2px;
}

.header-action,
.header-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    line-height: 1.3;
}

.header-cta {
    background: var(--accent-primary);
    color: #ffffff !important;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.header-cta:hover,
.header-cta:focus-visible {
    background: var(--accent-hover);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.header-toggle {
    min-height: 44px;
    min-width: 44px;
    border-radius: 0.5rem;
}

/* Dropdown menus */
#user-menu {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-primary) !important;
    z-index: 1000 !important;
    position: absolute !important;
}

#user-menu.hidden {
    display: none !important;
}

#user-menu:not(.hidden) {
    display: block !important;
}

#user-menu a {
    color: var(--text-secondary) !important;
}

#user-menu a:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Mobile menu background */
#mobile-menu {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-primary) !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slideInDown {
    animation: slideInDown 0.3s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animation classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out;
}

.animate-pulse-custom {
    animation: pulse 2s infinite;
}

.animate-slideInDown {
    animation: slideInDown 0.3s ease-out;
}

/* Custom hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.2);
}

/* Custom gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc6a;
}

/* Loading animation for charts/graphs */
.chart-loading {
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Custom form styling */
.form-floating {
    position: relative;
}

.form-floating input {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-secondary) !important;
    color: var(--text-primary) !important;
}

.form-floating input:focus {
    border-color: var(--accent-primary) !important;
}

.form-floating input:focus + label,
.form-floating input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: var(--accent-primary) !important;
}

.form-floating label {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    transition: all 0.2s ease;
    pointer-events: none;
    color: var(--text-tertiary) !important;
}

/* Input placeholder colors */
.placeholder-gray-400::placeholder {
    color: var(--text-tertiary) !important;
}

/* Dark background inputs should have white text in both themes */
.bg-dark-gray input,
.bg-gray-600 input,
.bg-gray-700 input {
    color: #ffffff !important;
}

/* Ensure form elements have proper contrast */
input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
textarea {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-secondary) !important;
    color: var(--text-primary) !important;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 1px var(--accent-primary) !important;
}

/* Mobile menu animation */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms, transform 200ms;
}

.mobile-menu-exit {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 200ms, transform 200ms;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    background-color: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.15);
}

/* Button styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    background: var(--accent-primary);
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    line-height: 1.3;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--accent-contrast);
    border: 2px solid var(--accent-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    line-height: 1.3;
    text-decoration: none;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: #ffffff !important;
    transform: translateY(-1px);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(4, 120, 87, 0.3);
}

/* Theme-aware button colors */
.bg-primary-green {
    background-color: var(--accent-primary) !important;
    color: #ffffff !important;
}

.bg-green-600,
.bg-green-700 {
    background-color: var(--accent-primary) !important;
    color: #ffffff !important;
}

.hover\:bg-green-700:hover {
    background-color: var(--accent-hover) !important;
    color: #ffffff !important;
}

/* Ensure dark-themed utility classes play nicely with light theme */


.bg-dark-gray,
.bg-gray-700,
.bg-gray-800,
.bg-gray-900 {
    color: #f9fafb !important;
}

.bg-dark-card .text-gray-400,
.bg-dark-card p,
.bg-dark-card li {
    color: var(--text-tertiary) !important;
}

/* Ensure hover states work correctly in both themes */
.hover\:bg-gray-700:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Typography */
.text-gradient {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Market data styling */
.market-positive {
    color: #00ff88;
}

.market-negative {
    color: #ef4444;
}

.market-neutral {
    color: #6b7280;
}

/* Market data components */
.market-item {
    transition: all 0.3s ease;
    position: relative;
}

.market-item:hover {
    background-color: rgba(42, 42, 42, 0.8);
    transform: translateY(-2px);
}

.market-item.loading {
    opacity: 0.7;
}

.market-item.loading .market-price,
.market-item.loading .market-change {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    color: transparent;
    border-radius: 4px;
}

.market-item.fallback-data::before {
    content: "DEMO";
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.market-item.stale-data::before {
    content: "STALE";
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Sparkline styling */
.sparkline {
    height: 20px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.sparkline-chart {
    display: block;
    margin: 0 auto;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
}

.sparkline-svg polyline {
    stroke-width: 1.5;
    fill: none;
    opacity: 0.8;
}

/* Market refresh indicator */
.last-updated,
.last-refresh {
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
}

.last-updated::before,
.last-refresh::before {
    content: "🕒";
    margin-right: 4px;
}

/* Market price formatting */
.market-price {
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
}

/* Market change indicators */
.market-change {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.market-change.text-green-400::before {
    content: "▲";
    margin-right: 2px;
    font-size: 0.75em;
}

.market-change.text-red-400::before {
    content: "▼";
    margin-right: 2px;
    font-size: 0.75em;
}

.market-change.text-gray-400::before {
    content: "▬";
    margin-right: 2px;
    font-size: 0.75em;
}

/* Loading spinner for market data */
.market-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #374151;
    border-radius: 50%;
    border-top-color: #00ff88;
    animation: spin 1s linear infinite;
}

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

/* Market data grid responsive behavior */
@media (max-width: 640px) {
    .market-item {
        padding: 1rem 0.75rem;
    }
    
    .market-price {
        font-size: 1.25rem;
    }
    
    .sparkline {
        height: 16px;
        width: 50px;
    }
}

/* Market status badges */
.market-status {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.market-status.live {
    background-color: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.market-status.closed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.market-status.pre-market {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* Crypto specific styling */
.crypto-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    color: white;
}

.crypto-icon.btc {
    background-color: #f7931a;
}

.crypto-icon.eth {
    background-color: #627eea;
}

.crypto-icon.bnb {
    background-color: #f3ba2f;
}

/* Market error states */
.market-error {
    color: #ef4444;
    font-size: 0.75rem;
    font-style: italic;
}

.market-offline {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* Pulse animation for live data */
.market-live {
    position: relative;
}

.market-live::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px;
    width: 6px;
    height: 6px;
    background-color: #00ff88;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}


@keyframes pulse-dot {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Chart type buttons */
.chart-type-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid #374151;
    background-color: transparent;
    color: #9ca3af;
    transition: all 0.2s ease;
    cursor: pointer;
}

.chart-type-btn:hover {
    background-color: #374151;
    color: #ffffff;
}

.chart-type-btn.active {
    background-color: #00ff88;
    color: #000000;
    border-color: #00ff88;
}

.chart-type-btn:focus {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-text-center {
        text-align: center;
    }
}

/* Focus states for accessibility */
.focus-visible:focus {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
}

/* Custom checkbox and radio styles */
input[type="checkbox"]:checked {
    background-color: #00ff88;
    border-color: #00ff88;
}

input[type="radio"]:checked {
    background-color: #00ff88;
    border-color: #00ff88;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    border-radius: 0.5rem;
    padding: 1rem;
    color: var(--text-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.3s ease-out;
}

.notification.success {
    border-color: var(--accent-primary);
}

.notification.error {
    border-color: #ef4444;
}

.notification.warning {
    border-color: #f59e0b;
}

/* Loading overlay */
#loading-overlay {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

#loading-overlay .bg-dark-card {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Timeline styles */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #00ff88;
    transform: translateX(-50%);
}

.timeline-item:last-child::before {
    background: linear-gradient(to bottom, #00ff88 0%, transparent 100%);
}

/* Polished user picker styles for admin dashboard */
.user-picker {
    position: relative;
}

.user-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.user-select-trigger:hover {
    border-color: #10b981;
}

.user-select-trigger:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.user-select-trigger.has-value {
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
    border-color: #34d399;
}

.user-select-label {
    flex: 1;
    text-align: left;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-select-trigger.has-value .user-select-label {
    color: #065f46;
}

.user-select-trigger-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.user-select-trigger[aria-expanded="true"] .user-select-trigger-chevron {
    transform: rotate(-180deg);
}

.user-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    z-index: 40;
    display: none;
}

.user-select-dropdown.open {
    display: block;
}

.user-select-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.user-select-panel:focus-within {
    border-color: #34d399;
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.18);
}

.user-search-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #1f2937;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-search-input::placeholder {
    color: #9ca3af;
}

.user-search-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
    outline: none;
    background: #ffffff;
}

.user-select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 10px 40px 10px 16px;
    font-size: 0.95rem;
    color: #111827;
    background-color: #ffffff;
    background-image: none;
    min-height: 220px;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    overflow-y: auto;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
    outline: none;
}

.user-select option {
    padding: 8px 12px;
    color: #1f2937;
    font-weight: 500;
}

.user-select option:nth-child(even) {
    background-color: #f9fafb;
}

.user-select::-webkit-scrollbar {
    width: 8px;
}

.user-select::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 12px;
}

.user-select::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 12px;
}

.user-select::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.select-chevron {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 14px 16px;
    pointer-events: none;
    color: #9ca3af;
}

.user-select-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 10px;
}

.dark-mode .user-select-panel {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.65);
}

.dark-mode .user-select-trigger {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
}

.dark-mode .user-select-trigger:hover {
    border-color: rgba(16, 185, 129, 0.6);
}

.dark-mode .user-select-trigger.has-value {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.6);
}

.dark-mode .user-select-label {
    color: rgba(226, 232, 240, 0.85);
}

.dark-mode .user-select-trigger.has-value .user-select-label {
    color: rgba(167, 243, 208, 0.95);
}

.dark-mode .user-select-panel {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.65);
}

.dark-mode .user-select-dropdown {
    z-index: 60;
}

.dark-mode .user-search-input {
    border-color: rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.6);
}

.dark-mode .user-search-input::placeholder {
    color: rgba(148, 163, 184, 0.8);
}

.dark-mode .user-select {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(8, 11, 19, 0.6);
}

.dark-mode .user-select option {
    color: #f8fafc;
}

.select-chevron svg {
    stroke-width: 2;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-dark-bg,
    .bg-dark-card,
    .bg-dark-gray {
        background: white !important;
    }
    
    .text-white {
        color: black !important;
    }
    
    .text-primary-green {
        color: #00aa55 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-400 {
        color: #e5e7eb;
    }
    
    .border-gray-600 {
        border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fadeInUp,
    .animate-fadeInLeft,
    .animate-fadeInRight,
    .animate-pulse-custom,
    .animate-slideInDown,
    .animate-float-1,
    .animate-float-2,
    .animate-float-3 {
        animation: none;
    }
}

/* Floating Signal Card Animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0.5deg); }
    50% { transform: translateY(-12px) rotate(-0.5deg); }
}

.animate-float-1 {
    animation: float1 6s ease-in-out infinite;
    animation-delay: 0s;
}

.animate-float-2 {
    animation: float2 5s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-float-3 {
    animation: float3 7s ease-in-out infinite;
    animation-delay: 2s;
}

/* Hover effects for signal cards */
.animate-float-1:hover,
.animate-float-2:hover,
.animate-float-3:hover {
    transform: translateY(-5px) scale(1.02);
    transition: all 0.3s ease-in-out;
    z-index: 10;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Real-time Market Data Animations */
.market-card-updated {
    animation: marketCardPulse 1s ease-in-out;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
}

@keyframes marketCardPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Real-time status indicator */
.real-time-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    animation: realTimeBlinkSlow 2s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes realTimeBlinkSlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Market data loading states */
.market-card-loading {
    position: relative;
    overflow: hidden;
}

.market-card-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    animation: loadingShimmer 1.5s ease-in-out infinite;
}

@keyframes loadingShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Price change animations */
.price-up {
    animation: priceUpFlash 0.8s ease-out;
}

.price-down {
    animation: priceDownFlash 0.8s ease-out;
}

@keyframes priceUpFlash {
    0% {
        background-color: rgba(16, 185, 129, 0.3);
        transform: scale(1);
    }
    50% {
        background-color: rgba(16, 185, 129, 0.6);
        transform: scale(1.05);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes priceDownFlash {
    0% {
        background-color: rgba(248, 113, 113, 0.3);
        transform: scale(1);
    }
    50% {
        background-color: rgba(248, 113, 113, 0.6);
        transform: scale(1.05);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* Ensure content doesn't get hidden behind TradingView ticker */
body {
    padding-bottom: 46px;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 46px;
    }
}

/* Background Chart Canvas - Hero Section */
#backgroundChart {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 500px;
    min-width: 100vw;
    object-fit: cover;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section - Ensure proper minimum height on all devices */
section.relative.pt-20.pb-16 {
    min-height: 500px;
    overflow: hidden;
}

@media (max-width: 768px) {
    #backgroundChart {
        min-height: 500px !important;
        min-width: 120vw;
    }
    
    section.relative.pt-20.pb-16 {
        min-height: 550px;
        overflow: hidden;
    }
}

@media (max-width: 640px) {
    #backgroundChart {
        min-height: 500px !important;
        min-width: 150vw;
    }
    
    section.relative.pt-20.pb-16 {
        min-height: 500px;
        overflow: hidden;
    }
}

/* Ensure the chart container maintains its size and hides overflow */
.absolute.inset-0.opacity-50 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
