/* PumpX Custom Styles */

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

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

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

::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* Modal animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-modal {
    animation: modalFadeIn 0.2s ease-out;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Gradient text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Card hover effects */
.group:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

/* Button ripple effect */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after {
    width: 300px;
    height: 300px;
}

/* Input focus effects */
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* Progress bar animation */
#progressBar {
    transition: width 0.3s ease-in-out;
}

/* Toast notification styles */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: #1a1a1a;
    border: 1px solid #8b5cf6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

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

/* Responsive utilities */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    header,
    button,
    .no-print {
        display: none;
    }
}

/* Accessibility improvements */
*:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode enhancements */
.dark {
    color-scheme: dark;
}

/* Selection color */
::selection {
    background: #8b5cf6;
    color: white;
}

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

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

/* Tooltip styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid #8b5cf6;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 8px;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Code block styles */
code {
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

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

.card-hover:hover {
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
    transform: translateY(-4px);
}

/* PWA Mobile App Styles */
@media (display-mode: standalone) {
    body {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Safe area for notch devices (iPhone X+) */
body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* iOS smooth scrolling */
body {
    -webkit-overflow-scrolling: touch;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior-y: contain;
}

/* Mobile touch feedback */
button, a, .clickable {
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.3);
    tap-highlight-color: rgba(139, 92, 246, 0.3);
}

/* Glass morphism effect */
.glass-morphism {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Neumorphism buttons */
.neuro-button {
    background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
    box-shadow: 5px 5px 10px #0a0a0a, -5px -5px 10px #242424;
    transition: all 0.3s ease;
}

.neuro-button:active {
    box-shadow: inset 5px 5px 10px #0a0a0a, inset -5px -5px 10px #242424;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: transform 0.3s ease;
}

.fab:active {
    transform: scale(0.95);
}

/* Bottom navigation bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Pull to refresh indicator */
.ptr-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: rgba(139, 92, 246, 0.9);
    border-radius: 0 0 12px 12px;
    color: white;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Splash screen animation */
@keyframes splashFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: splashFade 0.5s ease-out 1.5s forwards;
}

/* Haptic feedback simulation */
@keyframes haptic {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.98); }
}

.haptic-feedback:active {
    animation: haptic 0.1s ease;
}

/* Status bar styling for PWA */
@media (display-mode: standalone) {
    header {
        padding-top: calc(env(safe-area-inset-top) + 12px);
    }
}

/* Improved mobile card layout */
@media (max-width: 640px) {
    .token-card {
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 12px;
    }
    
    /* Larger touch targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Full width modals on mobile */
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        position: fixed;
        bottom: 0;
    }
}

/* Skeleton loading for better UX */
.skeleton-card {
    background: linear-gradient(
        90deg,
        rgba(26, 26, 26, 0.8) 0%,
        rgba(37, 37, 37, 0.8) 50%,
        rgba(26, 26, 26, 0.8) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 12px;
}

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

/* Smooth transitions for all interactive elements */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
