/* Base styles */
body {
    font-family: 'Space Grotesk', sans-serif;
}

/* Glass morphism cards */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-card-inner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Input fields */
.input-field {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Dropdown menu */
.dropdown-menu {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.98) 0%, rgba(20, 20, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeIn 0.3s ease-out;
}

/* Table styles */
table {
    border-spacing: 0;
}

/* Button hover effects */
button {
    transition: all 0.2s ease;
}

/* Status badges animation */
[class*="rounded-full"] {
    transition: all 0.2s ease;
}

/* Mobile card slide in */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#bets-cards-container > div {
    animation: slideIn 0.3s ease-out;
    animation-fill-mode: both;
}

#bets-cards-container > div:nth-child(1) { animation-delay: 0.05s; }
#bets-cards-container > div:nth-child(2) { animation-delay: 0.1s; }
#bets-cards-container > div:nth-child(3) { animation-delay: 0.15s; }
#bets-cards-container > div:nth-child(4) { animation-delay: 0.2s; }
#bets-cards-container > div:nth-child(5) { animation-delay: 0.25s; }

/* Responsive improvements */
@media (max-width: 640px) {
    .glass-card {
        border-radius: 1rem;
    }
    
    /* Better touch targets on mobile */
    button {
        min-height: 44px;
    }
    
    .dropdown-menu button {
        min-height: 48px;
    }
}

/* Touch manipulation for better mobile experience */
.touch-manipulation {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Action sheet styles */
#actionSheetContent {
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

#actionSheetContent button {
    -webkit-tap-highlight-color: transparent;
}

/* Focus visible for accessibility */
button:focus-visible,
input:focus-visible {
    outline: 2px solid rgba(6, 182, 212, 0.5);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .modal-overlay,
    #toast,
    button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Prevent text selection on buttons */
button {
    user-select: none;
    -webkit-user-select: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Table row hover effect */
tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #06b6d4 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Loading skeleton (for future use) */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

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

/* Pulsing animation for pending status */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Horizontal scrollbar for action buttons on mobile */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Hide scrollbar but keep functionality */
.overflow-x-auto::-webkit-scrollbar {
    height: 4px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: transparent;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Pool collapse animation */
#pool-content {
    transition: all 0.3s ease;
}

#pool-toggle-icon {
    transition: transform 0.3s ease;
}

#pool-toggle-icon.rotate-180 {
    transform: rotate(180deg);
}

/* Pool card animation */
.pool-card {
    animation: poolCardIn 0.25s ease-out;
    animation-fill-mode: both;
}

.pool-card:nth-child(1) { animation-delay: 0.02s; }
.pool-card:nth-child(2) { animation-delay: 0.04s; }
.pool-card:nth-child(3) { animation-delay: 0.06s; }
.pool-card:nth-child(4) { animation-delay: 0.08s; }
.pool-card:nth-child(5) { animation-delay: 0.1s; }

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

/* Pool count badge pulse when updated */
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#pool-count.updated {
    animation: badgePulse 0.3s ease;
}