* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Prevent native browser pull-to-refresh on mobile */
    overscroll-behavior-y: none; 
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #111111;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Hide scrollbar but allow scrolling */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Fade-in animation for balance changes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.balance-update {
    animation: fadeIn 0.3s ease-out;
    will-change: opacity, transform;
}

/* Rotation for the spinner - GPU accelerated for 60fps */
@keyframes spin {
    from { transform: rotate(0deg) translateZ(0); }
    to { transform: rotate(360deg) translateZ(0); }
}

.animate-spin {
    animation: spin 1s linear infinite;
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
}

/* "Ticking" rotation for the 8-pill spinner */
.animate-spin-steps {
    animation: spin 0.8s steps(8) infinite;
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
}

/* Skeleton Loading Pulse - GPU accelerated for 60fps */
@keyframes pulse-dark {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.skeleton-pulse {
    animation: pulse-dark 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    will-change: opacity;
}

/* Account Drawer Styles */
#account-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #1C1C1E;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 50;
    max-height: 70vh;
    overflow-y: auto;
}

#account-drawer.drawer-open {
    transform: translateY(0);
}

#drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    z-index: 40;
}

#drawer-backdrop.backdrop-open {
    opacity: 1;
    visibility: visible;
}

/* Smooth return for the content after pulling - GPU accelerated for 60fps */
#refresh-content {
    transition: transform 0s; /* Default no transition for instant drag */
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
}

#refresh-content.returning {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Refresh spinner - GPU accelerated for 60fps */
#refresh-spinner-container {
    will-change: opacity, transform;
    transform: translateZ(0); /* Force GPU acceleration */
}

#refresh-spinner {
    opacity: 0;
    transition: opacity 0.2s ease;
    will-change: opacity;
}

.pulling #refresh-spinner {
    opacity: 1;
}

/* Make the main container scrollable */
#app-container {
    overflow-y: hidden;
    touch-action: pan-y; /* Crucial for 60fps scrolling performance */
}

#app-container::-webkit-scrollbar {
    display: none;
}

#app-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.price-text {
    /* This makes text look slightly thicker/chunkier, matching the target image style */
    -webkit-font-smoothing: auto; 
    -moz-osx-font-smoothing: auto;
}
