/* Color Palette - Matching iOS App */
:root {
    --app-purple: rgb(127, 102, 255);
    --matte-black: rgb(36, 36, 38);
    --app-dark-gray: rgb(41, 41, 43);
    --medium-dark: rgb(31, 31, 33);
    --dark-background: rgb(23, 23, 24);
    --deep-background: rgb(26, 26, 29);
    --rounded-font: 'Avenir Next Rounded', 'SF Pro Rounded', 'Nunito', 'Quicksand', 'Avenir', 'Helvetica Neue', system-ui, sans-serif;
    /* Liquid glass tokens */
    --glass-bg: rgba(255,255,255,0.03);
    --glass-bg-hover: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.08);
    --glass-border-hover: rgba(255,255,255,0.14);
    --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 60%);
    --glass-blur: 20px;
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
    --accent-green: #22c55e;
    --accent-green-glow: rgba(34,197,94,0.15);
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239,68,68,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

*:focus {
    outline: none;
}

/* GPU acceleration for smooth animations */
.swap-container-wrapper,
.swap-box,
.custom-select-dropdown,
.modal-content,
.profile-menu,
.primary-btn,
.tab-btn,
.network-dropdown,
.connect-dropdown {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Will-change hints for frequently animated elements */
.swap-slogan,
.swap-container-wrapper,
.custom-select-dropdown,
.modal,
.profile-menu {
    will-change: transform, opacity;
}

/* Optimized image loading for all coin logos */
img[src*="cryptocurrency-icons"],
img[src*="coincap.io"],
img[src*="coingecko.com"],
img[src*="coinmarketcap.com"],
.custom-select-option img,
.floating-coin-img,
.transaction-item img,
.profile-coin-logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: opacity;
    contain: layout style paint;
}

/* Prevent layout shifts during image loading */
.custom-select-option img,
.floating-coin-img,
.profile-coin-logo {
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    background-color: #1a1a1d;
    color-scheme: dark;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* iOS status bar background - extends to top edge */
@supports (padding-top: env(safe-area-inset-top)) {
    html::before {
        content: '';
        position: fixed;
        top: calc(-1 * env(safe-area-inset-top));
        left: 0;
        right: 0;
        height: calc(100vh + env(safe-area-inset-top));
        background: #1a1a1d;
        z-index: -1;
        pointer-events: none;
    }
}

html {
    padding: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    background: var(--deep-background);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--deep-background);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    position: relative;
    z-index: 0;
    /* Extend background into safe area */
    padding-top: env(safe-area-inset-top, 0px);
    margin-top: calc(-1 * env(safe-area-inset-top, 0px));
    animation: backgroundFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transition: background 0.4s ease, color 0.3s ease;
}

/* Theme transitions — only active during theme switch (class added/removed by JS) */
body.theme-transition,
body.theme-transition *,
body.theme-transition *::before,
body.theme-transition *::after {
    transition-property: background-color, border-color, box-shadow, color;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Prevent layout shifts during theme change */
img, .profile-coin-logo, .coin-logo, .explore-coin-logo {
    transition: none !important;
}

/* Make token logos stand out on the flat background */
.custom-select-logo,
.custom-select-option img,
.profile-coin-logo,
.coin-logo,
.send-coin-logo,
.pool-input-logo,
.unpool-token-logo,
.explore-token-logo,
.coin-logo-select {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(255, 255, 255, 0.12);
}

.profile-pool-logo {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Views */
.view {
    min-height: 100vh;
}

/* Buttons */
.primary-btn {
    width: 100%;
    min-height: 56px;
    border: none;
    border-radius: 12px;
    background: #ec4899;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.primary-btn:hover {
    background: #f472b6;
}

.primary-btn:active {
    background: #db2777;
}

/* Swap Button Animations */
.primary-btn.swapping {
    background: #ec4899;
    color: white;
    pointer-events: none;
    opacity: 1 !important;
}

.primary-btn.success {
    background: #22c55e;
    color: white;
    pointer-events: none;
    opacity: 1 !important;
    animation: successPop 0.35s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0.97); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.swap-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spinSmooth 0.8s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spinSmooth {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Swap button processing states */
.swap-btn.swapping {
    animation: processingPulse 3.5s ease-in-out infinite;
}

@keyframes processingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Animated text for button states */
.swap-btn-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: statusFadeIn 0.3s ease-out;
}

@keyframes statusFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Swap Success Animation */
.swap-success-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 21px;
    animation: successContentIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.swap-success-content.fade-out {
    opacity: 0;
    transform: scale(0.85);
}

.swap-success-coin {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.swap-success-coin.from-coin {
    animation: coinSlideFromLeft 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.swap-success-coin.to-coin {
    animation: coinSlideFromRight 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both;
}

.swap-success-arrow {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.95);
    animation: arrowSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s both;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.swap-success-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: white;
    animation: successTextFadeIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.swap-success-text::before {
    content: '✓';
    font-size: 14px;
    font-weight: 600;
    animation: checkPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes successContentIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes successTextFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(2px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes checkPop {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes arrowSlide {
    from {
        opacity: 0;
        transform: translateX(-10px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes coinSlideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes coinSlideFromRight {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes arrowPulse {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.2);
    }
    100% {
        transform: scaleX(1);
    }
}

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

.primary-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.primary-btn:disabled.swapping,
.primary-btn:disabled.success {
    cursor: wait;
    opacity: 1;
}

.secondary-btn {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalBackdropIn 0.18s ease-out;
}

.modal-content {
    background: rgba(18, 18, 22, 0.98);
    padding: 28px 24px 24px;
    border-radius: 16px;
    max-width: 440px;
    width: calc(100% - 32px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
    will-change: transform, opacity;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.modal-content h2 {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 20px;
    font-size: 13px;
}

.recovery-phrase-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.recovery-phrase-header h2 {
    margin: 0;
}

.warning {
    background: rgba(255, 149, 0, 0.15);
    padding: 12px;
    border-radius: 12px;
    border-left: 4px solid rgb(255, 149, 0);
}

.recovery-phrase {
    background: transparent;
    padding: 0;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    word-spacing: 6px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
    max-width: 320px;
}

@media (max-width: 600px) {
    .recovery-phrase-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .recovery-phrase {
        max-width: 100%;
        text-align: left;
    }
}

@keyframes modalBackdropIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Import wallet - paste catcher (visually hidden but focusable) */
.import-paste-catcher {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0.01;
}

/* Import modal layout */
.import-modal-content {
    overflow: hidden;
}
.import-step {
    transition: opacity 0.2s ease, transform 0.2s ease;
    -webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;
}
.import-step.fade-out {
    opacity: 0;
    transform: scale(0.97);
    -webkit-transform: scale(0.97);
    pointer-events: none;
}
.import-step.fade-in {
    opacity: 1;
    transform: scale(1);
    -webkit-transform: scale(1);
}

/* 12-word grid */
.import-words-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
    cursor: text;
}
.import-paste-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    margin-bottom: 14px;
    background: rgba(46, 94, 170, 0.06);
    border: 1px solid rgba(46, 94, 170, 0.2);
    border-radius: 12px;
    color: rgba(120, 170, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    -webkit-transition: background 0.15s, border-color 0.15s, -webkit-transform 0.1s;
}
.import-paste-btn:hover {
    background: rgba(46, 94, 170, 0.18);
    border-color: rgba(46, 94, 170, 0.5);
}
.import-paste-btn:active {
    transform: scale(0.96);
    -webkit-transform: scale(0.96);
}
html[data-theme="light"] .import-paste-btn {
    background: rgba(46, 94, 170, 0.06);
    border-color: rgba(46, 94, 170, 0.25);
    color: rgba(46, 94, 170, 0.9);
}
html[data-theme="light"] .import-paste-btn:hover {
    background: rgba(46, 94, 170, 0.12);
}
.import-word-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 11px;
    opacity: 0;
    transform: translateY(4px) scale(0.96);
    -webkit-transform: translateY(4px) scale(0.96);
    transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
    -webkit-transition: opacity 0.15s ease, -webkit-transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
    will-change: transform, opacity;
    overflow: hidden;
    min-width: 0;
}
.import-word-box.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    -webkit-transform: translateY(0) scale(1);
}
.import-word-box.filled {
    border-color: rgba(46, 94, 170, 0.3);
    background: rgba(46, 94, 170, 0.05);
}
.import-word-num {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    min-width: 14px;
    flex-shrink: 0;
    font-weight: 600;
}
.import-word-text {
    font-size: 13px;
    color: white;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 500;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.import-word-box.filled .import-word-text {
    color: rgba(120, 170, 255, 1);
}

/* Loading / verifying step */
.import-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 280px;
}
.import-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(120, 170, 255, 0.8);
    border-radius: 50%;
    animation: importSpin 0.6s linear infinite;
    -webkit-animation: importSpin 0.6s linear infinite;
    margin-bottom: 24px;
    transition: border-color 0.3s ease;
}
@-webkit-keyframes importSpin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes importSpin {
    to { transform: rotate(360deg); }
}
.import-status-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    transition: opacity 0.2s ease;
}
.import-address {
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.import-address.show {
    opacity: 1;
}

/* Success checkmark */
.import-spinner.success {
    animation: importPop 0.3s ease forwards;
    -webkit-animation: importPop 0.3s ease forwards;
    border-color: rgba(74, 222, 128, 0.3);
    border-top-color: rgba(74, 222, 128, 0.3);
    position: relative;
}
@-webkit-keyframes importPop {
    0% { -webkit-transform: scale(1); transform: scale(1); }
    50% { -webkit-transform: scale(1.15); transform: scale(1.15); }
    100% { -webkit-transform: scale(1); transform: scale(1); }
}
@keyframes importPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.import-spinner.success::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    font-size: 22px;
    color: rgba(74, 222, 128, 1);
}

/* Error state */
.import-spinner.error {
    animation: importShake 0.3s ease forwards;
    -webkit-animation: importShake 0.3s ease forwards;
    border-color: rgba(239, 68, 68, 0.3);
    border-top-color: rgba(239, 68, 68, 0.3);
    position: relative;
}
@-webkit-keyframes importShake {
    0%, 100% { -webkit-transform: translateX(0); transform: translateX(0); }
    25% { -webkit-transform: translateX(-4px); transform: translateX(-4px); }
    75% { -webkit-transform: translateX(4px); transform: translateX(4px); }
}
@keyframes importShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.import-spinner.error::after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    font-size: 22px;
    color: rgba(239, 68, 68, 1);
}

/* Light theme */
html[data-theme="light"] .import-word-box {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}
html[data-theme="light"] .import-word-box.filled {
    border-color: rgba(46, 94, 170, 0.3);
    background: rgba(46, 94, 170, 0.05);
}
html[data-theme="light"] .import-word-num {
    color: rgba(0, 0, 0, 0.35);
}
html[data-theme="light"] .import-word-text {
    color: rgba(0, 0, 0, 0.8);
}
html[data-theme="light"] .import-word-box.filled .import-word-text {
    color: rgba(46, 94, 170, 1);
}
html[data-theme="light"] .import-spinner {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: rgba(46, 94, 170, 0.8);
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-buttons button {
    flex: 1;
}

.modal-buttons .primary-btn {
    min-height: 48px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.9), rgba(168, 85, 247, 0.8));
}

.modal-buttons .primary-btn:hover {
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.25);
    transform: translateY(-1px);
}

.modal-buttons .primary-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.modal-buttons .primary-btn:disabled {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

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

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.94) translateY(16px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.01) translateY(-2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes sloganReveal {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
        letter-spacing: 4px;
        filter: blur(4px);
    }
    30% {
        opacity: 0.3;
        transform: translateY(12px) scale(0.98);
        letter-spacing: 2px;
        filter: blur(2px);
    }
    60% {
        opacity: 0.8;
        transform: translateY(2px) scale(1.005);
        letter-spacing: -0.5px;
        filter: blur(0px);
    }
    80% {
        opacity: 0.95;
        transform: translateY(-1px) scale(1.01);
        letter-spacing: -1.2px;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: -1.5px;
        filter: blur(0px);
    }
}

@keyframes glowIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes backgroundFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes buttonReveal {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scroll-triggered animations - Ultra smooth with spring physics */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.96);
    filter: blur(10px);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Smooth exit animation when scrolling back up */
.scroll-reveal:not(.revealed) {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-70px) translateY(15px) scale(0.95);
    filter: blur(8px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
    filter: blur(0);
}

.scroll-reveal-left:not(.revealed) {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(70px) translateY(15px) scale(0.95);
    filter: blur(8px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
    filter: blur(0);
}

.scroll-reveal-right:not(.revealed) {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.88);
    filter: blur(10px);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.scroll-reveal-scale:not(.revealed) {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger delays for children - smoother cascade */
.scroll-stagger > *:nth-child(1) { transition-delay: 0s; }
.scroll-stagger > *:nth-child(2) { transition-delay: 0.08s; }
.scroll-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.scroll-stagger > *:nth-child(4) { transition-delay: 0.24s; }
.scroll-stagger > *:nth-child(5) { transition-delay: 0.32s; }
.scroll-stagger > *:nth-child(6) { transition-delay: 0.4s; }

/* Info stats specific stagger - cascade effect */
.info-stats.scroll-stagger > .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.info-stats.scroll-stagger > .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.info-stats.scroll-stagger > .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.info-stats.scroll-stagger > .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.info-stats.scroll-stagger > .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }

/* Reset delays for exit animation */
.info-stats.scroll-stagger > .scroll-reveal:not(.revealed) { transition-delay: 0s !important; }

/* Exchange View */
.app-header {
    background: rgba(14, 14, 18, 0.6);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    padding: 16px 20px 10px 20px;
    padding-top: calc(16px + env(safe-area-inset-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    opacity: 0;
    animation: fadeSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards;
    transition: background-color 0.05s linear, border-color 0.05s linear;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-block;
    position: relative;
    object-fit: contain;
    filter: saturate(1.1) brightness(0.85);
}

.header-brand {
    display: none;
}

.header-brand-img {
    height: 36px;
    max-height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    margin-left: -14px;
    margin-right: 16px;
    margin-top: -12px;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
}

.header-tabs {
    display: flex;
    gap: 2px;
    align-items: center;
    margin-top: -11px;
    margin-left: 0;
}

.header-tabs .tab-btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid transparent;
    outline: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.01em;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.header-tabs .tab-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.header-tabs .tab-btn.active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.08);
}

.header-tabs .tab-btn.active:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header-tabs .tab-btn.active:active {
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Menu - Hidden on desktop */
.mobile-menu-wrapper {
    display: none;
    position: relative;
    width: fit-content;
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.hamburger-line {
    width: 16px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
    transition: all 0.2s ease;
}

.mobile-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(-6px) scale(0.97);
    transform-origin: top left;
    background: rgba(18, 18, 22, 0.97);
    backdrop-filter: blur(32px) saturate(1.4);
    -webkit-backdrop-filter: blur(32px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 5px;
    margin-top: 8px;
    min-width: 190px;
    z-index: 1000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    opacity: 0;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.mobile-menu-dropdown.open,
.mobile-menu-wrapper:hover .mobile-menu-dropdown:not(.force-closed) {
    display: flex;
    flex-direction: column;
    gap: 2px;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.mobile-menu-dropdown.force-closed {
    display: none !important;
}

.mobile-menu-item {
    padding: 11px 14px;
    background: transparent;
    border: none;
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    position: relative;
}


.mobile-menu-item:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-menu-item.active {
    color: white;
    background: rgba(74, 158, 255, 0.1);
}

.mobile-menu-item.active::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4a9eff;
}

/* ── Mobile Bottom Nav Bar ──────────────────── */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(24, 24, 28, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
}

@media (max-width: 640px) {
    .mobile-nav-bar { display: flex; }
    .mobile-menu-wrapper { display: none !important; }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 10px;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    flex: 1;
    max-width: 80px;
}
.mobile-nav-item svg {
    transition: color 0.15s ease;
}
.mobile-nav-item:active {
    transform: scale(0.95);
}
.mobile-nav-item.active {
    color: #fff;
}
.mobile-nav-item.active svg {
    stroke: #fff;
}

html[data-theme="light"] .mobile-nav-bar {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .mobile-nav-item {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .mobile-nav-item.active {
    color: #000;
}
html[data-theme="light"] .mobile-nav-item.active svg {
    stroke: #000;
}

.header-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.wallet-btn {
    padding: 9px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: clamp(15px, 2.5vw, 18px);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: 0.3px;
    -webkit-font-smoothing: antialiased;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    color: white;
}

.connect-wrapper {
    position: relative;
    z-index: 1001;
}

.connect-btn {
    background: rgba(236, 72, 153, 0.1);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    border: 1px solid rgba(236, 72, 153, 0.18);
    border-radius: 20px;
    color: #ec4899;
    box-shadow: none;
    letter-spacing: 0.01em;
}

.connect-btn:hover {
    background: rgba(236, 72, 153, 0.16);
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: none;
    transform: none;
}

.connect-btn:active {
    background: rgba(236, 72, 153, 0.22);
    transform: none;
}

#connectDropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    width: calc(100% - 32px);
    max-width: 320px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    background: rgba(22, 22, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.25s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.25s;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    z-index: 10001;
    pointer-events: none;
}

.connect-wallet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 6px;
    width: 100%;
}

.connect-wallet-tile {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 14px 4px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    min-height: 70px;
    overflow: visible !important;
}
.connect-wallet-tile:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}
.connect-wallet-tile img {
    display: block;
    flex-shrink: 0;
}
.connect-wallet-tile span {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

@media (max-width: 300px) {
    .connect-wallet-grid {
        grid-template-columns: 1fr 1fr;
    }
}

#connectDropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

#connectDropdown.closing {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 1, 1),
                transform 0.25s cubic-bezier(0.4, 0, 1, 1),
                visibility 0.25s;
}

.connect-loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 36px 20px 32px;
}

.connect-loading-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.connect-loading-logo img,
.connect-loading-logo svg {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.connect-loading-spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid rgba(255, 255, 255, 0.06);
    border-top-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: connectSpin 0.7s linear infinite;
    margin: 4px 0;
}

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

.connect-loading-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.connect-loading-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

.connect-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.connect-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.connect-backdrop.closing {
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

html[data-theme="light"] #connectDropdown {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

.connect-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin-bottom: 4px;
}

.connect-modal-header img {
    border-radius: 12px;
}

.connect-modal-header span {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: -0.2px;
}

.connect-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    border-radius: 14px;
    margin: 0;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.connect-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

#importWalletBtn {
    grid-column: 1 / -1;
    flex-direction: row;
    padding: 12px 18px;
    gap: 10px;
    justify-content: center;
    background: transparent;
    border-color: transparent;
}

#importWalletBtn span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
}

#importWalletBtn svg {
    width: 18px;
    height: 18px;
    opacity: 0.25;
}

#importWalletBtn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: transparent;
}

#importWalletBtn:hover span {
    color: rgba(255, 255, 255, 0.5);
}

#importWalletBtn:hover svg {
    opacity: 0.5;
}

.connect-dropdown-divider {
    grid-column: 1 / -1;
    display: none;
}

#googleLoginBtn {
    grid-column: 1 / -1;
    flex-direction: row;
    padding: 14px 18px;
    gap: 12px;
    justify-content: center;
}

.connect-option::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.connect-option:hover::before {
    opacity: 1;
}

/* Wallet-specific hover colors */
#baseWallet::before {
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.2) 0%, rgba(0, 82, 255, 0.08) 100%);
    border: 1px solid rgba(0, 82, 255, 0.3);
}

#phantomWallet::before {
    background: linear-gradient(135deg, rgba(171, 154, 255, 0.2) 0%, rgba(171, 154, 255, 0.08) 100%);
    border: 1px solid rgba(171, 154, 255, 0.3);
}

#uniswapWallet::before {
    background: linear-gradient(135deg, rgba(255, 0, 122, 0.2) 0%, rgba(255, 0, 122, 0.08) 100%);
    border: 1px solid rgba(255, 0, 122, 0.3);
}

#metamaskWallet::before {
    background: linear-gradient(135deg, rgba(246, 133, 27, 0.2) 0%, rgba(246, 133, 27, 0.08) 100%);
    border: 1px solid rgba(246, 133, 27, 0.3);
}

#importWalletBtn::before {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

#importWalletBtn svg {
    flex-shrink: 0;
}

html[data-theme="light"] #importWalletBtn svg {
    stroke: rgba(0, 0, 0, 0.6);
}

.connect-option:active {
    transform: scale(0.97);
}

.connect-option img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

.connect-option:hover img {
    transform: scale(1.05);
}

.connect-option span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    letter-spacing: 0.01em;
}

.connect-option:hover span {
    color: rgba(255, 255, 255, 0.6);
}

.connect-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.connect-option.disabled:hover {
    background: transparent;
}

.coming-soon-badge {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: auto;
}

.profile-btn {
    background: rgba(51, 102, 204, 0.12);
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(51, 102, 204, 0.15);
    outline: none;
    box-shadow: 0 0 12px rgba(51,102,204,0.06);
    color: rgba(81, 132, 234, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-top: -2px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.profile-btn:hover {
    background: rgba(51, 102, 204, 0.2);
    color: rgba(81, 142, 255, 1);
    border-color: rgba(51, 102, 204, 0.25);
    box-shadow: 0 0 20px rgba(51,102,204,0.12);
    transform: scale(1.05);
}

.profile-btn:active,
.profile-btn:focus {
    background: rgba(51, 102, 204, 0.2);
    outline: none;
    box-shadow: none;
}

/* Profile Slide Out Menu */
.profile-menu {
    position: fixed;
    top: 20px;
    right: 10px;
    width: 400px;
    height: calc(100vh - 40px);
    background: #15171b;
    z-index: 10002;
    transform: translateX(430px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.18s ease-out;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    opacity: 0;
    will-change: transform, opacity;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.03);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
}

.profile-menu.open {
    transform: translateX(0);
    opacity: 1;
}

.profile-menu-header {
    padding: 22px 22px 16px;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    overflow: visible;
    flex: 1;
    min-height: 0;
    position: relative;
}

.profile-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.5);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.profile-close-btn:hover {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
}
html[data-theme="light"] .profile-close-btn {
    background: rgba(0,0,0,0.05);
    color: rgba(0,0,0,0.4);
}
html[data-theme="light"] .profile-close-btn:hover {
    background: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.7);
}

/* Header icons */
.header-icons {
    position: absolute;
    top: 20px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.settings-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.15s ease;
}

.settings-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

/* Settings button */
.settings-btn-wrapper {
    position: relative;
}

.settings-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(24, 24, 27, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    padding: 8px;
}

.settings-btn-wrapper:hover .settings-dropdown,
.settings-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.settings-dropdown-item {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    cursor: pointer;
    text-align: left;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.settings-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Theme toggle in settings */
.settings-section {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s ease;
}

.settings-section:not(:last-child) {
    margin-bottom: 8px;
}

.settings-section:hover {
    background: rgba(255, 255, 255, 0.04);
}

.settings-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.theme-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-option {
    width: 36px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.theme-option:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(236, 72, 153, 0.15);
}

.theme-option.active {
    background: rgb(236, 72, 153);
    color: white;
}

.theme-option.active:hover {
    background: rgb(246, 92, 173);
}

.theme-option svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Network toggle */
.network-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.network-option {
    min-width: 60px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0 10px;
}

.network-option:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(236, 72, 153, 0.15);
}

.network-option.active {
    background: rgb(236, 72, 153);
    color: white;
}

.network-option.active:hover {
    background: rgb(246, 92, 173);
}

.network-option svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.network-option span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Power button */
.power-btn-wrapper {
    position: relative;
    overflow: visible;
}

.power-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.15s ease;
}

.power-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.power-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(32, 32, 34, 1);
    border-radius: 10px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Hover bridge - invisible area to keep dropdown open when moving cursor */
.power-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.power-btn-wrapper:hover .power-dropdown,
.power-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.power-dropdown-item {
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: rgba(220, 70, 60, 1);
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    cursor: pointer;
    text-align: left;
    border-radius: 10px;
    transition: background 0.15s ease;
    position: relative;
    z-index: 1;
}

.power-dropdown-item:hover {
    background: rgba(220, 70, 60, 0.15);
}

.power-dropdown-item:active {
    background: rgba(220, 70, 60, 0.25);
    transform: scale(0.98);
}

.power-dropdown-item:disabled {
    opacity: 0.6;
    cursor: wait;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(150deg, rgba(51, 102, 204, 0.22) 0%, rgba(236, 72, 153, 0.12) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(51, 102, 204, 1);
    margin-top: -8px;
}

.profile-avatar svg {
    width: 26px;
    height: 26px;
}

.profile-address-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin-left: -8px;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.profile-address-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.profile-address {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
    letter-spacing: 0.3px;
    -webkit-font-smoothing: antialiased;
}

.profile-address-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}
.profile-sol-row {
    margin-top: -2px;
}

.profile-balance {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
    margin-top: 6px;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    -webkit-font-smoothing: antialiased;
}

/* Buy Crypto Button */
/* Buy Crypto Button in Profile Header */
.header-icons .buy-crypto-btn,
.buy-crypto-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(236, 72, 153, 0.15) !important;
    color: rgb(236, 72, 153) !important;
    border: 1px solid rgba(236, 72, 153, 0.35) !important;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-font-smoothing: antialiased;
    white-space: nowrap;
    height: 36px;
    box-sizing: border-box;
}

.header-icons .buy-crypto-btn:hover,
.buy-crypto-btn:hover {
    background: rgba(236, 72, 153, 0.25) !important;
    color: rgb(244, 114, 182) !important;
    border-color: rgba(236, 72, 153, 0.5) !important;
    transform: translateY(-1px);
}

.header-icons .buy-crypto-btn:active,
.buy-crypto-btn:active {
    background: rgba(236, 72, 153, 0.3) !important;
    transform: translateY(0);
}

.buy-crypto-btn svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.profile-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.profile-tab {
    flex: 1;
    padding: 7px 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.profile-tab:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.07);
}

.profile-tab:focus-visible {
    outline: 2px solid rgba(236, 72, 153, 0.45);
    outline-offset: 1px;
}

.profile-tab:active {
    transform: none;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95) 0%, rgba(219, 39, 119, 0.95) 100%);
    color: #ffffff;
}

.profile-tab.active {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95) 0%, rgba(219, 39, 119, 0.95) 100%);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.25);
}

/* Profile Tab Content */
.profile-tab-content {
    display: none;
    width: 100%;
    opacity: 0;
}

.profile-tab-content.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    opacity: 1;
    animation: tabSlideIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Profile toggle bar (Coins / History) */
.profile-toggle-bar {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.profile-toggle-btn {
    flex: 1;
    padding: 7px 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.3px;
}
.profile-toggle-btn.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.profile-toggle-btn:hover:not(.active) {
    color: rgba(255,255,255,0.6);
}
html[data-theme="light"] .profile-toggle-bar {
    background: rgba(0,0,0,0.04);
}
html[data-theme="light"] .profile-toggle-btn {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .profile-toggle-btn.active {
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.85);
}
.profile-view {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.profile-view.active {
    display: flex;
}

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

#sendView.active {
    flex: 1;
    min-height: 0;
}

/* Transactions List */
.profile-transactions-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

.profile-transactions-list::-webkit-scrollbar {
    width: 3px;
}

.profile-transactions-list::-webkit-scrollbar-track {
    background: transparent;
}

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

#profileTransactionsList {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 4px;
    contain: layout style paint;
    will-change: scroll-position;
}

.profile-tx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    min-height: 52px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: none;
    content-visibility: auto;
    contain-intrinsic-size: auto 52px;
    opacity: 1;
}
.profile-tx-item.no-anim {
    animation: none;
    opacity: 1;
}

/* Opt tx list internals out of universal * transition for perf */
.profile-tx-item *,
.profile-tx-item *::before,
.profile-tx-item *::after {
    transition: none;
}

@keyframes txItemFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}


@media (hover: hover) {
    .profile-tx-item:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.07);
    }
}

.profile-tx-logos {
    position: relative;
    width: 34px;
    height: 30px;
    flex-shrink: 0;
}

.profile-tx-logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
    position: absolute;
    top: 2px;
    left: 0;
}

.profile-tx-logo.second {
    position: absolute;
    left: 12px;
    top: 2px;
    border: 2px solid rgb(20, 20, 24);
    width: 24px;
    height: 24px;
}

.profile-tx-logo.single {
    position: static;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

/* Logo wrapper for single logos with network badge */
.profile-tx-logo-wrapper {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

/* Network badge on transaction logos */
.network-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1a1a2e;
    border: 2px solid #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.network-badge img {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-tx-logos .network-badge {
    bottom: 0;
    right: 10px;
}

.profile-tx-icon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-tx-icon-placeholder.swap {
    background: rgba(139, 92, 246, 0.15);
}

.profile-tx-icon-placeholder.pool {
    background: rgba(236, 72, 153, 0.15);
}

.profile-tx-icon-placeholder.unpool {
    background: rgba(249, 115, 22, 0.15);
}

.profile-tx-icon-placeholder.send {
    background: rgba(239, 68, 68, 0.15);
}

.profile-tx-icon-placeholder.receive {
    background: rgba(34, 197, 94, 0.15);
}

.profile-tx-icon-placeholder.other {
    background: rgba(255, 255, 255, 0.1);
}

.profile-tx-icon-placeholder.reward {
    background: rgba(250, 204, 21, 0.15);
}

.profile-tx-icon-placeholder.flip-create {
    background: rgba(99, 102, 241, 0.15);
}

.profile-tx-icon-placeholder.flip-join {
    background: rgba(168, 85, 247, 0.15);
}

.profile-tx-icon-placeholder.flip-win {
    background: rgba(52, 211, 153, 0.15);
}

.profile-tx-icon-placeholder.flip-lose {
    background: rgba(248, 113, 113, 0.15);
}

.profile-tx-icon-placeholder.flip-cancel {
    background: rgba(251, 191, 36, 0.15);
}
.profile-tx-icon-placeholder.onramp {
    background: rgba(34, 197, 94, 0.15);
}

.profile-tx-icon-placeholder.crash-win {
    background: rgba(52, 211, 153, 0.15);
}

.profile-tx-icon-placeholder.crash-loss {
    background: rgba(248, 113, 113, 0.15);
}

.profile-tx-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-tx-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: -0.01em;
}

.profile-tx-id {
    font-size: 9.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 5px;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    letter-spacing: -0.3px;
    vertical-align: 1px;
}

.profile-tx-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scan-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: .2px;
    transition: background 0.15s ease;
    margin-left: 5px;
    vertical-align: 1px;
}
.scan-link.scan-sol {
    background: rgba(153, 69, 255, 0.1);
    color: #9945FF;
    border: 1px solid rgba(153, 69, 255, 0.15);
}
.scan-link.scan-sol:hover {
    background: rgba(153, 69, 255, 0.25);
    color: #b77dff;
}
.scan-link.scan-base {
    background: rgba(37, 99, 235, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(37, 99, 235, 0.15);
}
.scan-link.scan-base:hover {
    background: rgba(37, 99, 235, 0.25);
    color: #60a5fa;
}
.scan-check {
    color: #22c55e;
    font-size: 10px;
    line-height: 1;
}

.profile-tx-amount {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.profile-tx-amount.positive {
    color: rgb(52, 211, 115);
}

.profile-tx-amount.negative {
    color: rgb(248, 82, 82);
}

.profile-tx-bal {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.22);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    letter-spacing: -0.3px;
}

.profile-no-transactions {
    text-align: center;
    padding: 28px 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    font-weight: 500;
}


.profile-coin-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    contain: layout style paint;
}

.profile-coin-list::-webkit-scrollbar {
    width: 4px;
}

.profile-coin-list::-webkit-scrollbar-track {
    background: transparent;
}

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

.profile-coin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    min-height: 58px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease;
    transform: translateZ(0);
    contain: layout style paint;
}

.profile-coin-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.07);
}

.profile-coin-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
    border: none;
}

.profile-coin-logo[src]:not([src=""]) {
    background: transparent;
    animation: none;
}

.profile-coin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-coin-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: -0.01em;
}

.profile-coin-amount {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
}

.profile-coin-price {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
}

.profile-coin-value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* Send View Styles */
.send-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
    gap: 10px;
    flex: 1;
    justify-content: flex-start;
}

.send-top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px 18px;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: none;
}

.send-bottom-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    margin-top: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.send-amount-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.send-amount-value {
    font-size: 36px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -0.5px;
    line-height: 1;
}

.send-amount-logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.send-amount-logo[src]:not([src=""]) {
    opacity: 1;
    object-fit: cover;
    flex-shrink: 0;
}

.send-amount-symbol {
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    line-height: 1;
    letter-spacing: 0.3px;
}

.send-usd-value {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.send-coin-wrapper {
    position: relative;
    width: 100%;
}

.send-coin-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.send-coin-selector:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}

.send-coin-selector:focus-within {
    border-color: rgba(236, 72, 153, 0.45);
    box-shadow: none;
}

.send-coin-logo-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.send-coin-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.send-coin-logo[src]:not([src=""]) {
    opacity: 1;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.send-coin-network-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(18, 18, 20, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.send-coin-network-badge img {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.send-coin-name {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.send-coin-balance {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.send-coin-arrow {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.send-coin-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.send-coin-dropdown.open {
    display: block;
}

.send-coin-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.send-coin-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.send-coin-option-logo-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.send-coin-option-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.2s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.send-coin-option-img[src]:not([src=""]) {
    opacity: 1;
}

.send-coin-option-network-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(18, 18, 20, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.send-coin-option-network-badge img {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.send-coin-option span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.send-coin-option .option-balance {
    margin-left: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.send-address-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.2s ease;
}

.send-address-wrapper:focus-within {
    border-color: rgba(236, 72, 153, 0.45);
    background: rgba(255, 255, 255, 0.06);
}

.send-address-input {
    flex: 1;
    padding: 18px 14px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

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

.send-paste-btn {
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.15s ease;
}

.send-paste-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.send-percent-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.send-percent-btn {
    flex: 1;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    box-shadow: none;
}

.send-percent-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.14);
}

.send-percent-btn:active {
    transform: scale(0.98);
}

.send-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    padding: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.send-key {
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    box-shadow: none;
}

.send-key:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.send-key:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(1px) scale(0.98);
}

.send-key-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
}

.send-submit-btn {
    width: 100%;
    padding: 14px;
    background: rgba(236, 72, 153, 0.9);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    margin-top: 6px;
    box-shadow: none;
}

.send-submit-btn:hover {
    transform: none;
    background: rgba(236, 72, 153, 1);
    border-color: rgba(236, 72, 153, 0.5);
}

.send-submit-btn:active {
    transform: none;
    background: rgba(255, 110, 200, 0.95);
}

.send-submit-btn:focus-visible {
    outline: 2px solid rgba(236, 72, 153, 0.45);
    outline-offset: 2px;
}

.send-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* Unpool Modal Styles */
#unpoolModal .pool-liquidity-modal {
    animation: unpoolPopIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
    will-change: transform, opacity;
}

@keyframes unpoolPopIn {
    from { opacity: 0; transform: translateY(6px) scale(0.995); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.unpool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.unpool-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.unpool-pool-name {
    font-size: 12px;
    font-weight: 600;
    color: rgb(255, 120, 190);
    background: rgba(255, 120, 190, 0.14);
    border: 1px solid rgba(255, 120, 190, 0.2);
    padding: 5px 10px;
    border-radius: 999px;
}

.unpool-position-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    padding: 12px;
    margin-bottom: 14px;
    box-shadow: none;
}

.unpool-position-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}

.unpool-position-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.unpool-token-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(14, 14, 18, 0.6);
    border: none;
}

.unpool-token-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    object-fit: cover;
}

.unpool-token-symbol {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}

.unpool-amount-section {
    margin-bottom: 14px;
}

.unpool-amount-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.unpool-percent-buttons {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.unpool-percent-btn {
    flex: 1;
    padding: 7px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.unpool-percent-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.unpool-percent-btn.active {
    background: rgba(255, 120, 190, 0.22);
    color: rgb(255, 120, 190);
}

.unpool-receive-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    padding: 12px;
    margin-bottom: 14px;
    box-shadow: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.unpool-receive-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.unpool-receive-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.unpool-receive-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.02);
    border: none;
}

.unpool-receive-logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    object-fit: cover;
}

.unpool-receive-amount {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: opacity 0.16s ease, transform 0.16s ease;
    will-change: opacity, transform;
}

.unpool-receive-symbol {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.unpool-receipt {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: none;
}

.unpool-receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

.unpool-receipt-row span:last-child {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.16s ease, transform 0.16s ease;
    will-change: opacity, transform;
}

.unpool-value-pulse {
    opacity: 0.75;
    transform: translateY(-0.5px);
}

@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
        opacity: 1;
    }
    .app-header {
        animation: none;
        opacity: 1;
    }
    .swap-slogan {
        animation: none;
        opacity: 1;
    }
    .swap-container-wrapper {
        animation: none;
        opacity: 1;
    }
    .swap-footer {
        animation: none;
        opacity: 1;
    }
    .tab-content.active {
        animation: none;
    }
    #unpoolModal .pool-liquidity-modal {
        animation: none;
    }
    .pool-inputs-row,
    .unpool-receive-section {
        transition: none;
    }
    .pool-liquidity-modal.is-depositing .pool-deposit-steps,
    .pool-liquidity-modal.is-withdrawing .unpool-withdraw-steps {
        animation: none;
    }
    .unpool-receive-amount,
    .unpool-receipt-row span:last-child {
        transition: none;
    }
    .unpool-value-pulse {
        opacity: 1;
        transform: none;
    }
}

.address-copy-btn {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.15s ease;
    padding: 0;
    opacity: 0;
}

.profile-address-row:hover .address-copy-btn {
    opacity: 1;
}

.address-copy-btn:hover {
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.3);
}


/* Profile menu backdrop */
.profile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, background 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.profile-backdrop.open {
    opacity: 1;
    visibility: visible;
    background: transparent;
}

.exchange-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 60px 20px 30px 20px;
    transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
}

/* Crash tab needs full width — break out of the 480px constraint */
.exchange-container:has(#crashTab.active) {
    max-width: 100%;
    padding: 65px 0 0;
    position: relative;
}
/* Predictions tab needs full width too */
.exchange-container:has(#predictionsTab.active) {
    max-width: 100%;
    padding: 0;
    position: relative;
}
/* Tower tab full width */
.exchange-container:has(#towerTab.active) {
    max-width: 100%;
    padding: 60px 0 0;
    position: relative;
    overflow: hidden;
}
/* Ambient glow orbs — disabled for cleaner look */
.exchange-container:has(#crashTab.active)::before,
.exchange-container:has(#crashTab.active)::after {
    display: none;
}
@keyframes crashGlowOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    33%      { transform: translate(50px, -40px) scale(1.2); opacity: 1; }
    66%      { transform: translate(-30px, 30px) scale(0.85); opacity: 0.4; }
}
@keyframes crashGlowOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    40%      { transform: translate(-40px, 30px) scale(1.15); opacity: 0.9; }
    70%      { transform: translate(30px, -20px) scale(0.9); opacity: 0.3; }
}

/* Header blends with page background */
.app-header {
    background: #1a1a1d !important;
    border-bottom-color: transparent !important;
}

/* Deposit/Withdraw QR panel — push down on desktop so it doesn't stack into header */
.google-deposit-qr {
    margin-top: 0;
}

/* Balance Section */
.balance-section {
    background: linear-gradient(145deg, rgba(40, 40, 42, 1), rgba(32, 32, 34, 1));
    padding: 32px;
    border-radius: 24px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.balance-section h2 {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.total-balance {
    font-size: 52px;
    font-weight: 600;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgb(120, 95, 255), rgb(150, 125, 255));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wallet-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Tabs */
.tab-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    background: linear-gradient(145deg, rgba(20, 20, 22, 1), rgba(16, 16, 18, 1));
    padding: 6px;
    border-radius: 16px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    font-size: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--rounded-font);
    letter-spacing: 0.02em;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgb(102, 77, 230), rgb(127, 102, 255));
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.15s ease;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Floating Coins Background - hidden by default, shown on swap tab */
.floating-coins {
    display: none !important;
}

.floating-coin-wrapper {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transform: scale(var(--size-multiplier, 1));
    transition: opacity 0.8s ease-out;
}

.floating-coin-wrapper.loaded {
    opacity: 1;
    animation: floatSimple 25s ease-in-out infinite;
}

/* Single simple float animation - GPU composited, no filter changes */
@keyframes floatSimple {
    0%, 100% { transform: scale(var(--size-multiplier, 1)) translateY(0); }
    50% { transform: scale(var(--size-multiplier, 1)) translateY(-8px); }
}

.floating-coin-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: none;
    transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Static depth layers - blur applied once via CSS, no transitions */
.floating-coin-wrapper.depth-far .floating-coin-img {
    opacity: 0.28;
    filter: blur(4.5px) saturate(1.02);
}

.floating-coin-wrapper.depth-mid .floating-coin-img {
    opacity: 0.45;
    filter: blur(2.8px) saturate(1.08);
}

.floating-coin-wrapper.depth-near .floating-coin-img {
    opacity: 0.65;
    filter: blur(1.2px) saturate(1.12);
}

@media (hover: hover) and (pointer: fine) {
    .floating-coin-wrapper {
        pointer-events: auto;
    }

    .floating-coin-wrapper:hover {
        z-index: 1;
    }

    .floating-coin-wrapper:hover .floating-coin-img {
        transform: scale(1.08);
        opacity: 0.9;
        filter: blur(0px) saturate(1.25) contrast(1.05) brightness(1.05);
        box-shadow: none;
    }
}

.floating-coin-tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    white-space: nowrap;
}

.floating-coin-wrapper:hover .floating-coin-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) rotate(0deg);
}

.tooltip-symbol {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tooltip-price {
    display: none;
}

/* Swap Container Wrapper - hidden, coin list is primary UI */
.swap-container-wrapper {
    background: rgba(20, 20, 24, 0.9);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 6px;
    position: relative;
    z-index: 2;
    margin-top: 5px;
    opacity: 0;
    animation: fadeInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
    transition: margin 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

/* Show swap container when a coin has been selected */
.swap-container-wrapper.swap-active {
    display: block;
}

/* Swap Slogan */
.swap-slogan {
    font-size: clamp(36px, 9vw, 64px);
    font-weight: 600;
    color: white;
    text-align: center;
    margin: 0 clamp(-20px, -10vw, -100px) 36px clamp(-20px, -10vw, -100px);
    padding: 0 10px;
    font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', 'Segoe UI', sans-serif;
    letter-spacing: -0.6px;
    white-space: normal;
    line-height: 1.08;
    opacity: 0;
    animation: sloganReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    -webkit-font-smoothing: antialiased;
    transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Swap Boxes */
.swap-box {
    background: rgba(24, 24, 28, 0.9);
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: visible;
    box-shadow: none;
    transition: border-color 0.15s ease;
}

.swap-box:focus-within {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Percent Buttons */
.percent-buttons {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 5;
}

#fromBox:hover .percent-buttons {
    opacity: 1;
    visibility: visible;
}

.percent-btn {
    padding: 5px 11px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.percent-btn:hover {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.25);
    color: rgba(236, 72, 153, 1);
}

.percent-btn:active {
    transform: scale(0.95);
}

/* Quick Select Coins for Buy Box */
.quick-select-coins {
    position: absolute;
    top: 18px;
    right: 20px;
    display: flex;
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 5;
}

#toBox:hover .quick-select-coins {
    opacity: 1;
    visibility: visible;
}

.quick-select-coin {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    outline: none;
    opacity: 0.5;
    -webkit-tap-highlight-color: transparent;
}

.quick-select-coin:hover {
    transform: scale(1.12);
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

.quick-select-coin:focus {
    outline: none;
}

.quick-select-coin:active {
    transform: scale(1);
}

.swap-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 0;
    position: relative;
    z-index: 10;
    height: 0;
    top: 4px;
    margin-bottom: 4px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.swap-controls + .swap-box {
    margin-top: 8px;
}

.swap-footer {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: 8px;
    border: none;
    position: relative;
    opacity: 0;
    animation: buttonReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.send-card, .receive-card, .history-card {
    background: rgba(22, 22, 24, 1);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    animation: fadeSlideIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#historyTab {
    margin-top: 40px;
    margin-bottom: 80px;
}

#historyTab .history-card {
    margin-bottom: 40px;
    max-width: 100%;
}

.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.coin-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.coin-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 140px;
}

.coin-logo-select {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: absolute;
    left: 12px;
    pointer-events: none;
    z-index: 1;
    object-fit: cover;
    display: none;
    background: rgba(255, 255, 255, 0.1);
}

.coin-select {
    background: rgba(28, 28, 30, 1);
    border: none;
    color: white;
    padding: 16px 14px 16px 52px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    min-width: 140px;
    width: 100%;
    transition: all 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.coin-select:hover {
    background: rgba(36, 36, 38, 1);
}

/* Custom Select Dropdown */
.custom-select-wrapper {
    position: relative;
    min-width: 140px;
    flex: 0 0 auto;
}

.custom-select-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: white;
    padding: 10px 30px 10px 14px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.3px;
    position: relative;
}

/* Outlined style for coin selector in outlined box */
.swap-box.outlined .custom-select-trigger {
    background: rgba(255, 255, 255, 0.04);
    border: none;
}

.custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4.5px solid rgba(255, 255, 255, 0.25);
    transition: border-top-color 0.2s ease;
}

.custom-select-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
}

.custom-select-logo {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(1);
    visibility: visible;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.custom-select-logo[src]:not([src=""]) {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Smooth swap animation for logos */
.custom-select-logo.swapping {
    animation: logoSwapPulse 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes logoSwapPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.85) rotate(10deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Pink select token state */
.custom-select-trigger.select-token {
    background: rgba(236, 72, 153, 0.85);
    border-color: rgba(236, 72, 153, 0.5);
}

.custom-select-trigger.select-token:hover {
    background: rgba(236, 72, 153, 0.95);
    border-color: rgba(236, 72, 153, 0.6);
}

.custom-select-trigger.select-token::after {
    border-top-color: white;
}

/* Hide network badge and logo when in pink "Select token" state */
.custom-select-trigger.select-token .coin-network-badge,
.custom-select-trigger.select-token .custom-select-logo {
    display: none !important;
}

.custom-select-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-select-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.2px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.custom-select-price {
    display: none;
}

/* Dropdown backdrop overlay */
.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.dropdown-backdrop.active {
    display: block;
    animation: backdropIn 0.25s ease forwards;
}

.dropdown-backdrop.closing {
    animation: backdropOut 0.2s ease forwards;
}

@keyframes backdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes backdropOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.custom-select-dropdown {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 460px;
    background: rgba(26, 26, 29, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    max-height: 620px;
    overflow: hidden;
    z-index: 99999 !important;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Always-open coin list in swap tab */
.custom-select-dropdown.always-open.dw-hidden {
    display: none !important;
}

.custom-select-dropdown.always-open {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    display: flex !important;
    flex-direction: column;
    z-index: 2 !important;
    opacity: 1 !important;
    animation: none !important;
    box-shadow: none;
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Token list inside always-open - scrollable so deposit/withdraw panel stays visible */
.custom-select-dropdown.always-open .dropdown-tokens-list {
    max-height: 280px;
    min-height: auto;
    overflow-y: auto;
    contain: layout style;
}

/* Deposit/Withdraw tab bar */
.dw-tabs {
    display: flex;
    gap: 0;
    padding: 14px 20px 0;
    flex-shrink: 0;
}

.dw-tab {
    flex: 1;
    padding: 8px 0 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.dw-tab.active {
    color: #fff;
    border-bottom-color: #ec4899;
}

.dw-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.6);
}

.dw-tab-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.dw-tab-speed {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}

.dw-tab-speed.fast {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.dw-tab-speed.slow {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.dw-tab.active .dw-tab-speed.fast {
    background: rgba(34, 197, 94, 0.15);
}

.dw-tab.active .dw-tab-speed.slow {
    background: rgba(245, 158, 11, 0.15);
}

/* Withdraw panel */
.withdraw-panel {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 16px 16px 14px;
    flex-shrink: 0;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.withdraw-panel.active {
    display: flex;
}

/* PayPal panel */
.paypal-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 20px 20px 16px;
    flex-shrink: 0;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.paypal-panel.active {
    display: flex;
}

.paypal-panel * {
    box-sizing: border-box;
}

.paypal-panel.processing {
    opacity: 0.6;
    pointer-events: none;
}

/* Balance row */
.paypal-balance-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.paypal-balance-row img {
    border-radius: 50%;
    flex-shrink: 0;
}

.paypal-balance-info {
    flex: 1;
    min-width: 0;
}

.paypal-balance-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 2px;
}

.paypal-balance-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

/* Section label */
.paypal-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 2px;
}

/* Amount input */
.paypal-amount-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.paypal-currency-sign {
    position: absolute;
    left: 18px;
    font-size: 28px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
}

.paypal-amount-input-wrap:focus-within .paypal-currency-sign {
    color: rgba(255, 255, 255, 0.5);
}

.paypal-amount-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 20px 18px 20px 46px;
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
    box-sizing: border-box;
}

.paypal-amount-input::-webkit-outer-spin-button,
.paypal-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.paypal-amount-input:focus {
    border-color: rgba(0, 112, 186, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 112, 186, 0.08);
}

.paypal-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

/* Presets */
.paypal-preset-btns {
    display: flex;
    gap: 6px;
}

.paypal-preset-btn {
    flex: 1;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'JetBrains Mono', monospace;
}

.paypal-preset-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.8);
}

.paypal-preset-btn.active {
    background: rgba(0, 112, 186, 0.12);
    border-color: rgba(0, 112, 186, 0.35);
    color: #5bb8f0;
}

/* Summary */
.paypal-summary {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease, margin 0.25s ease;
    margin: 0;
}

.paypal-summary.visible {
    max-height: 120px;
    opacity: 1;
    padding: 12px 16px;
}

.paypal-summary.success {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.06);
}

.paypal-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 0;
}

.paypal-summary-row.receive {
    color: rgba(255, 255, 255, 0.55);
}

.paypal-summary-row span:last-child {
    color: #fff;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.paypal-summary-row.receive span:last-child {
    color: #22c55e;
}

.paypal-summary-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}

/* PayPal checkout button */
.paypal-checkout-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    background: #0070ba;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
    position: relative;
}

.paypal-checkout-btn:hover:not(:disabled) {
    background: #005ea6;
}

.paypal-checkout-btn:active:not(:disabled) {
    transform: scale(0.985);
}

.paypal-checkout-btn:disabled {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.25);
    cursor: default;
}

/* Info note */
.paypal-info-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
    line-height: 1.4;
}

.paypal-info-note svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.paypal-info-note span {
    color: inherit;
}

.withdraw-coin-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.withdraw-coin-row img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.withdraw-coin-info {
    flex: 1;
}

.withdraw-coin-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
}

.withdraw-coin-balance {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.withdraw-coin-value {
    text-align: right;
}

.withdraw-coin-usd {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
}

.withdraw-coin-amount {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.withdraw-amount-display {
    text-align: center;
    padding: 4px 0;
}

.withdraw-amount-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.withdraw-amount-usd {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 4px;
}

.withdraw-slider-container {
    padding: 2px 4px;
}

.withdraw-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    cursor: pointer;
    transition: background 0.1s ease;
}

.withdraw-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ec4899;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.15);
    transition: transform 0.15s ease;
}

.withdraw-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.withdraw-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.withdraw-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ec4899;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.15);
}

.withdraw-percent-btns {
    display: none;
    gap: 8px;
}

.withdraw-percent-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.withdraw-percent-btn:hover,
.withdraw-percent-btn.active {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
    color: #fff;
}

.withdraw-receive-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.withdraw-receive-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.withdraw-receive-amount {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.withdraw-receive-amount img {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

/* Selected coin highlight in always-open list */
.custom-select-dropdown.always-open .custom-select-option.selected-coin {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Deposit panel inside coin list */
.deposit-panel {
    width: 100%;
    padding: 20px 20px 18px;
    display: none;
    flex-direction: column;
    gap: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.deposit-panel.active {
    display: flex;
}

.deposit-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.deposit-panel-header img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.deposit-panel-coin-info {
    flex: 1;
}

.deposit-panel-coin-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
}

.deposit-panel-coin-balance {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.deposit-amount-display {
    text-align: center;
    padding: 4px 0;
}

.deposit-amount-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.deposit-amount-usd {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 4px;
}

.deposit-slider-container {
    padding: 2px 4px;
}

.deposit-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    cursor: pointer;
    transition: background 0.1s ease;
}

.deposit-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ec4899;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.15);
    transition: transform 0.15s ease;
}

.deposit-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.deposit-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.deposit-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ec4899;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.15);
}

.deposit-percent-btns {
    display: none;
    gap: 8px;
    justify-content: center;
}

.deposit-percent-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.deposit-percent-btn:hover,
.deposit-percent-btn.active {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
    color: #fff;
}

.deposit-receive-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.deposit-receive-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.deposit-receive-amount {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.deposit-receive-amount img {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.deposit-btn, .withdraw-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: #ec4899;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    overflow: hidden;
}

.deposit-btn:hover, .withdraw-btn:hover {
    background: #f472b6;
}

.deposit-btn:active, .withdraw-btn:active {
    background: #db2777;
}

.deposit-btn:disabled, .withdraw-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


.withdraw-info-note {
    text-align: center;
    margin-top: -4px;
}

.withdraw-info-note span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.22);
    letter-spacing: 0.01em;
    line-height: 1.4;
}

/* Loading state */
.deposit-btn.loading, .withdraw-btn.loading {
    opacity: 0.85;
    pointer-events: none;
    background: linear-gradient(90deg, #ec4899, #a855f7, #ec4899);
    background-size: 200% 100%;
    animation: btnShimmer 1.5s ease infinite;
}

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

/* Success state */
.deposit-btn.success, .withdraw-btn.success {
    background: #10b981;
    opacity: 1;
    animation: btnPulseSuccess 0.5s ease;
}

@keyframes btnPulseSuccess {
    0% { transform: scale(1); }
    30% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Error state */
.deposit-btn.error, .withdraw-btn.error {
    background: #ef4444;
    opacity: 1;
    animation: btnShake 0.4s ease;
}

@keyframes btnShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Deposit panel smooth transitions */
.deposit-amount-value, .withdraw-amount-value {
    transition: all 0.15s ease;
}

.deposit-amount-usd, .withdraw-amount-usd {
    transition: all 0.15s ease;
}

/* Smooth slider track fill */
.deposit-slider, .withdraw-slider {
    transition: background 0.1s ease;
}

/* Receive row highlight on change */
.deposit-receive-row, .withdraw-receive-row {
    transition: border-color 0.3s ease, background 0.3s ease;
}

.deposit-receive-row.highlight, .withdraw-receive-row.highlight {
    border-color: rgba(236, 72, 153, 0.3);
    background: rgba(236, 72, 153, 0.06);
}

.custom-select-dropdown.active {
    display: flex;
    flex-direction: column;
    animation: popupFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.custom-select-dropdown.closing {
    display: flex;
    flex-direction: column;
    animation: popupFadeOut 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
    pointer-events: none;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes popupFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
}

/* Dropdown Header with Search */
.dropdown-header {
    padding: 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dropdown-header-title {
    display: none;
}

.dropdown-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.dropdown-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 1;
}

.dropdown-search-input {
    width: 100%;
    height: 48px;
    padding: 0 70px 0 46px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 400;
    outline: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.dropdown-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.dropdown-search-input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(236, 72, 153, 0.45);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.08);
}

/* Network Selector Button */
.network-selector-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-sizing: border-box;
    z-index: 2;
}

.network-logo-box {
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-search-wrapper .network-selector-btn {
    padding: 4px 6px;
    border-radius: 10px;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.dropdown-search-wrapper .network-logo-box {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
}

.all-networks-grid {
    box-sizing: border-box;
    overflow: visible;
}

.network-selector-btn:hover .network-logo-box {
    transform: scale(1.05);
}

.network-selector-arrow {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 10px;
    transition: transform 0.15s ease;
}

.network-selector-btn.open .network-selector-arrow {
    transform: rotate(180deg);
}

.network-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Larger white box for dropdown options */
.network-option .network-logo-box {
    width: 38px;
    height: 38px;
    background: white;
    border: none;
    padding: 2px;
    border-radius: 9px;
}

/* Network Dropdown */
.network-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(26, 26, 29, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 6px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    pointer-events: none;
}

#poolTab .network-dropdown,
#transactionsTab .network-dropdown {
    top: calc(100% + 26px);
}

.network-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.network-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin: 2px 0;
}

.network-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.network-option.selected {
    background: rgba(255, 255, 255, 0.05);
}

.network-option .network-logo-box {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    transition: transform 0.15s ease;
}

.network-option:hover .network-logo-box {
    transform: scale(1.03);
}

.network-option-name {
    font-size: 14px;
    font-weight: 500;
    color: white;
    flex: 1;
}

.network-option-badge {
    font-size: 11px;
    color: rgba(120, 220, 120, 0.95);
    background: rgba(120, 220, 120, 0.12);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.network-dropdown .network-option {
    padding: 10px 12px;
    margin: 2px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.network-dropdown .network-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.network-dropdown .network-option.selected {
    background: rgba(236, 72, 153, 0.14);
    border-color: rgba(236, 72, 153, 0.35);
}

.network-dropdown .network-option[data-network="all"] {
    border-color: transparent;
}

.network-dropdown .network-option[data-network="all"].selected {
    border-color: transparent;
}

.network-dropdown .network-option[data-network="all"] .network-logo-box {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 8px;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.network-dropdown .network-option[data-network="all"] .all-networks-grid {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px;
}

.network-dropdown .network-logo-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px;
}

.network-dropdown .network-option-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.network-dropdown .network-option-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(120, 220, 120, 0.25);
}

/* Token List Container */
.dropdown-tokens-list {
    flex: 1;
    min-height: 400px;
    max-height: 400px;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 8px 8px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    -webkit-overflow-scrolling: touch;
    contain: strict;
}

.dropdown-tokens-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-tokens-list::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* No Results Message */
.dropdown-no-results {
    padding: 48px 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
}

/* Staggered fade-in animation for coins */
@keyframes coinFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-option {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    contain: layout style;
    opacity: 0;
    transform: translateY(6px);
    animation: optionSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    will-change: transform, opacity;
}

/* Staggered animation delays for smooth cascade effect */
.custom-select-option:nth-child(1) { animation-delay: 0ms; }
.custom-select-option:nth-child(2) { animation-delay: 20ms; }
.custom-select-option:nth-child(3) { animation-delay: 40ms; }
.custom-select-option:nth-child(4) { animation-delay: 60ms; }
.custom-select-option:nth-child(5) { animation-delay: 80ms; }
.custom-select-option:nth-child(6) { animation-delay: 100ms; }
.custom-select-option:nth-child(7) { animation-delay: 120ms; }
.custom-select-option:nth-child(8) { animation-delay: 140ms; }
.custom-select-option:nth-child(n+9) { animation-delay: 150ms; }

@keyframes optionSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(0) scale(1.01);
}

.custom-select-option:active {
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(0) scale(0.99);
    transition-duration: 0.05s;
}

.custom-select-option.selected {
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.08);
}

.custom-select-option.hidden {
    display: none;
}

.custom-select-option img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    flex-shrink: 0;
    border: none;
    outline: none;
    transition: opacity 0.2s ease;
}

.custom-select-option img[src]:not([src=""]) {
    background: transparent;
    animation: none;
}

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

.custom-select-option-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}

.custom-select-option-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.custom-select-option-symbol {
    font-size: 14px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.2px;
}

.custom-select-option-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-option-price {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    text-align: right;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.custom-select-option-value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.custom-select-option-balance {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

/* Balance loading spinner */
.bal-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: balSpin 0.6s linear infinite;
    vertical-align: middle;
}
@keyframes balSpin {
    to { transform: rotate(360deg); }
}
html[data-theme="light"] .bal-loading::after {
    border-color: rgba(0,0,0,0.08);
    border-top-color: rgba(0,0,0,0.4);
}

.amount-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: white;
    padding: 16px 8px 16px 0;
    border-radius: 12px;
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 400;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    letter-spacing: -0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

/* Remove number input spinners */
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.amount-input[type=number] {
    -moz-appearance: textfield;
}

.amount-input:hover {
    background: transparent;
}

.amount-input:focus {
    outline: none;
    background: transparent;
}

.coin-select:focus, .text-input:focus, .import-input:focus {
    outline: none;
    border-color: rgba(46, 94, 170, 0.6);
}

.swap-box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 2px;
}

.balance-display {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    letter-spacing: 0.15px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease, transform 0.2s ease;
}

.balance-display span {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.balance-display.updating {
    color: rgba(236, 72, 153, 0.8);
}

@keyframes balanceFlash {
    0% {
        color: rgba(236, 72, 153, 1);
        transform: scale(1.05);
    }
    50% {
        color: rgba(236, 72, 153, 0.9);
        transform: scale(1.02);
    }
    100% {
        color: rgba(255, 255, 255, 0.4);
        transform: scale(1);
    }
}

.balance-display.flash {
    animation: balanceFlash 0.6s ease-out;
}

.price-display {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    letter-spacing: 0.15px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

.swap-direction-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 4px rgba(14, 14, 16, 0.95),
        0 0 0 5px rgba(255, 255, 255, 0.04);
}

.swap-direction-btn svg {
    display: block;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.swap-direction-btn svg path {
    stroke-width: 2;
}

.swap-direction-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.swap-direction-btn:hover svg {
    opacity: 1;
}

.swap-direction-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.06);
}

.swap-info {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 16px;
    margin-top: 0;
    transform: translateY(-4px);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease-out,
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.swap-info.visible {
    max-height: 160px;
    opacity: 1;
    padding: 14px 16px;
    margin-top: 10px;
    transform: translateY(0);
}

.calculating {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    height: 16px;
}

.calc-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 16px;
}

.calc-dots .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(236, 72, 153, 1);
    animation: dotPulse 1.2s linear infinite;
}

.calc-dots .dot:nth-child(1) { animation-delay: 0s; }
.calc-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.calc-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 20%, 100% { opacity: 0.2; }
    40%, 60% { opacity: 1; }
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span:first-child {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    font-size: 12.5px;
    letter-spacing: 0.2px;
}

.info-row span:last-child {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    letter-spacing: 0.2px;
    font-variant-numeric: tabular-nums;
}

.swap-btn {
    width: 100%;
    background: rgba(236, 72, 153, 0.08);
    color: rgba(236, 72, 153, 0.5);
    border: 1px solid rgba(236, 72, 153, 0.12);
    padding: 0 16px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif;
    letter-spacing: 0.3px;
    cursor: not-allowed;
    box-shadow: none;
    min-height: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    transform: none;
}

.swap-btn:hover:not(.active) {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.16);
    cursor: not-allowed;
    transform: none;
}

.swap-btn:active {
    transform: none;
    box-shadow: none;
}

.swap-btn.active {
    background: rgba(236, 72, 153, 0.85);
    color: #ffffff;
    cursor: pointer;
    border-color: rgba(236, 72, 153, 0.5);
    transform: none;
}

.swap-btn.active:hover {
    background: rgba(219, 39, 119, 0.9);
    transform: none;
}

.swap-btn.active:active {
    background: rgba(236, 72, 153, 0.75);
    color: #ffffff;
    transform: scale(0.98);
}

.swap-btn.calculating {
    background: rgba(236, 72, 153, 0.85);
    color: #ffffff;
    cursor: wait;
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    transform: none;
}

.swap-btn.swapping {
    background: rgba(236, 72, 153, 0.85);
    color: #ffffff;
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: none;
    transform: none;
}

.swap-btn-calc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    line-height: 1;
    animation: fadeInCalc 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.calc-spinner {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    border-right-color: rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    animation: calcSpin 0.7s linear infinite;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.4));
    will-change: transform;
}

@keyframes calcSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInCalc {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.swap-btn.success {
    background: rgba(34, 197, 94, 0.85);
    animation: none;
    border-color: rgba(34, 197, 94, 0.5);
}

@keyframes successGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }
    30% {
        box-shadow: 0 0 25px 4px rgba(236, 72, 153, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }
}

.swap-btn.resetting {
    opacity: 0 !important;
    transform: scale(0.96) !important;
}

.swap-btn-nogas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
}

.swap-btn-nogas .nogas-icons {
    position: relative;
    display: flex;
    align-items: center;
    width: 28px;
    height: 22px;
    flex-shrink: 0;
}

.swap-btn-nogas .nogas-eth {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(236, 72, 153, 0.3);
}

.swap-btn-nogas .nogas-chain {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    position: absolute;
    right: 0;
    bottom: 0;
    border: 1.5px solid rgba(236, 72, 153, 0.2);
    background: rgba(20, 20, 30, 0.6);
}

.swap-btn-text {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.swap-btn-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.toggle-mode-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    background: rgba(255, 255, 255, 0.04);
}

.toggle-mode-btn svg {
    display: block;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.toggle-mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.toggle-mode-btn:hover svg {
    opacity: 0.8;
}

.toggle-mode-btn:active {
    transform: scale(0.96);
}

/* Send Tab */
.text-input {
    width: 100%;
    background: var(--dark-background);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
}

.usd-value {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

/* Receive Tab */
.receive-card h3 {
    margin-bottom: 10px;
}

.receive-card p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.receive-address {
    background: var(--dark-background);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: white;
    margin: 20px auto;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--dark-background);
}

/* History Tab */
.transaction-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-transactions {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 40px;
}

/* Old transaction styles removed - using new styles below */

.transaction-icon {
    font-size: 24px;
    margin-right: 12px;
}

.transaction-details {
    flex: 1;
}

.transaction-type {
    font-weight: 500;
    margin-bottom: 4px;
}

.transaction-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.transaction-amount {
    text-align: right;
    font-weight: 500;
}

.transaction-usd {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* Coin List */
.coin-list {
    display: none;
}

.coin-list h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.coin-balances {
    display: grid;
    gap: 12px;
}

.coin-item {
    background: var(--matte-black);
    padding: 16px 20px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    opacity: 0;
    animation: fadeSlideIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.coin-item:nth-child(1) { animation-delay: 0.14s; }
.coin-item:nth-child(2) { animation-delay: 0.16s; }
.coin-item:nth-child(3) { animation-delay: 0.18s; }
.coin-item:nth-child(4) { animation-delay: 0.2s; }
.coin-item:nth-child(5) { animation-delay: 0.22s; }
.coin-item:nth-child(6) { animation-delay: 0.24s; }
.coin-item:nth-child(7) { animation-delay: 0.26s; }
.coin-item:nth-child(8) { animation-delay: 0.28s; }

.coin-item:hover {
    background: var(--app-dark-gray);
    transform: translateX(4px);
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.coin-name {
    font-weight: 500;
}

.coin-symbol {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.coin-balance-info {
    text-align: right;
}

.coin-amount {
    font-weight: 500;
}

.coin-usd {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: linear-gradient(135deg, rgba(22, 22, 26, 0.94) 0%, rgba(28, 28, 34, 0.94) 100%);
    color: #e4e4e7;
    padding: 0;
    border-radius: 16px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: none;
    max-width: 380px;
    min-width: 280px;
    font-size: 13.5px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.07);
    letter-spacing: -0.2px;
    overflow: hidden;
    transform-origin: bottom right;
}

.toast-body {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 16px 14px 16px;
}

.toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    background: rgba(236, 72, 153, 0.12);
    position: relative;
}
.toast-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
    fill: none;
    stroke: currentColor;
}

.toast-text {
    flex: 1;
    line-height: 1.45;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.92);
}

.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.25);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s ease;
    margin-left: 2px;
}
.toast-close:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    transform: scale(1.1);
}

.toast-progress {
    height: 2.5px;
    background: rgba(255,255,255,0.04);
    width: 100%;
}
.toast-progress-bar {
    height: 100%;
    border-radius: 0 0 0 2px;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.7), rgba(236, 72, 153, 0.3));
    animation: toastProgress 3s linear forwards;
}

.toast.show {
    display: block;
    animation: toastSlideIn 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.toast.hiding {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Type-specific colors */
.toast.info .toast-icon { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; }
.toast.info .toast-progress-bar { background: linear-gradient(90deg, rgba(99, 102, 241, 0.5), rgba(99, 102, 241, 0.1)); }
.toast.info { border-color: rgba(99, 102, 241, 0.1); }

.toast.success .toast-icon { background: rgba(34, 197, 94, 0.12); color: #86efac; }
.toast.success .toast-progress-bar { background: linear-gradient(90deg, rgba(34, 197, 94, 0.5), rgba(34, 197, 94, 0.1)); }
.toast.success { border-color: rgba(34, 197, 94, 0.1); }

.toast.error .toast-icon { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.toast.error .toast-progress-bar { background: linear-gradient(90deg, rgba(239, 68, 68, 0.5), rgba(239, 68, 68, 0.1)); }
.toast.error { border-color: rgba(239, 68, 68, 0.1); }

.toast.warning .toast-icon { background: rgba(251, 191, 36, 0.12); color: #fde68a; }
.toast.warning .toast-progress-bar { background: linear-gradient(90deg, rgba(251, 191, 36, 0.5), rgba(251, 191, 36, 0.1)); }
.toast.warning { border-color: rgba(251, 191, 36, 0.1); }

@keyframes toastSlideIn {
    0% {
        transform: translateY(16px) scale(0.97);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(12px) scale(0.97);
        opacity: 0;
    }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.deposit-notify {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(24, 24, 28, 0.96);
    color: rgba(255, 255, 255, 0.85);
    padding: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
    z-index: 10002;
    width: 300px;
    font-size: 13px;
    line-height: 1.45;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
    overflow: hidden;
}
.deposit-notify.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.deposit-notify-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
}
.deposit-notify-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    margin-top: 1px;
}
.deposit-notify-icon.pending {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}
.deposit-notify-icon.confirmed {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.deposit-notify-text {
    flex: 1;
    min-width: 0;
}
.deposit-notify-title {
    font-weight: 600;
    font-size: 13.5px;
    color: #fff;
    margin-bottom: 2px;
    letter-spacing: -0.1px;
}
.deposit-notify-sub {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
}
.deposit-notify-amount {
    font-weight: 600;
    font-size: 15px;
    color: #4ade80;
    letter-spacing: -0.2px;
}
.deposit-notify-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
}
.deposit-notify-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
    animation: depositBarSlide 1.8s ease-in-out infinite;
}
.deposit-notify.confirmed .deposit-notify-bar {
    display: none;
}
@keyframes depositBarSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(430%); }
}

/* Responsive */
@media (max-width: 640px) {
    html, body {
        overflow-x: hidden;
        overflow-y: auto;
        height: auto;
        overscroll-behavior: none;
    }

    body {
        position: relative;
        width: 100%;
        top: auto;
        left: auto;
        touch-action: pan-y;
        padding-bottom: 64px; /* space for mobile nav bar */
    }

    .app-header {
        background: #1a1a1d !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .pred-page {
        padding-top: 60px;
    }

    html {
        padding-top: 0;
    }

    .floating-coins {
        top: calc(-1 * env(safe-area-inset-top, 0px));
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh + env(safe-area-inset-top, 0px));
        height: calc(100dvh + env(safe-area-inset-top, 0px));
    }

    /* Hide info section on mobile */
    .info-section {
        display: none;
    }

    #exchangeView {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        touch-action: none;
        overscroll-behavior: none;
    }

    #exchangeView:has(#crashTab.active) {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        background: #1a1a1d;
    }

    #exchangeView:has(#towerTab.active) {
        overflow: hidden;
        background: #1a1a1d;
    }

    #swapTab {
        height: 100%;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        position: relative !important;
        padding-top: 0px !important;
        padding-bottom: env(safe-area-inset-bottom);
        touch-action: pan-y;
        min-height: auto !important;
    }

    /* Allow scrolling on explore tab */
    #exploreTab {
        overflow-y: auto;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        background: transparent;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        padding-top: calc(80px + env(safe-area-inset-top));
    }

    /* Pool tab keeps controls fixed; list scrolls */
    #poolTab {
        overflow-y: auto;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        background: transparent;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        padding-top: calc(48px + env(safe-area-inset-top));
    }

    #transactionsTab {
        padding-top: calc(48px + env(safe-area-inset-top)) !important;
    }



    /* Hide swap content when swap tab is not active */
    #swapTab:not(.active) .swap-slogan,
    #swapTab:not(.active) .swap-container-wrapper {
        display: none !important;
    }

    /* Pool stats row full width on mobile */
    .pool-stats-row {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
        width: 100%;
    }

    .pool-stat-box {
        border-radius: 0;
        border-left: none;
        border-right: none;
        width: 100%;
    }

    .pool-rewards-box {
        width: 100% !important;
    }

    .app-title {
        font-size: 32px;
    }

    .total-balance {
        font-size: 36px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .app-header {
        padding: 16px 16px 10px 16px;
        padding-top: calc(16px + env(safe-area-inset-top));
        flex-wrap: nowrap;
        gap: 10px;
    }

    .header-left {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .header-brand {
        display: none;
    }

    .header-tabs {
        display: none;
    }

    .mobile-menu-wrapper {
        display: block;
        margin-top: -10px;
        margin-left: 2px;
    }

    .swap-container-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-top: -10px;
    }

    .swap-slogan {
        font-size: 28px;
        margin: -30px 0 8px 0;
    }
    /* Hide slogan for Google users on mobile — they see QR deposit */
    .swap-slogan:only-child,
    body:has(.google-deposit-qr) .swap-slogan {
        display: none;
    }

    .google-deposit-qr {
        margin-top: 20px;
    }

    .custom-select-dropdown.always-open {
        margin-top: 0 !important;
    }

    .custom-select-dropdown.always-open .dropdown-tokens-list {
        max-height: 220px;
    }

    .custom-select-dropdown.always-open .custom-select-option {
        margin: 4px 0;
    }

    .withdraw-panel.active {
        min-height: auto;
    }

    /* Coin selector popup - mobile sizing */
    .custom-select-dropdown {
        width: calc(100vw - 32px) !important;
        max-width: 360px !important;
        max-height: 65vh !important;
        top: 45% !important;
    }

    .dropdown-header {
        padding: 14px 14px 10px;
    }

    .dropdown-header-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .dropdown-search-input {
        padding: 10px 12px 10px 36px;
        font-size: 14px;
        border-radius: 10px;
    }

    .dropdown-search-icon {
        left: 11px;
        width: 15px;
        height: 15px;
    }

    .custom-select-option {
        padding: 9px 12px;
        gap: 10px;
        margin: 2px 5px;
        border-radius: 8px;
    }

    .custom-select-option img {
        width: 32px;
        height: 32px;
    }

    .custom-select-option-symbol {
        font-size: 14px;
    }

    .custom-select-option-name {
        font-size: 11px;
    }

    .custom-select-option-price {
        font-size: 13px;
    }

    .header-buttons {
        gap: 4px;
        flex-shrink: 0;
        margin-top: -14px;
        margin-right: -2px;
    }

    .header-dw-btn.tab-btn,
    .header-music-btn.tab-btn,
    .header-crash-btn.tab-btn,
    .header-pred-btn.tab-btn,
    .header-tower-btn.tab-btn,
    .header-flip-btn.tab-btn {
        display: none;
    }
    .header-paypal-btn {
        display: none;
        padding: 6px 12px;
        background: rgba(0, 112, 186, 0.15);
        border: 1px solid rgba(0, 112, 186, 0.3);
        border-radius: 8px;
        color: #5bb8f0;
        font-size: 11px;
        font-weight: 700;
        font-family: 'Inter', -apple-system, sans-serif;
        cursor: pointer;
        transition: all 0.15s ease;
        letter-spacing: 0.02em;
        flex-shrink: 0;
    }
    .header-paypal-btn.visible { display: block; }
    .header-paypal-btn:active { transform: scale(0.95); }
    .header-usdc-chip { margin-right: 4px !important; }
    .header-usdc-icon { width: 13px; height: 13px; }

    /* Withdraw panel mobile fixes */
    .withdraw-panel { padding: 14px 14px 12px !important; gap: 12px !important; }
    .withdraw-coin-row { padding: 10px 12px; gap: 10px; }
    .withdraw-coin-row img { width: 28px; height: 28px; }
    .withdraw-coin-name { font-size: 12px; }
    .withdraw-coin-balance { font-size: 10px; }
    .withdraw-coin-usd { font-size: 12px; }
    .withdraw-coin-amount { font-size: 10px; }
    .withdraw-amount-value { font-size: 18px !important; }
    .withdraw-amount-usd { font-size: 12px; }
    .withdraw-percent-btns { gap: 6px; }
    .withdraw-percent-btn { padding: 7px 0; font-size: 11px; }
    .withdraw-btn { padding: 12px; font-size: 13px; }
    .withdraw-info-note span { font-size: 9px; }
    .withdraw-addr-row { margin-bottom: 8px !important; }
    .withdraw-addr-row input { font-size: 11px !important; padding: 9px 10px !important; }
    .withdraw-addr-row label { font-size: 8px !important; }
    .withdraw-slider-container { margin: 0 !important; }
    .withdraw-addr-row { overflow: hidden; }
    .withdraw-addr-row input { max-width: 100% !important; overflow: hidden; text-overflow: ellipsis; }

    /* PayPal panel mobile fixes */
    .paypal-panel { padding: 14px 14px 12px !important; gap: 12px !important; }
    .paypal-balance-row { padding: 10px 12px; gap: 10px; }
    .paypal-balance-row img { width: 24px !important; height: 24px !important; }
    .paypal-balance-label { font-size: 9px; }
    .paypal-balance-value { font-size: 13px; }
    .paypal-section-label { font-size: 9px; }
    .paypal-currency-sign { font-size: 22px; left: 14px; }
    .paypal-amount-input { font-size: 22px !important; padding: 16px 14px 16px 38px !important; border-radius: 12px; }
    .paypal-preset-btns { gap: 5px; }
    .paypal-preset-btn { padding: 8px 0; font-size: 11px; border-radius: 8px; }
    .paypal-summary { border-radius: 10px; }
    .paypal-summary.visible { padding: 10px 12px; }
    .paypal-summary-row { font-size: 12px; }
    .paypal-summary-row span:last-child { font-size: 12px; }
    .paypal-checkout-btn { padding: 12px 16px; font-size: 13px; border-radius: 20px; }
    .paypal-info-note { font-size: 9px; }
    .paypal-info-note svg { width: 10px; height: 10px; }

    .wallet-network-btn {
        padding: 0;
        gap: 0;
    }

    .wallet-network-label {
        display: none;
    }

    .profile-menu {
        width: calc(100vw - 16px);
        max-width: 400px;
        right: 8px;
        top: calc(12px + env(safe-area-inset-top));
        height: calc(100vh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 80px);
        border-radius: 20px;
        overflow: hidden;
    }

    /* Make send page scrollable on mobile */
    .send-container {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px;
    }

    .send-bottom-section {
        flex-shrink: 0;
        padding: 10px;
        border-radius: 12px;
    }

    .send-top-section {
        padding: 18px 14px;
        border-radius: 12px;
    }

    .send-keypad {
        padding: 4px;
        gap: 5px;
    }

    .send-key {
        padding: 10px;
    }

    .profile-avatar {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .profile-avatar svg {
        width: 22px;
        height: 22px;
    }

    .profile-address {
        font-size: 13px;
    }

    .profile-balance {
        font-size: 22px;
        margin-top: 4px;
        margin-bottom: 8px;
    }

    .profile-tabs {
        gap: 2px;
        padding: 3px;
        margin-bottom: 12px;
    }

    .profile-tab {
        padding: 8px 10px;
        font-size: 11px;
    }

    .profile-pool-actions {
        flex-direction: column;
        gap: 6px;
    }

    .profile-pool-btn,
    .profile-pool-btn.pool-btn,
    .profile-pool-btn.unpool-btn,
    .profile-pool-actions .pool-btn,
    .profile-pool-actions .unpool-btn {
        padding: 5px 12px !important;
        font-size: 11px !important;
        width: 100%;
        text-align: center;
        line-height: 1.2;
        height: auto;
    }

    .profile-coin-name {
        font-size: 12.5px;
    }

    .profile-coin-amount {
        font-size: 10.5px;
    }

    .profile-coin-value {
        font-size: 12.5px;
    }

    .profile-tx-title {
        font-size: 12.5px;
    }

    .profile-tx-subtitle {
        font-size: 10.5px;
    }

    .profile-tx-amount {
        font-size: 12.5px;
    }

    .profile-pool-name {
        font-size: 13px;
    }

    .profile-pool-amounts {
        font-size: 10px;
    }

    .profile-coin-item {
        padding: 12px 14px;
        gap: 12px;
        border-radius: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .profile-coin-logo {
        width: 34px;
        height: 34px;
    }

    .profile-coin-list {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }


    .profile-pool-list {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .profile-pool-item {
        padding: 10px 12px;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .profile-pool-logo {
        width: 28px;
        height: 28px;
    }

    .wallet-btn {
        padding: 6px 14px;
        font-size: 13px;
        border-radius: 12px;
    }

    .logout-btn {
        width: 32px;
        height: 32px;
        background: none;
    }

    .exchange-container {
        padding: 72px 16px 30px 16px;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .info-section {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }

    /* Pool/Unpool Modal Mobile Styles */
    .pool-liquidity-modal {
        width: 95%;
        max-width: none;
        padding: 20px 16px;
        margin: 10px;
    }

    .pool-inputs-row {
        flex-direction: column;
        gap: 12px;
    }

    .pool-input-section {
        padding: 12px;
    }

    .pool-amount-input {
        font-size: 22px;
    }

    .pool-input-token {
        font-size: 14px;
    }

    .pool-input-logo {
        width: 28px;
        height: 28px;
    }

    .pool-percent-buttons-centered {
        gap: 8px;
    }

    .pool-percent-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .pool-modal-submit {
        padding: 12px;
        font-size: 14px;
    }

    .pool-step {
        padding: 10px 12px;
    }

    .pool-step-title {
        font-size: 13px;
    }

    .pool-step-status {
        font-size: 11px;
    }

    .pool-steps-footnote {
        font-size: 11px;
    }

    /* Unpool Modal Mobile */
    .unpool-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }

    .unpool-title {
        font-size: 14px;
    }

    .unpool-pool-name {
        font-size: 14px;
    }

    .unpool-position-info {
        padding: 12px;
        margin-bottom: 12px;
    }

    .unpool-position-label {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .unpool-position-row {
        flex-direction: column !important;
        gap: 8px;
        align-items: stretch;
    }

    .unpool-token-info {
        padding: 0;
        background: none;
        border-radius: 0;
    }

    .unpool-token-logo {
        width: 24px;
        height: 24px;
    }

    .unpool-amount-section {
        margin-bottom: 12px;
    }

    .unpool-amount-label {
        font-size: 11px;
    }

    .unpool-percent-buttons {
        gap: 6px;
        justify-content: center;
    }

    .unpool-percent-btn {
        padding: 6px 12px;
        font-size: 11px;
        flex: 1;
    }

    .unpool-receive-section {
        padding: 12px;
    }

    .unpool-receive-label {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .unpool-receive-row {
        flex-direction: column !important;
        gap: 8px;
        align-items: stretch;
    }

    .unpool-receive-item {
        padding: 0;
        background: none;
        border-radius: 0;
    }

    .unpool-receive-logo {
        width: 20px;
        height: 20px;
    }

    .unpool-receive-amount {
        font-size: 14px;
    }

    .unpool-receive-symbol {
        font-size: 11px;
    }

    .swap-controls {
        gap: 12px;
        margin: 0;
    }

    .swap-direction-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .toggle-mode-btn {
        width: 36px;
        height: 36px;
    }

    .swap-box {
        padding: 8px 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    .swap-footer {
        padding: 0;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    #transactionsTab {
        padding-top: calc(54px + env(safe-area-inset-top)) !important;
    }

    #poolTab {
        padding-top: calc(54px + env(safe-area-inset-top));
    }

}

/* Info Section Responsive - Stack layout on smaller screens */
@media (max-width: 1100px) {
    .info-section {
        padding: 50px 24px 70px 24px;
    }

    .info-layout {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 28px;
    }

    .info-text {
        min-height: auto;
        height: auto;
        order: 1;
        text-align: center;
        align-items: center;
        width: 100%;
        max-width: 900px;
    }

    .info-stats {
        order: 2;
    }

    .info-text h2 {
        max-width: 100%;
    }

    .info-text .info-bio {
        margin-bottom: 24px;
        max-width: 100%;
        font-size: 22px;
    }

    .supported-tokens-box {
        width: 100%;
        max-width: 100%;
        height: 110px;
        min-height: 110px;
        max-height: 110px;
        flex: none;
    }

    .token-row img {
        width: 85px;
        height: 85px;
    }

    .info-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
        width: 100%;
        max-width: 900px;
        gap: 16px;
    }

    .info-stat-item {
        width: 100%;
        min-width: 0;
        max-width: none;
        aspect-ratio: 1 / 1;
    }

    .info-stat-label {
        font-size: 18px;
    }

    .info-stat-value {
        font-size: 32px;
    }
}

@media (max-width: 900px) {
    .header-tower-btn.tab-btn, .header-flip-btn.tab-btn { display: none !important; }
}

/* Tablet and smaller screens */
@media (max-width: 900px) {
    .info-section {
        padding: 40px 24px 60px 24px;
    }

    .info-layout {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 40px;
    }

    .info-text {
        text-align: center;
        align-items: center;
        order: 1;
    }

    .info-stats {
        order: 2;
    }

    .info-text h2 {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .info-text .info-bio {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .supported-tokens-box {
        height: 110px;
        min-height: 110px;
        max-height: 110px;
        max-width: 100%;
    }

    .token-row img {
        width: 80px;
        height: 80px;
    }

    .info-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
        max-width: 400px;
    }

    .info-stats-header {
        font-size: 18px;
        padding: 16px 20px;
    }

    .info-stat-item {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 140px;
        max-height: none;
        padding: 20px;
    }

    .info-stat-label {
        font-size: 18px;
    }

    .info-stat-value {
        font-size: 36px;
    }
}

/* Mobile screens */
@media (max-width: 640px) {
    .info-section {
        padding: 30px 10px 50px 10px;
        overflow-x: hidden;
    }

    .info-layout {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 30px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .info-text {
        text-align: center;
        align-items: center;
        order: 1;
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
    }

    .info-stats {
        order: 2;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .info-text h2 {
        font-size: 28px;
        letter-spacing: -0.8px;
        margin-bottom: 16px;
    }

    .info-text p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .info-text .info-bio {
        font-size: 20px;
        letter-spacing: -0.5px;
        margin-bottom: 24px;
        line-height: 1.5;
    }

    .supported-tokens-box {
        height: 110px;
        min-height: 110px;
        max-height: 110px;
        padding: 20px 0;
        border-radius: 0;
        width: 100vw;
        max-width: 100vw;
        margin-left: -10px;
        margin-right: -10px;
    }

    .token-row {
        gap: 12px;
    }

    .token-row img {
        width: 60px;
        height: 60px;
    }

    .info-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100vw;
        max-width: 100vw;
        margin-left: -10px;
        margin-right: -10px;
        padding: 0;
    }

    .info-stats-header {
        font-size: 15px;
        padding: 14px 16px;
        gap: 10px;
        border-radius: 0;
    }

    .info-stat-item {
        border-radius: 0;
    }

    .stats-dot {
        width: 10px;
        height: 10px;
    }

    .info-stat-item {
        width: 100%;
        min-width: auto;
        max-width: none;
        height: auto;
        min-height: 120px;
        max-height: none;
        padding: 18px;
        border-radius: 12px;
    }

    .info-stat-label {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .info-stat-value {
        font-size: 32px;
    }

    .info-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .feature-icon {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .feature-card h3 {
        font-size: 16px;
    }

    .feature-card p {
        font-size: 13px;
    }

    .info-footer {
        padding: 30px 0;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }

    /* Explore/Pool list mobile */
    .explore-container {
        padding: 0 2%;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .explore-tokens-grid {
        width: 100%;
        overflow-x: hidden;
    }

    .explore-token-header {
        display: none;
    }

    .explore-token-card {
        padding: 10px 12px;
        gap: 10px;
        min-width: unset;
        width: 100%;
    }

    .explore-token-logo {
        width: 32px;
        height: 32px;
    }

    .explore-token-info {
        grid-template-columns: 1fr auto auto;
        gap: 8px;
    }

    .explore-token-symbol {
        font-size: 13px;
    }

    .explore-token-price {
        font-size: 12px;
    }

    /* Hide header and unnecessary columns on mobile explore */
    .explore-token-stat,
    .explore-token-stat:first-of-type,
    #exploreTab .explore-token-change,
    #exploreTab .explore-token-header {
        display: none !important;
    }

    /* Explore card container on mobile */
    #exploreTab .explore-token-card {
        overflow: hidden !important;
        min-width: unset !important;
        width: 100% !important;
        padding: 10px 12px !important;
    }

    /* Explore row layout on mobile - price and chart to right */
    #exploreTab .explore-token-info {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    #exploreTab .explore-token-symbol {
        flex: 1 1 auto !important;
        min-width: 60px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    #exploreTab .explore-token-price {
        flex: 0 0 auto !important;
        text-align: right !important;
        font-size: 12px !important;
    }

    /* Chart fixed width on mobile */
    #exploreTab .explore-token-chart {
        display: flex !important;
        flex: 0 0 60px !important;
        width: 60px !important;
        justify-content: flex-end !important;
    }

    #exploreTab .sparkline-canvas {
        width: 60px !important;
        height: 24px !important;
    }

    /* Hide Your Pools box on mobile and make rewards full width */
    .pool-stat-box:not(.pool-rewards-box) {
        display: none;
    }

    .pool-stats-row {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .pool-rewards-box {
        width: 100% !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
    }














    #poolTab .explore-tokens-grid {
        border-radius: 0 !important;
        margin-top: 0 !important;
    }

    /* Pool list layout on mobile */
    #poolTab .explore-tokens-list {
        padding: 6px 2% 24px !important;
        gap: 6px !important;
    }

    #poolTab .pool-card {
        padding: 14px 16px !important;
        gap: 10px !important;
    }

    #poolTab .pool-card-meta {
        max-width: 100% !important;
    }

    #poolTab .pool-logos {
        width: 56px !important;
        height: 46px !important;
    }

    #poolTab .pool-logo-half {
        width: 36px !important;
        height: 36px !important;
    }

    #poolTab .pool-logo-half-right {
        left: 18px !important;
    }

    #poolTab .pool-network-badge {
        width: 18px !important;
        height: 18px !important;
        bottom: -3px !important;
        right: -3px !important;
    }

    #poolTab .pool-network-badge img {
        width: 11px !important;
        height: 11px !important;
    }

    #poolTab .pool-card-name {
        font-size: 15px !important;
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif !important;
        font-weight: 600 !important;
        letter-spacing: -0.01em !important;
    }

    #poolTab .pool-card-address {
        font-size: 11px !important;
        font-family: 'SF Mono', 'Menlo', 'Monaco', monospace !important;
        letter-spacing: 0.02em !important;
        color: rgba(255, 255, 255, 0.45) !important;
    }

    #poolTab .pool-card-balance {
        flex-wrap: wrap !important;
        gap: 6px 10px !important;
        padding: 0 !important;
        font-size: 12px !important;
        max-width: 100% !important;
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif !important;
        font-weight: 500 !important;
        letter-spacing: 0 !important;
    }

    #poolTab .pool-card-balance-label {
        font-size: 9px !important;
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif !important;
        font-weight: 600 !important;
        letter-spacing: 0.05em !important;
        color: rgba(255, 255, 255, 0.4) !important;
    }

    #poolTab .pool-card-balance-value {
        font-size: 13px !important;
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif !important;
        font-weight: 600 !important;
        font-variant-numeric: tabular-nums !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 160px !important;
    }

    #poolTab .pool-card-actions {
        min-width: 120px !important;
        gap: 8px !important;
        flex-direction: column !important;
        align-items: flex-end !important;
    }

    #poolTab .pool-btn {
        font-size: 11px !important;
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif !important;
        font-weight: 600 !important;
        letter-spacing: 0.01em !important;
        padding: 7px 14px !important;
        border-radius: 8px !important;
    }

    #poolTab .pool-txns-toggle {
        font-size: 11px !important;
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif !important;
        font-weight: 600 !important;
        letter-spacing: 0.01em !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
    }

    #poolTab .pool-fee-badge {
        font-size: 11px !important;
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif !important;
        font-weight: 500 !important;
        padding: 0 !important;
    }

    .pool-txn-addr {
        display: none !important;
    }

    .pool-txn-type-badge {
        display: none !important;
    }

    .pool-rewards-box {
        padding: 12px !important;
        min-height: unset !important;
        gap: 12px !important;
    }

    .pool-rewards-logo {
        width: 50px !important;
        height: 50px !important;
    }

    .pool-rewards-title {
        font-size: 11px !important;
    }

    .pool-rewards-value {
        font-size: 18px !important;
    }

    .claim-rewards-btn {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }
}

/* Extra small mobile screens */
@media (max-width: 400px) {
    .header-buttons {
        gap: 2px;
        margin-right: -4px;
    }

    .header-dw-btn.tab-btn,
    .header-music-btn.tab-btn,
    .header-crash-btn.tab-btn,
    .header-pred-btn.tab-btn,
    .header-tower-btn.tab-btn,
    .header-flip-btn.tab-btn {
        display: none;
    }
    .header-usdc-chip { padding: 3px 7px 3px 5px; gap: 3px; }
    .header-usdc-icon { width: 12px; height: 12px; }
    #headerUsdcBal { font-size: 11px; }

    .info-section {
        padding: 24px 12px 40px 12px;
    }

    .info-text h2 {
        font-size: 24px;
    }

    .info-text .info-bio {
        font-size: 18px;
    }

    .supported-tokens-box {
        height: 110px;
        min-height: 110px;
        max-height: 110px;
    }

    .token-row img {
        width: 50px;
        height: 50px;
    }

    .info-stats-header {
        font-size: 14px;
        padding: 14px 16px;
    }

    .info-stat-item {
        min-height: 120px;
        padding: 16px;
    }

    .info-stat-label {
        font-size: 14px;
    }

    .info-stat-value {
        font-size: 28px;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    text-align: center;
    margin-top: 200px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    opacity: 0;
    animation: fadeSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) 1.2s forwards;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-indicator span {
    display: block;
    margin-bottom: 8px;
}

.scroll-indicator .arrow {
    font-size: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(6px);
    }
    60% {
        transform: translateY(3px);
    }
}

/* Info Section - hidden by default, shown on swap tab */
.info-section {
    background: rgb(26, 26, 29);
    margin: 0;
    padding: 60px 80px 80px 80px;
    position: relative;
    z-index: 1;
    display: none;
}

.info-section-inner {
    max-width: 1600px;
    margin: 0 auto;
}

.info-layout {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 420px);
    gap: 48px;
    margin-bottom: 60px;
    align-items: start;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.info-text {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100%;
    height: 100%;
    position: relative;
    text-align: left;
}

.info-text.scroll-reveal-left {
    transition: opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.info-text.scroll-reveal-left:not(.revealed) {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-text h2 {
    font-size: 42px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -1px;
    -webkit-font-smoothing: antialiased;
    max-width: 500px;
    line-height: 1.1;
}

.info-text p {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin-bottom: 28px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: -0.1px;
    -webkit-font-smoothing: antialiased;
}

.info-text .info-bio {
    font-size: 17px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin-bottom: 28px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: -0.1px;
    -webkit-font-smoothing: antialiased;
    max-width: 420px;
}

.supported-tokens-box {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding: 28px 0;
    position: relative;
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: 110px;
    max-height: 110px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    overflow: hidden;
    margin-top: auto;
}

.token-row {
    display: flex;
    gap: 12px;
    width: max-content;
}

.token-row.single {
    animation: scrollRight 60s linear infinite;
}

@keyframes scrollRight {
    from { transform: translateX(-50%); }
    to { transform: translateX(0%); }
}

.token-row img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.token-row img:hover {
    opacity: 1;
    transform: scale(1.08);
}

.supported-tokens-label {
    display: none;
}

.supported-tokens-icons {
    display: none;
}

.info-highlights {
    display: flex;
    gap: 24px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.highlight-icon {
    font-size: 18px;
}

.info-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.info-stats-header {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(34, 197, 94, 0.9);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

.stats-dot {
    width: 8px;
    height: 8px;
    background: rgba(34, 197, 94, 1);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

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

.info-stat-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 18px;
    text-align: left;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    aspect-ratio: 1 / 0.8;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: hidden;
}

.info-stat-label {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: 0;
}

.info-stat-value {
    font-size: 32px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -1px;
}

.info-stat-green {
    background: rgba(34, 197, 94, 0.06);
}

.info-stat-green .info-stat-label {
    color: rgba(34, 197, 94, 0.8);
}

.info-stat-green .info-stat-value {
    color: rgba(34, 197, 94, 1);
}

.info-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.feature-card {
    background: rgba(22, 22, 24, 1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.info-footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-footer p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

/* Explore Page */
#exploreTab {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: calc(80px + 20px) 0 20px 0;
    overflow-y: auto;
    z-index: 50;
    background: transparent;
}

body:has(#exploreTab.active) .app-header,
body:has(#poolTab.active) .app-header {
    background-color: rgba(26, 26, 29, 0.45) !important;
    backdrop-filter: blur(10px) saturate(1.05) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.05) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

#exploreTab.active .explore-tokens-grid {
    animation: gridReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.explore-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 2% 1% 2%;
    box-sizing: border-box;
}

@keyframes gridReveal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.explore-title {
    font-size: clamp(32px, 8vw, 48px);
    font-weight: 500;
    color: white;
    text-align: center;
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -1px;
    -webkit-font-smoothing: antialiased;
}

.explore-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-bottom: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.explore-search {
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    background: rgba(28, 28, 30, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 16px;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
    background: rgba(32, 32, 35, 1);
}

.explore-tokens-grid {
    background: rgba(20, 20, 24, 0.95);
    border-radius: 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.explore-token-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 700px;
    opacity: 0;
    animation: headerReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes headerReveal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.explore-header-spacer {
    width: 56px;
    flex-shrink: 0;
}

.explore-header-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1.4fr 90px 75px 80px 80px 85px;
    align-items: center;
    gap: 16px;
}

.explore-header-col {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: color 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.explore-header-col:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Price, Change, MCap, Vol columns - right aligned */
.explore-header-col:nth-child(2),
.explore-header-col:nth-child(3),
.explore-header-col:nth-child(4),
.explore-header-col:nth-child(5) {
    text-align: right;
}

/* Chart column (last) - centered */
.explore-header-col:nth-child(6) {
    text-align: center;
}

.explore-token-card {
    background: transparent;
    border-radius: 0;
    padding: 14px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.2s ease, transform 0.2s ease;
    min-width: 700px;
    opacity: 0;
    transform: translateY(5px);
}

.explore-token-card.explore-card-loaded {
    opacity: 1;
    transform: translateY(0);
}

.explore-token-card:hover {
    background: rgba(255, 255, 255, 0.035);
}

.explore-token-card:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.explore-token-card:first-child {
    border-radius: 0;
}

.explore-token-card:last-child {
    border-radius: 0 0 15px 15px;
}

.explore-token-card:only-child {
    border-radius: 0 0 15px 15px;
}

.explore-token-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    transition: opacity 0.2s ease;
    opacity: 0.3;
}

.explore-token-logo[src]:not([src=""]) {
    opacity: 1;
}

.explore-token-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1.4fr 90px 75px 80px 80px 85px;
    align-items: center;
    gap: 16px;
}

.explore-token-symbol {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -0.2px;
}

.explore-token-price {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    font-weight: 500;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.explore-token-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.explore-token-stat-label {
    display: none;
}

.explore-token-stat-value {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.explore-token-chart {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sparkline-canvas {
    display: block;
}

.explore-token-change {
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.explore-token-change.up {
    color: rgb(34, 197, 94);
}

.explore-token-change.down {
    color: rgb(239, 68, 68);
}

/* Pool APY smooth transitions */
.pool-apy {
    transition: color 0.3s ease, transform 0.3s ease;
}

.pool-apy.apy-flash {
    animation: apyFlash 0.6s ease-out;
}

@keyframes apyFlash {
    0% {
        transform: scale(1);
        text-shadow: none;
    }
    30% {
        transform: scale(1.15);
        text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    }
    100% {
        transform: scale(1);
        text-shadow: none;
    }
}

/* Pool stat smooth transitions */
.pool-tvl,
.pool-vol,
.pool-fees {
    transition: color 0.3s ease, transform 0.3s ease;
}

.pool-stat-flash {
    animation: statFlash 0.6s ease-out;
}

@keyframes statFlash {
    0% {
        transform: scale(1);
        color: inherit;
    }
    30% {
        transform: scale(1.1);
        color: rgb(34, 197, 94);
    }
    100% {
        transform: scale(1);
        color: inherit;
    }
}

/* Pool fee tier column */
.pool-fee-tier {
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.explore-header-chart {
    text-align: center !important;
    cursor: default !important;
}

/* Pool Page Stats Boxes */
.pool-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.pool-stat-box {
    background: rgba(20, 20, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 32px;
    min-height: 160px;
}

.pool-stat-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.pool-stat-box-title {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: 0.3px;
}

.pool-stat-box-value {
    font-size: 28px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.pool-stat-box-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

/* Rewards box horizontal layout */
.pool-rewards-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pool-rewards-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    flex-shrink: 0;
}

.pool-rewards-right {
    flex: 1;
    text-align: right;
}

.pool-rewards-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    margin-bottom: 6px;
}

.pool-rewards-value {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -0.3px;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.claim-rewards-btn {
    background: rgba(236, 72, 153, 0.12);
    color: rgba(236, 72, 153, 0.9);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.claim-rewards-btn:hover {
    background: rgba(236, 72, 153, 0.2);
    color: rgb(236, 72, 153);
}

/* Claim Rewards Modal */
.claim-rewards-modal {
    max-width: 380px;
    width: 90%;
    padding: 32px;
    border-radius: 16px;
    background: rgba(24, 24, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    animation: claimModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes claimModalIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Claiming state animations */
.claim-modal-logo.claiming {
    animation: claimPulse 1s ease-in-out infinite;
}

@keyframes claimPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

.claim-modal-amount.claiming {
    animation: amountPulse 0.8s ease-in-out infinite;
}

@keyframes amountPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.claim-modal-btn.claiming {
    pointer-events: none;
    background: rgba(236, 72, 153, 0.5);
}

.claim-modal-btn.success {
    background: rgb(34, 197, 94);
    animation: successPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.claim-modal-amount.success {
    color: rgb(34, 197, 94);
    animation: successFade 0.5s ease-out;
}

@keyframes successFade {
    0% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Confetti burst effect */
.claim-confetti {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes confettiBurst {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1);
        opacity: 0;
    }
}

.claim-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.claim-close-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.claim-modal-body {
    text-align: center;
    padding: 24px 0 40px;
}

.claim-logo-wrap {
    margin-bottom: 24px;
}

.claim-modal-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.claim-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

.claim-modal-amount {
    font-size: 36px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.claim-modal-btn {
    width: 100%;
    background: rgb(236, 72, 153);
    color: white;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 12px;
}

.claim-modal-btn:hover {
    background: rgb(219, 55, 136);
}

/* Pool Page Styles */
.pool-logos {
    position: relative;
    width: 64px;
    height: 52px;
    flex-shrink: 0;
}

.pool-logo-half {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pool-logo-half-left {
    left: 0;
    z-index: 2;
}

.pool-logo-half-right {
    left: 22px;
    z-index: 1;
}

.pool-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pool-network-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(18, 18, 20, 0.9);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.pool-network-badge img {
    width: 13px;
    height: 13px;
    border-radius: 3px;
}

/* Pool page - same layout as explore */
#poolTab {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: calc(70px + 20px) 0 20px 0;
    overflow-y: auto;
    z-index: 50;
    background: transparent;
    box-sizing: border-box;
}

#poolTab.active .explore-tokens-grid {
    animation: gridReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

#poolTab .explore-tokens-grid {
    background: transparent;
    border: none;
    border-radius: 0;
}

#poolTab .explore-token-card {
    border-bottom: none !important;
}

#poolTab .explore-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#poolTab .explore-tokens-list {
    padding: 6px 2% 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

#poolTab .pool-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 20px;
    padding-bottom: 0;
    margin: 0;
    border-radius: 16px;
    background: rgb(20, 20, 24);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

#poolTab .pool-card:hover {
    background: rgb(28, 28, 34);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#poolTab .pool-card:active {
    transform: scale(0.995);
}

#poolTab .pool-card-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

#poolTab .pool-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#poolTab .pool-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

#poolTab .pool-card-name {
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.01em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
    -webkit-font-smoothing: antialiased;
}

#poolTab .pool-card-address {
    font-size: 12px;
    font-weight: 500;
    font-family: 'SF Mono', 'Menlo', monospace;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

#poolTab .pool-card-balance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.7);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

#poolTab .pool-card-balance-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
}

#poolTab .pool-card-balance-value {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

#poolTab .pool-card-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 148px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

#poolTab .pool-fee-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
    justify-content: center;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#poolTab .pool-fee-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1;
}

#poolTab .pool-fee-value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1;
}

.pool-eth-balance {
    display: flex;
    align-items: baseline;
    gap: 5px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.pool-card:hover .pool-eth-balance {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.pool-eth-balance-value {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

.pool-eth-balance-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
}

.pool-eth-balance-usd {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    margin-left: 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
}

/* Pool Transactions Dropdown */
.pool-txns-section {
    flex: 0 0 calc(100% + 40px);
    width: calc(100% + 40px);
    margin: 12px -20px -1px -20px;
    padding: 0;
    box-sizing: border-box;
}

.pool-txns-toggle {
    background: rgba(236, 72, 153, 0.08);
    border: 1px solid rgba(236, 72, 153, 0.18);
    border-radius: 8px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    white-space: nowrap;
    flex-shrink: 0;
}

.pool-txns-toggle:hover {
    background: rgba(236, 72, 153, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.pool-txns-toggle.open {
    background: rgba(236, 72, 153, 0.08);
    color: rgba(236, 72, 153, 0.8);
}

.pool-txns-toggle-text {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: 0.3px;
}

.pool-txns-toggle-icon {
    font-size: 8px;
    transition: transform 0.15s ease;
}

.pool-txns-dropdown {
    background: rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    scroll-behavior: smooth;
    width: 100%;
    border-radius: 0 0 14px 14px;
}

.pool-txns-dropdown::-webkit-scrollbar {
    width: 4px;
}

.pool-txns-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.pool-txns-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

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

.pool-txns-dropdown[data-loaded="true"] .pool-balance-header,
.pool-txns-dropdown[data-loaded="true"] .pool-txns-list {
    animation: poolContentFadeIn 0.3s ease-out;
}

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

.pool-txns-loading,
.pool-txns-empty,
.pool-txns-error {
    padding: 10px 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pool-txns-error {
    color: rgba(244, 67, 54, 0.8);
    flex-direction: column;
    gap: 14px;
}

.pool-txns-retry {
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: rgba(236, 72, 153, 0.9);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pool-txns-retry:hover {
    background: rgba(236, 72, 153, 0.3);
}

.pool-txns-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(236, 72, 153, 0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.pool-txns-list {
    padding: 0;
    width: 100%;
}

/* Compact transaction list styles */
.pool-txns-header-compact {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pool-txns-balance-compact {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.pool-txns-list-compact {
    padding: 0;
    width: 100%;
}

.pool-txn-row-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s ease;
}

.pool-txn-row-compact:last-child {
    border-bottom: none;
}

.pool-txn-row-compact:hover {
    background: rgba(236, 72, 153, 0.05);
}

.pool-txn-row-compact .pool-txn-swap-visual {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.pool-txn-row-compact .pool-txn-coin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    object-fit: cover;
}

.pool-txn-row-compact .pool-txn-swap-arrow {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
}

.pool-txn-row-compact .pool-txn-chain-badge {
    display: none;
}

.pool-txn-hash-compact {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 9px;
    color: rgba(236, 72, 153, 0.6);
    text-decoration: none;
    flex: 1;
    transition: color 0.15s ease;
}

.pool-txn-hash-compact:hover {
    color: rgba(236, 72, 153, 0.9);
    text-decoration: underline;
}

.pool-txn-time-compact {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    min-width: 45px;
    text-align: right;
}

.pool-txn-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: transparent;
    gap: 12px;
    transition: background 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.pool-txn-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.pool-txn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.pool-txn-icon.txn-in {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.pool-txn-icon.txn-out {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.pool-txn-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pool-txn-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pool-txn-type {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.pool-txn-amount {
    font-size: 14px;
    font-weight: 600;
    font-family: 'SF Mono', Monaco, monospace;
}

.pool-txn-amount.txn-in {
    color: #22c55e;
}

.pool-txn-amount.txn-out {
    color: #ef4444;
}

.pool-txn-swap {
    font-size: 11px;
    color: rgba(236, 72, 153, 0.8);
    background: rgba(236, 72, 153, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    margin: 4px 0 2px;
    font-family: 'SF Mono', Monaco, monospace;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pool-txn-item.has-swap-info {
    padding: 14px 16px;
}

.pool-txn-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.pool-txn-hash {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.15s ease;
}

.pool-txn-hash:hover {
    color: rgba(236, 72, 153, 0.9);
}

.pool-txn-dot {
    color: rgba(255, 255, 255, 0.25);
    font-size: 8px;
}

.pool-txn-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.pool-txn-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Clean transaction row */
.pool-txn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease;
    flex-wrap: nowrap;
}

.pool-txn-row:last-child {
    border-bottom: none;
}

.pool-txn-row:hover {
    background: rgba(236, 72, 153, 0.03);
}

.pool-txn-icon-sm {
    display: none;
}

.pool-txn-amount-sm {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    font-weight: 600;
    min-width: 100px;
}

.pool-txn-amount-sm.txn-in {
    color: #22c55e;
}

.pool-txn-amount-sm.txn-out {
    color: #ef4444;
}

.pool-txn-type-sm {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.pool-txn-hash-sm {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 10px;
    color: rgba(236, 72, 153, 0.8);
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.15s ease;
    padding: 4px 8px;
    background: rgba(236, 72, 153, 0.1);
    border-radius: 5px;
    cursor: pointer;
}

.pool-txn-hash-sm:hover {
    color: rgba(236, 72, 153, 1);
    background: rgba(236, 72, 153, 0.18);
    text-decoration: underline;
}

.pool-txn-time-sm {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    min-width: 55px;
    text-align: right;
}

.pool-txn-addr {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 11px;
    flex-shrink: 0;
}

.pool-txn-addr-label {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.pool-txn-addr a {
    color: rgba(236, 72, 153, 0.7);
    text-decoration: none;
    transition: color 0.15s ease;
}

.pool-txn-addr a:hover {
    color: rgba(236, 72, 153, 1);
    text-decoration: underline;
}

.pool-txn-type-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pool-txn-type-badge.deposit {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.pool-txn-type-badge.withdraw {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.pool-txn-coin-wrap {
    position: relative;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.pool-txn-coin-wrap .pool-txn-coin {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.pool-txn-chain-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: #fff;
    padding: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Swap transaction with coin logos */
.pool-txn-swap-visual {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.pool-txn-swap-pair {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pool-txn-coin {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.pool-txn-swap-amt {
    font-size: 13px;
    font-weight: 600;
    font-family: 'SF Mono', Monaco, monospace;
    white-space: nowrap;
}

.pool-txn-swap-amt.from {
    color: rgba(255, 255, 255, 0.9);
}

.pool-txn-swap-amt.to {
    color: #22c55e;
}

.pool-txn-swap-arrow {
    color: rgba(236, 72, 153, 0.5);
    font-size: 16px;
    flex-shrink: 0;
    margin: 0 4px;
    font-weight: 500;
}

.pool-txn-swap-price {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    margin-left: auto;
    flex-shrink: 0;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* Card Tab */
#cardTab {
    min-height: calc(100vh - 180px);
    align-items: center;
    justify-content: center;
}

#cardTab.active {
    display: flex;
}

.card-page {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0 60px;
}

.card-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    width: 100%;
}

.black-card {
    width: min(420px, 88vw);
    aspect-ratio: 1.586;
    border-radius: 18px;
    padding: 24px;
    background:
        radial-gradient(140% 120% at 0% 0%, rgba(255, 255, 255, 0.035), transparent 60%),
        linear-gradient(140deg, #09090b 0%, #0b0b10 45%, #060608 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    font-variant-numeric: tabular-nums;
}

.black-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 35%, rgba(255, 255, 255, 0.01) 70%, transparent 100%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 7px);
    opacity: 0.45;
    pointer-events: none;
}

.black-card::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    opacity: 0.6;
    pointer-events: none;
}

.black-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.black-card-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.black-card-brand img {
    width: 28px;
    height: 28px;
    border-radius: 0;
    background: transparent;
    border: none;
    padding: 0;
    filter: none;
    opacity: 1;
}

.black-card-tier {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.32em;
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
}

.black-card-chip {
    width: 56px;
    height: 42px;
    border-radius: 10px;
    background:
        linear-gradient(145deg, #0b0b10 0%, #14141c 45%, #08080d 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    margin-top: 22px;
    position: relative;
    z-index: 1;
}

.black-card-chip::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 6px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 45%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 6px);
    opacity: 0.6;
}

.black-card-chip::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.55;
}

.black-card-number {
    font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 15px;
    letter-spacing: 0.26em;
    color: rgba(255, 255, 255, 0.72);
    position: relative;
    z-index: 1;
}

.black-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
}

.black-card-name {
    font-size: 12px;
    letter-spacing: 0.24em;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
    #cardTab {
        min-height: calc(100vh - 160px);
    }

    .card-page {
        padding: 30px 0 50px;
    }

    .black-card {
        padding: 20px;
        border-radius: 16px;
    }

    .black-card-number {
        font-size: 14px;
        letter-spacing: 0.22em;
    }
}

/* Buy Tab */
#buyTab {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: calc(80px + 24px) 20px 40px;
    overflow-y: auto;
    z-index: 50;
    background: transparent;
}

#buyTab.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}




/* ========================================
   LIGHT MODE THEME
   ======================================== */

html[data-theme="light"] {
    --app-purple: rgb(127, 102, 255);
    --matte-black: rgb(250, 250, 252);
    --app-dark-gray: rgb(245, 245, 247);
    --medium-dark: rgb(240, 240, 242);
    --dark-background: rgb(235, 235, 238);
    --deep-background: rgb(248, 248, 250);
}

html[data-theme="light"] {
    background: #f5f5f7 !important;
}

html[data-theme="light"] body {
    background:
        /* Soft light vignette */
        radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.03) 100%),
        /* Subtle purple accent */
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(127, 102, 255, 0.06) 0%, transparent 50%),
        /* Soft blue accent */
        radial-gradient(ellipse 70% 60% at 80% 70%, rgba(100, 150, 220, 0.05) 0%, transparent 50%),
        /* Base gradient */
        linear-gradient(180deg, #f8f8fa 0%, #f0f0f4 50%, #e8e8ec 100%) !important;
    background-attachment: fixed !important;
    color: #1d1d1f !important;
}

html[data-theme="light"]::before {
    background: #f5f5f7;
}

html[data-theme="light"] .app-container {
    background: transparent !important;
}

/* Header */
html[data-theme="light"] .app-header {
    background-color: rgba(248, 248, 250, 0.4);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-bottom-color: rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

html[data-theme="light"] #exploreTab,
html[data-theme="light"] #poolTab,
html[data-theme="light"] #transactionsTab {
    background: #f5f5f7;
}

html[data-theme="light"] #poolTab {
    background: transparent;
}

html[data-theme="light"] body:has(#exploreTab.active) .app-header,
html[data-theme="light"] body:has(#poolTab.active) .app-header,
html[data-theme="light"] body:has(#transactionsTab.active) .app-header {
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body:has(#poolTab.active) .app-header {
    background-color: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(10px) saturate(1.05) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.05) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] #transactionsTab .explore-container {
    background: #ffffff;
}


html[data-theme="light"] #transactionsTab .chart-load-label {
    color: rgba(15, 23, 42, 0.75);
}

html[data-theme="light"] #transactionsTab .chart-load-track {
    background: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] #transactionsTab .chart-load-fill {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.35), rgba(236, 72, 153, 0.95));
}

html[data-theme="light"] #transactionsTab .chart-load-percent {
    color: rgba(15, 23, 42, 0.85);
}


html[data-theme="light"] #transactionsTab,
html[data-theme="light"] #transactionsTab .chrome-prices-container,
html[data-theme="light"] #transactionsTab .chrome-prices-grid {
    background: #ffffff !important;
}

html[data-theme="light"] #transactionsTab .chrome-price-row {
    background: #e4e7ec;
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] #transactionsTab .chrome-price-row:hover {
    background: #dde2ea;
    border-color: rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] #transactionsTab .chrome-coin-logo {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] #transactionsTab .chrome-coin-symbol {
    color: #0f172a;
}

html[data-theme="light"] #transactionsTab .chrome-price {
    color: #111111 !important;
}

html[data-theme="light"] #transactionsTab .coin-mini-chart {
    background: #ffffff;
    border-color: rgba(219, 39, 119, 0.55);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] #transactionsTab .chrome-network-badge {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] #poolTab .pool-card {
    background: #e4e7ec;
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] #poolTab .pool-card:hover {
    background: #dde2ea;
    border-color: rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] #poolTab .pool-logo {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] #poolTab .pool-card-name {
    color: #0f172a;
}

html[data-theme="light"] #poolTab .pool-card-address {
    color: rgba(15, 23, 42, 0.6);
}

html[data-theme="light"] #poolTab .pool-card-balance {
    color: rgba(15, 23, 42, 0.75);
    border-color: transparent;
    background: transparent;
}

html[data-theme="light"] #poolTab .pool-card-balance-label {
    color: rgba(15, 23, 42, 0.55);
}

html[data-theme="light"] #poolTab .pool-card-balance-value {
    color: rgba(15, 23, 42, 0.95);
}

html[data-theme="light"] #poolTab .pool-fee-badge {
    color: rgba(15, 23, 42, 0.6);
    background: transparent;
    border-color: transparent;
}

html[data-theme="light"] #poolTab .pool-fee-label {
    color: rgba(15, 23, 42, 0.5);
}

html[data-theme="light"] #poolTab .pool-fee-value {
    color: rgba(15, 23, 42, 0.75);
}

html[data-theme="light"] #poolTab .pool-network-badge {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .pool-eth-balance {
    background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .pool-eth-balance-value {
    color: #0f172a;
}

html[data-theme="light"] .pool-eth-balance-label {
    color: rgba(15, 23, 42, 0.5);
}

html[data-theme="light"] .pool-txns-dropdown {
    background: rgba(255, 255, 255, 0.5);
    border-top-color: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .pool-txn-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .pool-txn-icon.txn-in {
    background: rgba(34, 197, 94, 0.12);
}

html[data-theme="light"] .pool-txn-icon.txn-out {
    background: rgba(239, 68, 68, 0.12);
}

html[data-theme="light"] .pool-txn-type {
    color: rgba(15, 23, 42, 0.85);
}

html[data-theme="light"] .pool-txn-swap {
    color: rgba(219, 39, 119, 0.9);
    background: rgba(219, 39, 119, 0.1);
}

html[data-theme="light"] .pool-txn-meta {
    color: rgba(15, 23, 42, 0.4);
}

html[data-theme="light"] .pool-txn-hash {
    color: rgba(15, 23, 42, 0.5);
}

html[data-theme="light"] .pool-txn-hash:hover {
    color: rgba(219, 39, 119, 0.9);
}

html[data-theme="light"] .pool-txn-dot {
    color: rgba(15, 23, 42, 0.2);
}

html[data-theme="light"] .pool-txn-time {
    color: rgba(15, 23, 42, 0.4);
}

html[data-theme="light"] .pool-txns-loading,
html[data-theme="light"] .pool-txns-empty {
    color: rgba(15, 23, 42, 0.5);
}

html[data-theme="light"] .pool-txn-row {
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .pool-txn-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .pool-txn-type-sm {
    color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] .pool-txn-hash-sm {
    color: rgba(219, 39, 119, 0.8);
    background: rgba(219, 39, 119, 0.08);
}

html[data-theme="light"] .pool-txn-hash-sm:hover {
    color: rgba(219, 39, 119, 1);
    background: rgba(219, 39, 119, 0.15);
}

html[data-theme="light"] .pool-txn-time-sm {
    color: rgba(15, 23, 42, 0.3);
}

html[data-theme="light"] .pool-txn-addr-label {
    color: rgba(15, 23, 42, 0.5);
}

html[data-theme="light"] .pool-txn-addr a {
    color: rgba(219, 39, 119, 0.8);
}

html[data-theme="light"] .pool-txn-addr a:hover {
    color: rgba(219, 39, 119, 1);
}

html[data-theme="light"] .pool-txn-type-badge.deposit {
    background: rgba(52, 211, 153, 0.2);
}

html[data-theme="light"] .pool-txn-type-badge.withdraw {
    background: rgba(251, 146, 60, 0.2);
}

html[data-theme="light"] .pool-txn-coin {
    background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .pool-txn-swap-amt.from {
    color: rgba(15, 23, 42, 0.85);
}

html[data-theme="light"] .pool-txn-swap-arrow {
    color: rgba(15, 23, 42, 0.25);
}

html[data-theme="light"] .pool-txn-swap-price {
    color: rgba(15, 23, 42, 0.4);
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .pool-txn-hash-sm:hover {
    color: rgba(219, 39, 119, 0.9);
}

html[data-theme="light"] .pool-txn-time-sm {
    color: rgba(15, 23, 42, 0.35);
}

/* Mobile hamburger menu - make lines visible in light mode */
html[data-theme="light"] .hamburger-line {
    background: rgba(0, 0, 0, 0.8);
}

/* Tabs - match dark mode style */
html[data-theme="light"] .tab-btn {
    color: rgba(0, 0, 0, 0.4);
    background: transparent;
}

html[data-theme="light"] .tab-btn:hover {
    color: rgba(0, 0, 0, 0.6);
    background: transparent;
}

html[data-theme="light"] .tab-btn.active {
    color: #000000;
    background: transparent;
    font-weight: 600;
}

/* Connect button - keep pink like dark mode */
html[data-theme="light"] .connect-btn {
    background: rgb(236, 72, 153);
    color: white;
}

html[data-theme="light"] .connect-btn:hover {
    background: rgb(219, 39, 119);
}

html[data-theme="light"] .connect-modal {
    background: rgba(240, 242, 246, 0.65);
}

html[data-theme="light"] .connect-modal-panel {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .connect-modal-header h3,
html[data-theme="light"] .connect-modal-close {
    color: #1d1d1f;
}

html[data-theme="light"] .connect-option {
    color: #1d1d1f;
}

html[data-theme="light"] .connect-option span {
    color: #1d1d1f !important;
}

html[data-theme="light"] .coming-soon-badge {
    color: rgba(0, 0, 0, 0.5) !important;
    background: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .connect-option:hover {
    background: transparent;
}

html[data-theme="light"] .wallet-network-btn {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #111111;
}

html[data-theme="light"] .wallet-network-btn:hover {
    background: #dde2ea;
    border-color: rgba(236, 72, 153, 0.35);
}

html[data-theme="light"] .wallet-network-icon {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .wallet-network-arrow {
    color: #111111;
}

/* Swap container */
html[data-theme="light"] .swap-container-wrapper {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .swap-box {
    background: #d8dde5;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .swap-box:focus-within {
    border-color: rgba(236, 72, 153, 0.35);
    background: #dde2ea;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.08);
}

html[data-theme="light"] .swap-label {
    color: #333333;
    font-weight: 600;
}

html[data-theme="light"] .input-group label {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .price-display {
    color: #111111 !important;
}

html[data-theme="light"] .coin-unit-price {
    color: #111111 !important;
}

html[data-theme="light"] .amount-input {
    color: #000000;
    font-weight: 500;
}

html[data-theme="light"] .amount-input::placeholder {
    color: #999999;
}

html[data-theme="light"] .balance-display {
    color: #555555;
}

html[data-theme="light"] .usd-value {
    color: #444444;
    font-weight: 500;
}

/* Custom select */
html[data-theme="light"] .custom-select-trigger {
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.25);
    color: #000000;
    box-shadow: none;
}

html[data-theme="light"] .custom-select-trigger:hover {
    background: white;
    border-color: rgb(236, 72, 153);
    box-shadow: none;
}

html[data-theme="light"] .swap-box.outlined .custom-select-trigger {
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .swap-box.outlined .custom-select-trigger:hover {
    border-color: rgb(236, 72, 153);
}

html[data-theme="light"] .custom-select-trigger.select-token {
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.25);
    color: #000000;
}

html[data-theme="light"] .custom-select-trigger.select-token:hover {
    background: white;
    border-color: rgb(236, 72, 153);
}

html[data-theme="light"] .custom-select-trigger.select-token::after {
    border-top-color: #000000;
}

html[data-theme="light"] .custom-select-trigger::after {
    border-top-color: #000000;
}

html[data-theme="light"] .dropdown-search-icon {
    color: #000000;
}

html[data-theme="light"] .dropdown-search-input {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #111111;
}

html[data-theme="light"] .dropdown-search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .dropdown-search-wrapper .network-selector-btn {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .dropdown-search-wrapper .network-selector-btn:hover {
    background: #dde2ea;
    border-color: rgba(236, 72, 153, 0.35);
}


html[data-theme="light"] .custom-select-trigger .coin-symbol {
    color: #000000;
}

html[data-theme="light"] .custom-select-dropdown {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .dropdown-header {
    background: #e4e7ec;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .dropdown-header-title {
    color: #1d1d1f;
}

html[data-theme="light"] .dropdown-search-input {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #111111;
}

html[data-theme="light"] .dropdown-search-input:focus {
    background: #dde2ea;
    border-color: rgba(236, 72, 153, 0.45);
}

html[data-theme="light"] .dropdown-search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .custom-select-option {
    color: #000000;
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .custom-select-option:hover {
    background: #dde2ea;
    border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .custom-select-option.selected {
    background: rgba(236, 72, 153, 0.14);
    border-color: rgba(236, 72, 153, 0.35);
}

html[data-theme="light"] .coin-symbol {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .coin-name {
    color: #555555;
}

html[data-theme="light"] .coin-balance {
    color: #333333;
}

html[data-theme="light"] .custom-select-option-symbol {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .custom-select-option-name {
    color: #666666;
}

html[data-theme="light"] .custom-select-option-price {
    color: #111111 !important;
    font-weight: 600;
}

html[data-theme="light"] .custom-select-option-value {
    color: #111111 !important;
}

html[data-theme="light"] .custom-select-option-balance {
    color: #111111 !important;
}

/* Percent buttons */
html[data-theme="light"] .percent-btn {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .percent-btn:hover {
    background: rgba(236, 72, 153, 0.1);
    color: rgb(236, 72, 153);
    border-color: rgb(236, 72, 153);
}

/* Swap direction button */
html[data-theme="light"] .swap-direction-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #111111;
    box-shadow:
        0 0 0 4px #e4e7ec,
        0 0 0 5px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .swap-direction-btn svg {
    opacity: 0.7;
}

html[data-theme="light"] .swap-direction-btn:hover {
    border-color: rgba(236, 72, 153, 0.4);
    color: rgb(236, 72, 153);
    background: rgba(236, 72, 153, 0.04);
    box-shadow:
        0 0 0 4px #e4e7ec,
        0 0 0 5px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .swap-direction-btn:hover svg {
    color: rgb(236, 72, 153);
    opacity: 1;
}

/* Swap details / Slippage box */
html[data-theme="light"] .swap-details {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .detail-row {
    color: #333333;
}

html[data-theme="light"] .detail-label {
    color: #444444;
}

html[data-theme="light"] .detail-value {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .swap-info {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .swap-info .info-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .swap-info .info-row span:first-child {
    color: rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .swap-info .info-row span:last-child {
    color: #111111;
}

/* Primary button - keep pink, remove 3D effect */
html[data-theme="light"] .primary-btn {
    background: rgb(236, 72, 153);
    color: white;
    box-shadow: none;
}

html[data-theme="light"] .primary-btn:hover {
    background: rgb(219, 39, 119);
    box-shadow: none;
    transform: none;
}

html[data-theme="light"] .primary-btn:active {
    box-shadow: none;
    transform: none;
}

html[data-theme="light"] .primary-btn:disabled {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.3);
    box-shadow: none;
}

html[data-theme="light"] .primary-btn.swapping,
html[data-theme="light"] .primary-btn.success {
    background: rgb(236, 72, 153);
    box-shadow: none;
}

html[data-theme="light"] .swap-btn {
    background: rgba(236, 72, 153, 0.08);
    color: rgba(236, 72, 153, 0.5);
    border: 1px solid rgba(236, 72, 153, 0.15);
    box-shadow: none;
    transform: none;
}

html[data-theme="light"] .swap-btn:hover:not(.active) {
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.2);
    transform: none;
}

html[data-theme="light"] .swap-btn.active {
    background: rgba(236, 72, 153, 0.9);
    color: #ffffff;
    border-color: rgba(236, 72, 153, 0.5);
    transform: none;
}

html[data-theme="light"] .swap-btn.active:hover {
    background: rgba(219, 39, 119, 0.9);
}

html[data-theme="light"] .swap-btn.active:active {
    background: rgba(236, 72, 153, 0.8);
}

html[data-theme="light"] .swap-btn.calculating,
html[data-theme="light"] .swap-btn.swapping,
html[data-theme="light"] .swap-btn.success {
    background: rgba(236, 72, 153, 0.9);
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: none;
}

/* Slogan */
html[data-theme="light"] .swap-slogan {
    color: #000000;
}

/* Profile menu */
html[data-theme="light"] .profile-menu {
    background: #f5f6f8;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: -8px 0 40px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(0,0,0,0.04);
}

html[data-theme="light"] .profile-divider {
    background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .profile-backdrop.open {
    background: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .settings-btn,
html[data-theme="light"] .power-btn {
    color: rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .settings-btn:hover,
html[data-theme="light"] .power-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.7);
}

html[data-theme="light"] .settings-dropdown,
html[data-theme="light"] .power-dropdown {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .settings-section {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .settings-section:hover {
    background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .settings-label {
    color: rgba(0, 0, 0, 0.7);
}

html[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .theme-option {
    color: rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .theme-option:hover {
    color: rgb(236, 72, 153);
    background: rgba(236, 72, 153, 0.1);
}

html[data-theme="light"] .theme-option.active {
    background: rgb(236, 72, 153);
    color: white;
}

html[data-theme="light"] .theme-option.active:hover {
    background: rgb(246, 92, 173);
}

html[data-theme="light"] .network-toggle {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .network-option {
    color: rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .network-option:hover {
    color: rgb(236, 72, 153);
    background: rgba(236, 72, 153, 0.1);
}

html[data-theme="light"] .network-option.active {
    background: rgb(236, 72, 153);
    color: white;
}

html[data-theme="light"] .network-option.active:hover {
    background: rgb(246, 92, 173);
}

html[data-theme="light"] .power-dropdown-item {
    color: #1d1d1f;
}

html[data-theme="light"] .power-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .profile-avatar {
    background: linear-gradient(135deg, rgba(127, 102, 255, 0.15) 0%, rgba(127, 102, 255, 0.08) 100%);
    color: var(--app-purple);
}

html[data-theme="light"] .profile-address {
    color: #000000;
    font-weight: 500;
}

html[data-theme="light"] .address-copy-btn {
    color: rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .address-copy-btn:hover {
    color: var(--app-purple);
}

html[data-theme="light"] .profile-balance {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .header-icons .buy-crypto-btn,
html[data-theme="light"] .buy-crypto-btn {
    background: rgba(236, 72, 153, 0.12) !important;
    color: rgb(219, 39, 119) !important;
    border: 1px solid rgba(236, 72, 153, 0.25) !important;
}

html[data-theme="light"] .header-icons .buy-crypto-btn:hover,
html[data-theme="light"] .buy-crypto-btn:hover {
    background: rgba(236, 72, 153, 0.2) !important;
    border-color: rgba(236, 72, 153, 0.4) !important;
}

html[data-theme="light"] .profile-tabs {
    background: linear-gradient(180deg, #f6f6f9 0%, #eef0f4 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .profile-tab {
    color: #5b5b66;
    background: transparent;
    border: none;
    font-weight: 600;
}

html[data-theme="light"] .profile-tab:hover {
    color: rgb(236, 72, 153);
    background: rgba(236, 72, 153, 0.08);
}

html[data-theme="light"] .profile-tab:focus-visible {
    outline: 2px solid rgba(236, 72, 153, 0.35);
    outline-offset: 1px;
}

html[data-theme="light"] .profile-tab:active {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95) 0%, rgba(219, 39, 119, 0.95) 100%);
    color: #ffffff;
}

html[data-theme="light"] .profile-tab.active {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95) 0%, rgba(219, 39, 119, 0.95) 100%);
    color: #ffffff;
    font-weight: 600;
}

html[data-theme="light"] .profile-avatar {
    background: rgba(59, 130, 246, 0.15);
}

html[data-theme="light"] .profile-avatar svg {
    fill: rgb(59, 130, 246);
}

html[data-theme="light"] .profile-btn {
    background: rgba(59, 130, 246, 0.15);
}

html[data-theme="light"] .profile-btn svg {
    fill: rgb(59, 130, 246);
}

html[data-theme="light"] .profile-btn:hover {
    background: rgba(59, 130, 246, 0.25);
}

html[data-theme="light"] .profile-coin-item {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: none;
}

html[data-theme="light"] .profile-coin-item:hover {
    background: #dde2ea;
    border-color: rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .profile-coin-logo {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

html[data-theme="light"] .custom-select-logo,
html[data-theme="light"] .custom-select-option img,
html[data-theme="light"] .profile-coin-logo,
html[data-theme="light"] .coin-logo,
html[data-theme="light"] .send-coin-logo,
html[data-theme="light"] .pool-input-logo,
html[data-theme="light"] .unpool-token-logo,
html[data-theme="light"] .explore-token-logo,
html[data-theme="light"] .coin-logo-select {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15),
                0 0 0 1px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .profile-pool-logo {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15),
                0 0 0 1px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .profile-coin-name {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .profile-coin-price {
    color: #111111;
}

html[data-theme="light"] .profile-coin-amount {
    color: #1f2937;
}

html[data-theme="light"] .profile-coin-value {
    color: #111111;
    font-weight: 600;
}

html[data-theme="light"] .profile-menu .profile-coin-name,
html[data-theme="light"] .profile-menu .profile-coin-price,
html[data-theme="light"] .profile-menu .profile-coin-amount,
html[data-theme="light"] .profile-menu .profile-coin-value,
html[data-theme="light"] .profile-menu .profile-coin-info {
    color: #111111 !important;
}

html[data-theme="light"] .profile-coin-info {
    color: #000000;
}

html[data-theme="light"] .profile-coin-list {
    background: transparent;
}

html[data-theme="light"] .profile-transactions-list {
    background: transparent;
}

/* Transaction items */
html[data-theme="light"] .profile-tx-item {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .profile-tx-item:hover {
    background: rgba(236, 72, 153, 0.04);
    border-color: rgba(236, 72, 153, 0.2);
}

html[data-theme="light"] .profile-tx-title {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .profile-tx-id {
    color: rgba(0, 0, 0, 0.45);
    background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .profile-tx-subtitle {
    color: #555555;
}

html[data-theme="light"] .scan-link.scan-sol {
    background: rgba(153, 69, 255, 0.08);
    color: #7c3aed;
    border-color: rgba(153, 69, 255, 0.2);
}
html[data-theme="light"] .scan-link.scan-base {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.2);
}

html[data-theme="light"] .profile-tx-amount {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .profile-tx-amount.positive {
    color: #22c55e;
}

html[data-theme="light"] .profile-tx-amount.negative {
    color: #ef4444;
}

html[data-theme="light"] .profile-tx-logo {
    background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .profile-tx-icon-placeholder {
    background: rgba(127, 102, 255, 0.1);
    color: var(--app-purple);
}

html[data-theme="light"] .network-badge {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Modals */
html[data-theme="light"] .modal {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

html[data-theme="light"] .modal-content {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .modal-header h3 {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .modal-close {
    color: #666666;
}

html[data-theme="light"] .modal-close:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .modal-body {
    color: #333333;
}

/* Explore page - title and subtitle */
html[data-theme="light"] .explore-title {
    color: #000000;
}

html[data-theme="light"] .explore-subtitle {
    color: #666666;
}

/* Explore page - search input */
html[data-theme="light"] .search-input {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #000000;
}

html[data-theme="light"] .search-input::placeholder {
    color: #888888;
}

html[data-theme="light"] .search-input:focus {
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

/* Explore page - main grid container */
html[data-theme="light"] .explore-tokens-grid {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Explore page - header row */
html[data-theme="light"] .explore-token-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Explore page - header columns */
html[data-theme="light"] .explore-header-col {
    color: rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .explore-header-col:hover {
    color: rgba(0, 0, 0, 0.8);
}

/* Explore page - token cards */
html[data-theme="light"] .explore-token-card {
    background: white;
}

html[data-theme="light"] .explore-token-card:hover {
    background: rgba(236, 72, 153, 0.04);
}

html[data-theme="light"] .explore-token-card:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Explore page - token symbol (name) */
html[data-theme="light"] .explore-token-symbol {
    color: #000000;
    font-weight: 600;
}

/* Explore page - token price */
html[data-theme="light"] .explore-token-price {
    color: #000000;
    font-weight: 500;
}

/* Explore page - stat values (mcap, volume) */
html[data-theme="light"] .explore-token-stat-value {
    color: #333333;
}

/* Explore page - change percentage */
html[data-theme="light"] .explore-token-change {
    font-weight: 500;
}

/* Explore page - logo background */
html[data-theme="light"] .explore-token-logo {
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Pool page - stat boxes */
html[data-theme="light"] .pool-stat-box {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .pool-stat-box-title {
    color: #666666;
}

html[data-theme="light"] .pool-stat-box-value {
    color: #000000;
}

html[data-theme="light"] .pool-stat-box-change {
    color: #333333;
}

/* Pool page - pool list uses explore-tokens-grid (already styled above) */
/* Pool-specific text colors */
html[data-theme="light"] .pool-pair-name {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .pool-fee-tier {
    color: #333333;
}

html[data-theme="light"] .pool-tvl,
html[data-theme="light"] .pool-vol,
html[data-theme="light"] .pool-fees {
    color: #333333;
}

html[data-theme="light"] .pool-apy {
    color: #000000;
    font-weight: 600;
}

html[data-theme="light"] .pool-btn {
    background: rgba(236, 72, 153, 0.1);
    color: rgb(236, 72, 153);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

html[data-theme="light"] .pool-btn:hover {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
}

/* Pool page - rewards box */
html[data-theme="light"] .pool-rewards-box {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .pool-rewards-title {
    color: #666666;
}

html[data-theme="light"] .pool-rewards-value {
    color: #000000;
}


/* Pool/Unpool Modal - light mode */
html[data-theme="light"] .pool-modal,
html[data-theme="light"] .unpool-modal,
html[data-theme="light"] .pool-liquidity-modal {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .pool-modal-title {
    color: #111111;
}

html[data-theme="light"] .pool-input-section {
    background: #d8dde5;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .pool-input-token {
    color: #111111;
}

html[data-theme="light"] .pool-input-balance {
    color: #4b5563;
}

html[data-theme="light"] .pool-amount-input {
    color: #111111;
}

html[data-theme="light"] .pool-amount-input::placeholder {
    color: #9ca3af;
}

html[data-theme="light"] .pool-usd-value {
    color: #4b5563;
}

html[data-theme="light"] .pool-steps-title {
    color: #374151;
}

html[data-theme="light"] .pool-step {
    background: #d8dde5;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .pool-step-title {
    color: #111111;
}

html[data-theme="light"] .pool-step-subtitle {
    color: #4b5563;
}

html[data-theme="light"] .pool-step-status {
    color: #374151;
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .pool-steps-footnote {
    color: #6b7280;
}

/* Unpool modal specific elements */
html[data-theme="light"] .unpool-title {
    color: #000000;
}

html[data-theme="light"] .unpool-position-info {
    background: #d8dde5;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .unpool-position-label {
    color: #666666;
}

html[data-theme="light"] .unpool-token-info {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .unpool-token-info span:not(.unpool-token-symbol) {
    color: #111111;
}

html[data-theme="light"] .unpool-token-symbol {
    color: #333333;
}

html[data-theme="light"] .unpool-amount-label {
    color: #666666;
}

html[data-theme="light"] .unpool-percent-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #333333;
}

html[data-theme="light"] .unpool-percent-btn:hover {
    background: rgba(236, 72, 153, 0.1);
    color: rgb(236, 72, 153);
}

html[data-theme="light"] .unpool-percent-btn.active {
    background: rgba(236, 72, 153, 0.15);
    color: rgb(236, 72, 153);
}

html[data-theme="light"] .unpool-receive-section {
    background: #d8dde5;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .unpool-receive-label {
    color: #666666;
}

html[data-theme="light"] .unpool-receive-item {
    background: #e4e7ec;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .unpool-receive-amount {
    color: #000000;
}

html[data-theme="light"] .unpool-receive-symbol {
    color: #333333;
}

html[data-theme="light"] .unpool-receipt {
    background: #d8dde5;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .unpool-receipt-row {
    color: rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .unpool-receipt-row span:last-child {
    color: rgba(0, 0, 0, 0.8);
}

html[data-theme="light"] .pool-receipt {
    background: #d8dde5;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .pool-receipt-row {
    color: rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .pool-receipt-network {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .pool-receipt-row span:last-child {
    color: rgba(0, 0, 0, 0.8);
}

/* Pool/Unpool modal submit button - light mode */
html[data-theme="light"] .pool-modal-submit {
    background: rgb(236, 72, 153);
    color: white;
}

html[data-theme="light"] .pool-modal-submit:hover {
    background: #D91A7F;
    transform: translateY(-1px);
}

html[data-theme="light"] .pool-modal-submit.insufficient {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .pool-modal-submit.insufficient:hover {
    background: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .pool-modal-submit.loading {
    background: rgba(236, 72, 153, 0.7);
}

html[data-theme="light"] .pool-steps-title {
    color: rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .pool-step {
    background: #d8dde5;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .pool-step-index {
    border-color: rgba(15, 23, 42, 0.2);
    background: #e4e7ec;
    color: #4b5563;
}

html[data-theme="light"] .pool-step-title {
    color: rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] .pool-step-subtitle {
    color: rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .pool-step-status {
    color: #374151;
    background: rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .pool-step.is-active {
    background: rgba(236, 72, 153, 0.08);
    border-color: rgba(236, 72, 153, 0.3);
}

html[data-theme="light"] .pool-step.is-active .pool-step-status {
    color: rgba(236, 72, 153, 0.9);
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.35);
}

html[data-theme="light"] .pool-step.is-done {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.3);
}

html[data-theme="light"] .pool-step.is-done .pool-step-status {
    color: rgba(22, 163, 74, 0.9);
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.3);
}

html[data-theme="light"] .pool-step.is-error {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.3);
}

html[data-theme="light"] .pool-step.is-error .pool-step-status {
    color: rgba(239, 68, 68, 0.9);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

html[data-theme="light"] .pool-steps-footnote {
    color: rgba(0, 0, 0, 0.5);
}

/* Chart modal - light mode */
html[data-theme="light"] .chart-modal-backdrop {
    background: rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .chart-modal-content {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .coin-detail-chart-container {
    background: transparent;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.08), inset 0 -12px 20px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .coin-detail-chart-container .chart-load-track {
    background: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .coin-detail-chart-container .chart-load-percent {
    color: rgba(15, 23, 42, 0.8);
}

html[data-theme="light"] .chart-modal-symbol {
    color: #000000;
}

html[data-theme="light"] .chart-modal-price {
    color: #333333;
}

html[data-theme="light"] .chart-meta-item {
    color: #666666;
}

html[data-theme="light"] .time-range-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #666666;
}

html[data-theme="light"] .time-range-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
}

html[data-theme="light"] .time-range-btn.active {
    background: rgb(236, 72, 153);
    color: white;
}

html[data-theme="light"] .chart-modal-stats {
    background: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .chart-stat {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .chart-stat-label {
    color: #666666;
}

html[data-theme="light"] .chart-stat-value {
    color: #000000;
}

html[data-theme="light"] .chart-tooltip {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .chart-tooltip .tooltip-price {
    color: #000000;
}

html[data-theme="light"] .chart-tooltip .tooltip-time {
    color: #666666;
}

html[data-theme="light"] .chart-tooltip .tooltip-date {
    color: #8a8a8a;
}

html[data-theme="light"] .chart-modal-logo {
    background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .pool-modal-title {
    color: #000000;
}

html[data-theme="light"] .pool-input-section {
    background: #d8dde5;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .pool-input-token {
    color: #000000;
}

html[data-theme="light"] .pool-input-balance {
    color: #666666;
}

html[data-theme="light"] .pool-amount-input {
    color: #000000;
}

html[data-theme="light"] .pool-amount-input::placeholder {
    color: #999999;
}

html[data-theme="light"] .pool-usd-value {
    color: #666666;
}

html[data-theme="light"] .pool-percent-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #333333;
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .pool-percent-btn:hover {
    background: rgba(236, 72, 153, 0.1);
    color: rgb(236, 72, 153);
    border-color: rgba(236, 72, 153, 0.3);
}

html[data-theme="light"] .pool-percent-btn.active {
    background: rgba(236, 72, 153, 0.15);
    color: rgb(236, 72, 153);
    border-color: rgba(236, 72, 153, 0.4);
}





















































































/* Toast - Light */
html[data-theme="light"] .toast {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 248, 252, 0.97) 100%);
    color: #1a1a2e;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .toast-text { color: rgba(0,0,0,0.8); }
html[data-theme="light"] .toast-close {
    color: rgba(0,0,0,0.2);
}
html[data-theme="light"] .toast-close:hover {
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .toast-progress { background: rgba(0,0,0,0.03); }

html[data-theme="light"] .toast.info .toast-icon { background: rgba(99, 102, 241, 0.08); color: #6366f1; }
html[data-theme="light"] .toast.info .toast-progress-bar { background: linear-gradient(90deg, rgba(99, 102, 241, 0.5), rgba(99, 102, 241, 0.15)); }
html[data-theme="light"] .toast.info { border-color: rgba(99, 102, 241, 0.12); }

html[data-theme="light"] .toast.success .toast-icon { background: rgba(34, 197, 94, 0.08); color: #16a34a; }
html[data-theme="light"] .toast.success .toast-progress-bar { background: linear-gradient(90deg, rgba(34, 197, 94, 0.5), rgba(34, 197, 94, 0.15)); }
html[data-theme="light"] .toast.success { border-color: rgba(34, 197, 94, 0.15); }

html[data-theme="light"] .toast.error .toast-icon { background: rgba(239, 68, 68, 0.08); color: #dc2626; }
html[data-theme="light"] .toast.error .toast-progress-bar { background: linear-gradient(90deg, rgba(239, 68, 68, 0.5), rgba(239, 68, 68, 0.15)); }
html[data-theme="light"] .toast.error { border-color: rgba(239, 68, 68, 0.15); }

html[data-theme="light"] .toast.warning .toast-icon { background: rgba(251, 191, 36, 0.08); color: #d97706; }
html[data-theme="light"] .toast.warning .toast-progress-bar { background: linear-gradient(90deg, rgba(251, 191, 36, 0.5), rgba(251, 191, 36, 0.15)); }
html[data-theme="light"] .toast.warning { border-color: rgba(251, 191, 36, 0.15); }

/* Scrollbar */
html[data-theme="light"] ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Network dropdown */
html[data-theme="light"] .network-dropdown {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .network-option {
    color: #1d1d1f;
}

html[data-theme="light"] .network-option:hover {
    background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .network-option.selected {
    background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .network-option-name {
    color: #000000;
}

html[data-theme="light"] .network-option-badge {
    color: rgb(22, 163, 74);
    background: rgba(22, 163, 74, 0.12);
}

html[data-theme="light"] .network-logo-box {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .network-selector-arrow {
    color: #000000;
}

html[data-theme="light"] .network-dropdown .network-option {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid transparent;
}

html[data-theme="light"] .network-dropdown .network-option:hover {
    background: rgba(236, 72, 153, 0.08);
    border-color: rgba(236, 72, 153, 0.25);
}

html[data-theme="light"] .network-dropdown .network-option.selected {
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.35);
}

html[data-theme="light"] .network-dropdown .network-option-name {
    font-weight: 600;
    color: #111111;
}

html[data-theme="light"] .network-dropdown .network-logo-box {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .network-dropdown .network-option-badge {
    border: 1px solid rgba(22, 163, 74, 0.2);
}

/* Mobile menu */
html[data-theme="light"] .mobile-menu-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .mobile-menu-dropdown {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.03) inset;
}

html[data-theme="light"] .mobile-menu-item {
    color: rgba(0, 0, 0, 0.6);
}

html[data-theme="light"] .mobile-menu-item {
    color: rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .mobile-menu-item:hover {
    color: #1d1d1f;
    background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .mobile-menu-item.active {
    color: #1d1d1f;
    background: rgba(74, 158, 255, 0.1);
}

/* Claim rewards */
html[data-theme="light"] .claim-rewards-btn {
    background: rgba(236, 72, 153, 0.1);
    color: rgb(236, 72, 153);
}

html[data-theme="light"] .claim-rewards-btn:hover {
    background: rgba(236, 72, 153, 0.15);
}

/* Claim rewards modal - light mode */
html[data-theme="light"] .claim-rewards-modal {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .claim-close-btn {
    color: #666666;
}

html[data-theme="light"] .claim-close-btn:hover {
    color: #000000;
}

html[data-theme="light"] .claim-label {
    color: #666666;
}

html[data-theme="light"] .claim-modal-amount {
    color: #000000;
}

html[data-theme="light"] .claim-modal-btn {
    background: rgb(236, 72, 153);
    color: white;
}

html[data-theme="light"] .claim-modal-btn:hover {
    background: rgb(219, 55, 136);
}

html[data-theme="light"] .claim-modal-btn.claiming {
    background: rgba(236, 72, 153, 0.5);
}

html[data-theme="light"] .claim-modal-btn.success {
    background: rgb(34, 197, 94);
}

/* Send view - comprehensive light mode */
html[data-theme="light"] .send-container {
    color: #000000;
}

html[data-theme="light"] .send-top-section {
    background: #f6f6f8;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

html[data-theme="light"] .send-bottom-section {
    background: #f9f9fb;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

html[data-theme="light"] .send-amount-value {
    color: #000000;
}

html[data-theme="light"] .send-amount-symbol {
    color: #555555;
}

html[data-theme="light"] .send-usd-value {
    color: #666666;
}

html[data-theme="light"] .send-coin-selector {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
}

html[data-theme="light"] .send-coin-selector:hover {
    background: #f2f2f6;
    border-color: rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .send-coin-selector:focus-within {
    border-color: rgba(236, 72, 153, 0.45);
    box-shadow: none;
}

html[data-theme="light"] .send-coin-logo {
    background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .send-coin-name {
    color: #000000;
}

html[data-theme="light"] .send-coin-balance {
    color: #555555;
}

html[data-theme="light"] .send-coin-arrow {
    color: #666666;
}

html[data-theme="light"] .send-coin-dropdown {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .send-coin-option {
    color: #000000;
}

html[data-theme="light"] .send-coin-option:hover {
    background: rgba(127, 102, 255, 0.06);
}

html[data-theme="light"] .send-coin-option span {
    color: #000000;
}

html[data-theme="light"] .send-coin-option .option-balance {
    color: #555555;
}

html[data-theme="light"] .send-coin-network-badge,
html[data-theme="light"] .send-coin-option-network-badge {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .send-address-wrapper {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
}

html[data-theme="light"] .send-address-wrapper:focus-within {
    border-color: rgba(236, 72, 153, 0.45);
    box-shadow: none;
}

html[data-theme="light"] .send-address-input {
    color: #000000;
}

html[data-theme="light"] .send-address-input::placeholder {
    color: #999999;
}

html[data-theme="light"] .send-paste-btn {
    color: #666666;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .send-paste-btn:hover {
    color: var(--app-purple);
}

html[data-theme="light"] .send-percent-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333333;
    box-shadow: none;
}

html[data-theme="light"] .send-percent-btn:hover {
    background: #f2f2f6;
    border-color: rgba(0, 0, 0, 0.16);
    color: #111111;
}

html[data-theme="light"] .send-keypad {
    background: #f7f7fb;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .send-key {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #000000;
    box-shadow: none;
}

html[data-theme="light"] .send-key:hover {
    background: #f2f2f6;
    border-color: rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .send-key:active {
    background: #ededf2;
}

html[data-theme="light"] .send-key-delete {
    color: #666666;
}

html[data-theme="light"] .send-submit-btn {
    background: rgba(236, 72, 153, 0.9);
    color: white;
    border: 1px solid rgba(236, 72, 153, 0.3);
    box-shadow: none;
}

html[data-theme="light"] .send-submit-btn:hover {
    background: rgba(236, 72, 153, 1);
}

html[data-theme="light"] .send-submit-btn:active,
html[data-theme="light"] .send-submit-btn:focus-visible {
    background: rgba(255, 110, 200, 0.95);
}

html[data-theme="light"] .send-submit-btn:disabled {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .send-input-group {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .send-input {
    color: #000000;
}

html[data-theme="light"] .send-input::placeholder {
    color: #999999;
}

html[data-theme="light"] .send-label {
    color: #555555;
}

/* Quick select coins */
html[data-theme="light"] .quick-select-container {
    background: rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .quick-select-coin {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .quick-select-coin:hover {
    background: rgba(127, 102, 255, 0.08);
    border-color: var(--app-purple);
}

/* Floating coins */
html[data-theme="light"] .floating-coin {
    opacity: 0.15;
}

/* Info Section - Swap with confidence */
html[data-theme="light"] .info-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

html[data-theme="light"] .info-text h2 {
    color: #1a1a1a;
    text-shadow: none;
}

html[data-theme="light"] .info-text p,
html[data-theme="light"] .info-text .info-bio {
    color: #666666;
    line-height: 1.7;
}

html[data-theme="light"] .supported-tokens-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .info-stats-header {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(22, 163, 74, 0.04) 100%);
    color: rgb(22, 163, 74);
    border: 1px solid rgba(22, 163, 74, 0.12);
}

html[data-theme="light"] .stats-dot {
    background: rgb(22, 163, 74);
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
}

html[data-theme="light"] .info-stat-item {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

html[data-theme="light"] .info-stat-label {
    color: #888888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

html[data-theme="light"] .info-stat-value {
    color: #1a1a1a;
    font-weight: 700;
}

html[data-theme="light"] .info-stat-green {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.06) 0%, rgba(22, 163, 74, 0.02) 100%);
    border-color: rgba(22, 163, 74, 0.15);
}

html[data-theme="light"] .info-stat-green .info-stat-label {
    color: rgb(22, 163, 74);
}

html[data-theme="light"] .info-stat-green .info-stat-value {
    color: rgb(22, 163, 74);
}

html[data-theme="light"] .feature-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

html[data-theme="light"] .feature-card h3 {
    color: #1a1a1a;
}

html[data-theme="light"] .feature-card p {
    color: #666666;
}

/* Profile Pools - Light Mode */
html[data-theme="light"] .profile-pools-section {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .profile-section-header {
    color: #1f2937;
}

html[data-theme="light"] .profile-pool-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .profile-pool-item:hover {
    background: rgba(236, 72, 153, 0.05);
    border-color: rgba(236, 72, 153, 0.28);
}

html[data-theme="light"] .profile-pool-logo {
    border-color: rgba(255, 255, 255, 0.95);
    background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .profile-pool-name {
    color: #111111;
}

html[data-theme="light"] .profile-pool-amounts {
    color: #1f2937;
}

html[data-theme="light"] .profile-pool-amounts.is-closed {
    color: rgba(15, 23, 42, 0.5);
}

html[data-theme="light"] .profile-menu .profile-pool-name,
html[data-theme="light"] .profile-menu .profile-pool-amounts,
html[data-theme="light"] .profile-menu .profile-section-header,
html[data-theme="light"] .profile-menu .profile-no-pools,
html[data-theme="light"] .profile-menu .profile-no-transactions {
    color: #111111 !important;
}

html[data-theme="light"] .profile-pool-btn {
    background: rgba(15, 23, 42, 0.04);
    color: rgba(15, 23, 42, 0.7);
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .profile-pool-btn:hover {
    background: rgba(236, 72, 153, 0.12);
    color: rgb(236, 72, 153);
    border-color: rgba(236, 72, 153, 0.25);
}

html[data-theme="light"] .profile-pool-btn.pool-btn {
    background: rgba(236, 72, 153, 0.14);
    color: rgb(236, 72, 153);
    border-color: rgba(236, 72, 153, 0.35);
}

html[data-theme="light"] .profile-pool-btn.pool-btn:hover {
    background: rgba(236, 72, 153, 0.22);
}

html[data-theme="light"] .profile-pool-btn.unpool-btn {
    background: rgba(15, 23, 42, 0.04);
    color: rgba(15, 23, 42, 0.7);
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .profile-pool-btn.unpool-btn:hover {
    background: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.9);
}

html[data-theme="light"] .profile-no-pools {
    color: rgba(15, 23, 42, 0.45);
}

/* ============================================================================
   TRANSACTIONS PAGE
   ============================================================================ */

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 5px;
}

.transactions-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #ec4899, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.transactions-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.transactions-stats .stat-item {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.transactions-stats .stat-item strong {
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #22c55e !important;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

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

/* Median Prices View Box */
.median-view-box {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    border: 2px solid rgba(236, 72, 153, 0.4);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 32px rgba(236, 72, 153, 0.2);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.median-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.view-header-left h3 {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
}

.view-subtitle {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.view-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.median-view-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.view-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.view-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.view-stat:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(236, 72, 153, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.25);
}

.view-stat-icon {
    font-size: 28px;
    line-height: 1;
    opacity: 0.9;
}

.view-stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.view-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.view-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
}

.view-top-section {
    margin-top: 24px;
}

.view-section-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-loading {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.view-top-coins {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.view-coin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.view-coin-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(236, 72, 153, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.2);
}

.view-coin-symbol {
    font-size: 15px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-coin-price {
    font-size: 15px;
    font-weight: 700;
    color: #10b981;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
}

/* Light theme overrides for view box */
html[data-theme="light"] .median-view-box {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-color: rgba(236, 72, 153, 0.35);
    box-shadow: 0 8px 32px rgba(236, 72, 153, 0.15);
}

html[data-theme="light"] .median-view-header {
    border-bottom-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .view-header-left h3 {
    color: #1d1d1f;
}

html[data-theme="light"] .view-subtitle {
    color: rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .view-stat {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .view-stat:hover {
    background: white;
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.15);
}

html[data-theme="light"] .view-stat-label {
    color: rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .view-stat-value {
    color: #1d1d1f;
}

html[data-theme="light"] .view-section-title {
    color: rgba(0, 0, 0, 0.75);
}

html[data-theme="light"] .view-loading {
    color: rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .view-coin-item {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .view-coin-item:hover {
    background: white;
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.15);
}

html[data-theme="light"] .view-coin-symbol {
    color: rgba(0, 0, 0, 0.75);
}

html[data-theme="light"] .view-coin-price {
    color: #059669;
}

@media (max-width: 768px) {
    .median-view-box {
        padding: 20px 18px;
    }

    .median-view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .view-header-left h3 {
        font-size: 20px;
    }

    .view-subtitle {
        font-size: 12px;
    }

    .view-stat-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .view-stat {
        padding: 16px;
    }

    .view-stat-icon {
        font-size: 24px;
    }

    .view-stat-value {
        font-size: 16px;
    }

    .view-section-title {
        font-size: 14px;
    }

    .view-top-coins {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .view-coin-item {
        padding: 14px 16px;
    }

    .view-coin-symbol,
    .view-coin-price {
        font-size: 14px;
    }
}


.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 450px;
    max-height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 28px 36px;
    position: relative;
    z-index: 100;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 18px;
    border: 1px solid rgba(236, 72, 153, 0.3);
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;

    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    contain: layout style paint;
}

.transactions-list::-webkit-scrollbar {
    width: 6px;
}

.transactions-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.transactions-list::-webkit-scrollbar-thumb {
    background: rgba(236, 72, 153, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.transactions-list::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 72, 153, 0.5);
}

/* Transactions footer with stats */
.transactions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 36px;
    margin-top: 24px;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
    border-top: 1px solid rgba(236, 72, 153, 0.25);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
}

.transactions-stat-left,
.transactions-stat-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transactions-footer .stat-item {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.transactions-footer .stat-item strong {
    color: #ec4899;
    font-size: 15px;
    font-weight: 700;
}

.transactions-footer .live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
}

.transactions-footer .live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

#transactionsTab .transaction-item {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 14px 20px !important;
    display: block !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    cursor: default !important;
    overflow: visible !important;
    margin-bottom: 0 !important;

    /* GPU acceleration for ultra-smooth performance */
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    contain: layout style paint;
}

/* Smooth animation for new transactions at top - optimized for infinite loading */
.transaction-item.new-transaction {
    animation: newTransactionSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    position: relative;
    z-index: 10;
    will-change: transform, opacity;
}

@keyframes newTransactionSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#transactionsTab .transaction-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
}

#transactionsTab .transaction-item::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

#transactionsTab .transaction-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

#transactionsTab .transaction-time-main {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace !important;
    letter-spacing: -0.5px !important;
    min-width: 240px !important;
}

#transactionsTab .transaction-summary {
    flex: 1 !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.65) !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
}

#transactionsTab .transaction-expand-icon {
    display: none !important;
}

#transactionsTab .transaction-item:hover .transaction-expand-icon {
    display: none !important;
}

#transactionsTab .transaction-item.expanded .transaction-expand-icon {
    display: none !important;
}

/* Inline price tags on right side */
#transactionsTab .transaction-prices-inline {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
}

#transactionsTab .tx-price-tag {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 10px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace !important;
}

#transactionsTab .tx-onramp-tag {
    background: rgba(34, 197, 94, 0.12) !important;
    border: 1px solid rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
}
#transactionsTab .tx-onramp-tag .tx-price-sym {
    color: #22c55e !important;
    font-weight: 700 !important;
}
#transactionsTab .tx-swap-tag {
    background: rgba(99, 102, 241, 0.12) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    color: #818cf8 !important;
}
#transactionsTab .tx-swap-tag .tx-price-sym {
    color: #6366f1 !important;
    font-weight: 700 !important;
}

#transactionsTab .tx-price-sym {
    color: rgba(236, 72, 153, 0.9) !important;
    font-weight: 600 !important;
}

#transactionsTab .transaction-prices {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 10px !important;
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    margin-top: 12px !important;
    transform-origin: top !important;
    opacity: 0 !important;
    transform: translateY(-5px) scaleY(0.9) !important;
    transition: all 0.3s ease !important;
}

#transactionsTab .transaction-prices[style*="display: grid"] {
    opacity: 1 !important;
    transform: translateY(0) scaleY(1) !important;
}

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

#transactionsTab .price-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 14px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    transition: all 0.2s ease !important;
    min-height: 40px !important;
    opacity: 0 !important;
    transform: translateX(-10px) scale(0.95) !important;
}

#transactionsTab .transaction-prices[style*="display: grid"] .price-row {
    opacity: 1 !important;
    transform: translateX(0) scale(1) !important;
}

#transactionsTab .transaction-prices[style*="display: grid"] .price-row:nth-child(1) {
    transition-delay: 0.06s !important;
}
#transactionsTab .transaction-prices[style*="display: grid"] .price-row:nth-child(2) {
    transition-delay: 0.09s !important;
}
#transactionsTab .transaction-prices[style*="display: grid"] .price-row:nth-child(3) {
    transition-delay: 0.12s !important;
}
#transactionsTab .transaction-prices[style*="display: grid"] .price-row:nth-child(4) {
    transition-delay: 0.15s !important;
}
#transactionsTab .transaction-prices[style*="display: grid"] .price-row:nth-child(5) {
    transition-delay: 0.18s !important;
}
#transactionsTab .transaction-prices[style*="display: grid"] .price-row:nth-child(n+6) {
    transition-delay: 0.21s !important;
}

#transactionsTab .price-row:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

#transactionsTab .price-symbol {
    font-weight: 700 !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

#transactionsTab .price-value {
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'SF Mono', 'Courier New', monospace !important;
    font-weight: 600 !important;
}

@keyframes slideInTransaction {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Smooth animated price update flash for explore page */
.price-update-flash {
    animation: priceFlash 0.8s ease-out;
}

@keyframes priceFlash {
    0% {
        background: rgba(236, 72, 153, 0.3);
        transform: scale(1);
    }
    50% {
        background: rgba(236, 72, 153, 0.15);
        transform: scale(1.05);
    }
    100% {
        background: transparent;
        transform: scale(1);
    }
}

#transactionsTab .transaction-item:hover {
    background: rgba(236, 72, 153, 0.1) !important;
    border-left-color: #ec4899 !important;
    border-color: rgba(236, 72, 153, 0.25) !important;
    transform: translateX(2px) !important;
}

#transactionsTab .transaction-item.expanded {
    background: rgba(236, 72, 153, 0.12) !important;
    border-left-color: #ec4899 !important;
    border-color: rgba(236, 72, 153, 0.3) !important;
    padding-bottom: 22px !important;
}

.transaction-item.missing-transaction {
    background: rgba(239, 68, 68, 0.03);
    border-left-color: rgba(239, 68, 68, 0.5);
    opacity: 0.7;
}

.transaction-item.missing-transaction:hover {
    background: rgba(239, 68, 68, 0.05);
    border-left-color: rgba(239, 68, 68, 0.7);
    cursor: default;
}

.transaction-item.missing-transaction .transaction-time-main {
    color: rgba(239, 68, 68, 0.7);
}

.transaction-item.missing-transaction .missing-label {
    color: rgba(239, 68, 68, 0.6);
    font-weight: 500;
}

.transaction-id {
    font-size: 10px;
    font-weight: 700;
    color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 45px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.transaction-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-type-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
    width: fit-content;
    letter-spacing: 0.3px;
}

.transaction-type-badge.price-update {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.transaction-type-badge.swap {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.transaction-type-badge.transfer {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.transaction-type-badge.pool {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.transaction-type-badge.flip {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.transaction-type-badge.other {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.transaction-swap {
    font-size: 12px;
    line-height: 1.4;
    color: #ffffff;
    word-break: break-word;
}

.price-pair {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 2px;
}

.price-pair strong {
    color: #ec4899;
    font-weight: 700;
}

.more-prices {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-style: italic;
}

.transaction-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.loading-transactions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading-transactions .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(236, 72, 153, 0.2);
    border-top-color: #ec4899;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-transactions p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.no-transactions {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.no-transactions p {
    font-size: 16px;
    margin: 0;
}

/* Ensure transactions tab is below header - FULL WIDTH GRAY BACKGROUND */
#transactionsTab {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 50;
    background: transparent !important;
    min-height: 100vh;
    padding: 0 !important;
    padding-top: calc(70px + 20px) !important;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Ensure header stays above transactions tab */
body:has(#transactionsTab.active) .app-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    background: rgb(26, 26, 29) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

#transactionsTab .explore-container {
    position: relative;
    z-index: 1;
    background: transparent !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
}

#transactionsTab .chrome-prices-container {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

#transactionsTab .chrome-list-content {
    width: 100%;
}

#transactionsTab .chrome-list-content.is-hidden {
    display: none;
}


#transactionsTab .chart-load-progress {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 6px 2% 10px;
    background: transparent;
}

#transactionsTab .chart-load-progress.is-visible {
    display: flex;
}

#transactionsTab .chart-load-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.01em;
    min-width: 110px;
}

#transactionsTab .chart-load-track {
    position: relative;
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

#transactionsTab .chart-load-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.35), rgba(236, 72, 153, 0.95));
    transition: width 0.2s ease;
}

#transactionsTab .chart-load-percent {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    min-width: 36px;
    text-align: right;
}

#transactionsTab .chrome-prices-grid {
    background: transparent !important;
    border: none !important;
    padding: 6px 2% 24px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#transactionsTab .chrome-price-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin: 0;
    border-radius: 14px;
    background: rgb(20, 20, 24);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    content-visibility: auto;
    contain-intrinsic-size: auto 58px;
}

#transactionsTab .chrome-price-row:hover {
    background: rgb(28, 28, 32);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

#transactionsTab .chrome-row-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

#transactionsTab .chrome-coin-wrap {
    position: relative;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

#transactionsTab .chrome-coin-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

#transactionsTab .chrome-network-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(18, 18, 20, 0.9);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

#transactionsTab .chrome-network-badge img {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

#transactionsTab .chrome-coin-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#transactionsTab .chrome-coin-symbol {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.01em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#transactionsTab .chrome-price {
    font-size: 13px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

#transactionsTab .chrome-price.is-loaded {
    color: rgba(255, 255, 255, 0.88);
}

#transactionsTab .coin-mini-chart {
    width: 120px;
    height: 50px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* New RPC Dropdown Styles */
#transactionsTab .chrome-price-row {
    flex-direction: column;
    align-items: stretch;
}

#transactionsTab .chrome-row-main {
    width: 100%;
    justify-content: space-between;
    cursor: pointer;
}

#transactionsTab .chrome-coin-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

#transactionsTab .chrome-rpc-count {
    font-size: 11px;
    color: rgba(127, 102, 255, 0.8);
    font-weight: 500;
}

#transactionsTab .chrome-price-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

#transactionsTab .chrome-expand-icon {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
}

#transactionsTab .chrome-price-row.expanded .chrome-expand-icon {
    transform: rotate(180deg);
}

/* RPC Dropdown */
#transactionsTab .rpc-dropdown {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#transactionsTab .rpc-dropdown-header {
    display: grid;
    grid-template-columns: 1fr 50px 80px;
    gap: 8px;
    padding: 0 4px 8px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#transactionsTab .rpc-source-row {
    display: grid;
    grid-template-columns: 1fr 50px 80px;
    gap: 8px;
    padding: 8px 4px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

#transactionsTab .rpc-source-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

#transactionsTab .rpc-source-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

#transactionsTab .rpc-source-status {
    font-size: 12px;
    text-align: center;
}

#transactionsTab .rpc-source-row.rpc-active .rpc-source-status {
    color: #4ade80;
}

#transactionsTab .rpc-source-row.rpc-inactive .rpc-source-status {
    color: rgba(255, 255, 255, 0.25);
}

#transactionsTab .rpc-source-price {
    font-size: 13px;
    font-family: 'SF Mono', monospace;
    text-align: right;
}

#transactionsTab .rpc-source-row.rpc-active .rpc-source-price {
    color: rgba(255, 255, 255, 0.9);
}

#transactionsTab .rpc-source-row.rpc-inactive .rpc-source-price {
    color: rgba(255, 255, 255, 0.3);
}

#transactionsTab .rpc-median-row {
    display: grid;
    grid-template-columns: 1fr 50px 80px;
    gap: 8px;
    padding: 10px 4px;
    margin-top: 8px;
    border-top: 1px solid rgba(127, 102, 255, 0.3);
    background: rgba(127, 102, 255, 0.1);
    border-radius: 8px;
}

#transactionsTab .rpc-median-label {
    font-size: 12px;
    font-weight: 700;
    color: rgb(127, 102, 255);
    letter-spacing: 0.05em;
}

#transactionsTab .rpc-median-indicator {
    font-size: 12px;
    text-align: center;
    color: rgb(127, 102, 255);
}

#transactionsTab .rpc-median-price {
    font-size: 14px;
    font-family: 'SF Mono', monospace;
    font-weight: 600;
    text-align: right;
    color: rgb(127, 102, 255);
}

/* Make prices more prominent */
#transactionsTab .chrome-price {
    font-size: 16px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.95);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    -webkit-font-smoothing: antialiased;
}

#transactionsTab .chrome-coin-symbol {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

#transactionsTab .rpc-source-price {
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* Smoother transitions */
#transactionsTab .chrome-price-row {
    transition: all 0.2s ease;
}

#transactionsTab .rpc-dropdown {
    animation: slideDown 0.2s ease;
}

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

/* Better row spacing */
#transactionsTab .rpc-source-row {
    padding: 10px 8px;
    margin: 2px 0;
}

.chart-load-progress--inline {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(240px, 80vw);
}

.chart-load-progress--inline .chart-load-track {
    height: 6px;
}

.chart-load-progress--inline .chart-load-label {
    display: none;
}

.transactions-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.transactions-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.transactions-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.stat-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.stat-item strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Light theme overrides */
html[data-theme="light"] .transactions-header h2 {
    background: linear-gradient(135deg, #ec4899, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html[data-theme="light"] .transactions-stats .stat-item {
    color: rgba(0, 0, 0, 0.6);
}

html[data-theme="light"] .transactions-stats .stat-item strong {
    color: #000000;
}

html[data-theme="light"] .transaction-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .transaction-item:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(236, 72, 153, 0.3);
}

html[data-theme="light"] .transaction-swap {
    color: #000000;
}

html[data-theme="light"] .price-pair strong {
    color: #ec4899;
}

html[data-theme="light"] .more-prices {
    color: rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .transaction-time {
    color: rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .loading-transactions p,
html[data-theme="light"] .no-transactions {
    color: rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .transactions-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .transactions-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .transactions-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] #transactionsTab .tx-price-tag {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] #transactionsTab .tx-price-sym {
    color: rgba(236, 72, 153, 1);
}

/* Light mode: Deposit / Withdraw page */
html[data-theme="light"] .dw-tab {
    color: rgba(0,0,0,0.4);
}
html[data-theme="light"] .dw-tab.active {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .dw-tab:hover:not(.active) {
    color: rgba(0,0,0,0.65);
}
html[data-theme="light"] .dw-tab-speed.fast {
    color: #16a34a;
    background: rgba(22,163,74,0.08);
}
html[data-theme="light"] .dw-tab-speed.slow {
    color: #d97706;
    background: rgba(217,119,6,0.08);
}
html[data-theme="light"] .custom-select-option-symbol {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .custom-select-option-name,
html[data-theme="light"] .custom-select-option-price {
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .custom-select-option-value {
    color: rgba(0,0,0,0.88);
}
html[data-theme="light"] .custom-select-option-balance {
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .custom-select-option {
    background: rgba(0,0,0,0.02);
}
html[data-theme="light"] .custom-select-option:hover {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] .custom-select-option.selected {
    background: rgba(127,102,255,0.08);
    border-color: rgba(127,102,255,0.25);
}
html[data-theme="light"] .custom-select-dropdown.always-open .custom-select-option.selected-coin {
    background: rgba(127,102,255,0.08);
    border-color: rgba(127,102,255,0.25);
}
html[data-theme="light"] .deposit-panel-coin-name {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .deposit-panel-coin-balance {
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .deposit-amount-value,
html[data-theme="light"] .withdraw-amount-value {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .deposit-amount-usd,
html[data-theme="light"] .withdraw-amount-usd {
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .deposit-slider,
html[data-theme="light"] .withdraw-slider {
    background: rgba(0,0,0,0.1);
}
html[data-theme="light"] .deposit-percent-btn,
html[data-theme="light"] .withdraw-percent-btn {
    border-color: rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.03);
    color: rgba(0,0,0,0.6);
}
html[data-theme="light"] .deposit-percent-btn:hover,
html[data-theme="light"] .deposit-percent-btn.active,
html[data-theme="light"] .withdraw-percent-btn:hover,
html[data-theme="light"] .withdraw-percent-btn.active {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .deposit-panel {
    border-top-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .deposit-receive-label,
html[data-theme="light"] .withdraw-receive-label {
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .deposit-receive-amount,
html[data-theme="light"] .withdraw-receive-amount {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .deposit-receive-row,
html[data-theme="light"] .withdraw-receive-row {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .withdraw-coin-name {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .withdraw-coin-balance {
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .withdraw-coin-usd {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .withdraw-coin-amount {
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .withdraw-coin-row {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .withdraw-info-note span {
    color: rgba(0,0,0,0.4);
}
html[data-theme="light"] .paypal-balance-row {
    background: rgba(0,0,0,0.025);
    border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .paypal-balance-label,
html[data-theme="light"] .paypal-section-label {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .paypal-balance-value {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .paypal-currency-sign {
    color: rgba(0,0,0,0.25);
}
html[data-theme="light"] .paypal-amount-input {
    background: rgba(0,0,0,0.025);
    border-color: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .paypal-amount-input:focus {
    border-color: rgba(0,112,186,0.5);
    box-shadow: 0 0 0 3px rgba(0,112,186,0.06);
}
html[data-theme="light"] .paypal-amount-input::placeholder {
    color: rgba(0,0,0,0.15);
}
html[data-theme="light"] .paypal-preset-btn {
    border-color: rgba(0,0,0,0.08);
    background: rgba(0,0,0,0.02);
    color: rgba(0,0,0,0.45);
}
html[data-theme="light"] .paypal-preset-btn:hover {
    background: rgba(0,0,0,0.05);
    color: rgba(0,0,0,0.8);
}
html[data-theme="light"] .paypal-preset-btn.active {
    background: rgba(0,112,186,0.08);
    border-color: rgba(0,112,186,0.3);
    color: #0070ba;
}
html[data-theme="light"] .paypal-summary {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .paypal-summary-row {
    color: rgba(0,0,0,0.45);
}
html[data-theme="light"] .paypal-summary-row span:last-child {
    color: rgba(0,0,0,0.9);
}
html[data-theme="light"] .paypal-summary-divider {
    background: rgba(0,0,0,0.06);
}
html[data-theme="light"] .paypal-info-note {
    color: rgba(0,0,0,0.25);
}
html[data-theme="light"] .paypal-checkout-btn:disabled {
    background: rgba(0,0,0,0.05);
    color: rgba(0,0,0,0.25);
}

html[data-theme="light"] .header-dw-btn.tab-btn {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.7);
}
html[data-theme="light"] .header-dw-btn.tab-btn:hover {
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.9);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .transactions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .transactions-stats {
        width: 100%;
        justify-content: space-between;
    }

    .transaction-item {
        padding: 16px;
    }

    .transaction-id {
        font-size: 11px;
        padding: 4px 8px;
        min-width: 50px;
    }

    .transaction-swap {
        font-size: 13px;
    }

    .transactions-list {
        max-height: calc(100vh - 350px);
    }
}

/* Chrome Prices Section - Full Width */
.chrome-prices-container {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    opacity: 1;
    transition: none;
}

.chrome-prices-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.chrome-price-row {
    width: 100%;
    box-sizing: border-box;
}

.chrome-prices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(66, 133, 244, 0.1);
}

.chrome-prices-header h3 {
    color: #4285f4;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    opacity: 1;
}

.chrome-sources {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(66, 133, 244, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(66, 133, 244, 0.15);
    opacity: 1;
}

/* Chrome Prices progressive loading animation */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Protocol Stats Section */
.protocol-stats-section {
    background: var(--dark-background);
    padding: 60px 20px 80px;
    margin-top: 40px;
}

.protocol-stats-title {
    font-size: 28px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.protocol-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.protocol-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px 24px;
    transition: all 0.3s ease;
}

.protocol-stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.protocol-stat-card.highlight {
    background: rgba(0, 255, 136, 0.05);
    border-color: rgba(0, 255, 136, 0.2);
}

.protocol-stat-card.highlight:hover {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.3);
}

.protocol-stat-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.protocol-stat-card.highlight .protocol-stat-label {
    color: rgba(0, 255, 136, 0.8);
}

.protocol-stat-value {
    font-size: 42px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'SF Mono', monospace;
}

.protocol-stat-card.highlight .protocol-stat-value {
    color: #00ff88;
}

@media (max-width: 768px) {
    .protocol-stats-grid {
        grid-template-columns: 1fr;
    }
    .protocol-stat-value {
        font-size: 36px;
    }
}

/* Smooth animations for coin detail page */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimize coin detail page transitions */
.coin-detail-page {
    will-change: opacity, transform;
}

.coin-detail-back {
    transition: all 0.15s ease-out;
}

.coin-detail-back:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    transform: translateX(-4px);
}

/* Smooth chrome price row transitions */
.chrome-price-row {
    transition: background 0.2s ease-out, border-color 0.2s ease-out, transform 0.15s ease-out;
}

.chrome-price-row:hover {
    transform: translateY(-1px);
}

.chrome-price-row:active {
    transform: scale(0.99);
}

/* ========================================
   CROSS-BROWSER OPTIMIZATIONS FOR CHROME
   ======================================== */

/* Smooth animations - Chrome & Safari compatible */
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(10px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
}

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

/* Hardware acceleration for smooth 60fps on Chrome */
.coin-detail-page {
    will-change: opacity, transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.coin-detail-back {
    -webkit-transition: all 0.15s ease-out;
    transition: all 0.15s ease-out;
    -webkit-tap-highlight-color: transparent;
}

.coin-detail-back:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    -webkit-transform: translateX(-4px);
    transform: translateX(-4px);
}

/* Chrome-optimized row transitions with GPU acceleration */
.chrome-price-row {
    -webkit-transition: background 0.2s ease-out, border-color 0.2s ease-out, -webkit-transform 0.15s ease-out;
    transition: background 0.2s ease-out, border-color 0.2s ease-out, transform 0.15s ease-out;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-tap-highlight-color: transparent;
}

.chrome-price-row:hover {
    -webkit-transform: translateY(-1px) translateZ(0);
    transform: translateY(-1px) translateZ(0);
}

.chrome-price-row:active {
    -webkit-transform: scale(0.99) translateZ(0);
    transform: scale(0.99) translateZ(0);
}

/* Optimize chart rendering on Chrome */
canvas.coin-mini-chart {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ── Profile Buy Button ── */
.profile-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 2px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ec4899, #db2777);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.profile-buy-btn:hover {
    background: linear-gradient(135deg, #f472b6, #ec4899);
}
.profile-buy-btn:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   Music Prediction Markets
   ═══════════════════════════════════════════════ */

/* Music balance chip in header */
.dw-icon {
    display: none;
}

.header-dw-btn.tab-btn,
.header-music-btn.tab-btn {
    padding: 5px 11px;
    font-size: 11px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.header-dw-btn.tab-btn:hover,
.header-music-btn.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: none;
}
.header-dw-btn.tab-btn.active {
    background: rgba(56, 142, 255, 0.12);
    border-color: rgba(56, 142, 255, 0.3);
    color: #fff;
    transform: none;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.header-music-btn.tab-btn.active {
    background: rgba(56, 142, 255, 0.12);
    border-color: rgba(56, 142, 255, 0.3);
    color: #fff;
    transform: none;
    letter-spacing: 0.04em;
    font-weight: 600;
}




/* ══════════════════════════════════════════════════
   CRASH GAME — PRO UI
══════════════════════════════════════════════════ */
/* ── Header USDC balance chip ────────────────── */
.header-usdc-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    cursor: default;
    flex-shrink: 0;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.header-usdc-chip.bal-up {
    background: rgba(0,214,143,0.12);
    border-color: rgba(0,214,143,0.35);
    box-shadow: 0 0 10px rgba(0,214,143,0.18);
}
.header-usdc-chip.bal-down {
    background: rgba(255,68,84,0.12);
    border-color: rgba(255,68,84,0.35);
    box-shadow: 0 0 10px rgba(255,68,84,0.18);
}
.header-usdc-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
#headerUsdcBal {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.header-tower-btn.tab-btn, .header-flip-btn.tab-btn { display: none; }
@media (min-width: 901px) { .header-tower-btn.tab-btn, .header-flip-btn.tab-btn { display: inline-flex; } }

.header-crash-btn.tab-btn,
.header-pred-btn.tab-btn,
.header-tower-btn.tab-btn,
.header-flip-btn.tab-btn {
    padding: 5px 11px;
    font-size: 11px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.header-crash-btn.tab-btn:hover,
.header-pred-btn.tab-btn:hover,
.header-tower-btn.tab-btn:hover,
.header-flip-btn.tab-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
    transform: none;
}
.header-crash-btn.tab-btn.active,
.header-pred-btn.tab-btn.active,
.header-tower-btn.tab-btn.active,
.header-flip-btn.tab-btn.active {
    background: linear-gradient(135deg, rgba(56,142,255,0.14), rgba(127,102,255,0.12));
    border-color: rgba(56, 142, 255, 0.25);
    color: #fff;
    transform: none;
    letter-spacing: 0.04em;
    font-weight: 600;
    box-shadow: 0 0 16px rgba(56,142,255,0.08), 0 0 0 1px rgba(56,142,255,0.06) inset;
}

/* ── Page ─────────────────────────────────────── */
.crash-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 106px);
    padding: 0 0 48px;
    gap: 8px;
    box-sizing: border-box;
    overflow: hidden;
}

/* ── History bar ──────────────────────────────── */
.crash-history-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    height: 40px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 20px;
    background: rgba(12, 12, 16, 0.95);
    border-top: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body:has(#crashTab.active) .crash-history-bar {
    opacity: 1;
    visibility: visible;
    animation: crashBarFadeIn 0.4s ease 0.3s both;
}

@keyframes crashBarFadeIn {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes crashBarIn {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes crashElIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.crash-history-bar::after {
    display: none;
}
.crash-history-label {
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,0.35);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.crash-history-pills {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}
.crash-history-pills::-webkit-scrollbar { display: none; }
.crash-hist-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 0;
    border-radius: 6px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex: 1;
    min-width: 52px;
    max-width: 80px;
    cursor: default;
    font-variant-numeric: tabular-nums;
    border: none;
    text-align: center;
    transition: transform 0.15s ease;
}
.crash-hist-pill:hover {
    transform: translateY(-1px);
}
.crash-hist-pill.hi {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
}
.crash-hist-pill.mid {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
}
.crash-hist-pill.lo {
    background: rgba(239,68,68,0.12);
    color: #f87171;
}

/* ── Main grid ────────────────────────────────── */
.crash-main {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 12px;
    flex: 1;
    min-height: 0;
    padding: 0 20px;
}

/* ── Chart box ────────────────────────────────── */
.crash-chart-box {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    min-height: 0;
    opacity: 1;
}
#crashCanvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}

/* ── Multiplier overlay ───────────────────────── */
.crash-mult-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    text-align: center;
    z-index: 2;
}
.crash-mult-overlay::before { display: none; }
.crash-mult-val {
    font-size: 64px;
    font-weight: 700;
    color: #22c55e;
    line-height: 1;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -3px;
    transition: color 0.2s, text-shadow 0.3s;
    text-shadow: none;
}
.crash-mult-overlay.running .crash-mult-val {
    color: #4ade80;
    text-shadow: 0 0 40px rgba(34,197,94,0.15);
}
.crash-mult-overlay.crashed .crash-mult-val {
    color: #ef4444;
    animation: crashShake 0.45s ease-out;
    text-shadow: none;
}
.crash-mult-overlay.cashout .crash-mult-val {
    color: #facc15;
    text-shadow: none;
}
@keyframes crashShake {
    0%   { transform: translateX(0) rotate(0deg); }
    18%  { transform: translateX(-7px) rotate(-1deg); }
    36%  { transform: translateX(7px) rotate(1deg); }
    54%  { transform: translateX(-5px) rotate(-0.6deg); }
    72%  { transform: translateX(4px) rotate(0.5deg); }
    90%  { transform: translateX(-2px); }
    100% { transform: translateX(0) rotate(0deg); }
}
.crash-mult-sub {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.25);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}
.crash-mult-overlay.running .crash-mult-sub   { opacity: 0; }
.crash-mult-overlay.crashed .crash-mult-sub   { color: rgba(239,68,68,0.5); }
.crash-mult-overlay.cashout .crash-mult-sub   { color: rgba(250,204,21,0.5); }

/* ── Countdown badge ──────────────────────────── */
.crash-cd-badge {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    background: rgba(18,20,28,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    z-index: 3;
    white-space: nowrap;
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    letter-spacing: 1px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.05) inset;
}
.crash-cd-badge.entering {
    transform: translateX(-50%) scale(0.85);
    opacity: 0;
}
.crash-cd-badge strong {
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 15px;
    display: inline-block;
    min-width: 1ch;
    text-align: center;
}
.crash-cd-badge strong.tick {
    animation: cdNumPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cdNumPop {
    0%   { transform: scale(1.5); opacity: 0.5; }
    50%  { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes cdBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
    50%      { box-shadow: 0 0 12px 2px rgba(255,255,255,0.06); }
}

/* Waiting state multiplier pulse */
.crash-mult-overlay.waiting .crash-mult-val {
    animation: waitingPulse 2.5s ease-in-out infinite;
}
@keyframes waitingPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.03); }
}

/* Launch transition — running mult scales in */
.crash-mult-overlay.running .crash-mult-val {
    animation: multLaunch 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes multLaunch {
    0%   { transform: scale(0.8); opacity: 0.3; }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Control panel ────────────────────────────── */
.crash-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 0;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: none;
    opacity: 1;
}
.crash-panel::-webkit-scrollbar { display: none; }

/* Sections */
.crash-panel-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.crash-panel-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Input + amount row */
.crash-amt-row {
    display: flex;
    align-items: center;
    gap: 7px;
}
.crash-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.crash-input-prefix {
    position: absolute;
    left: 13px;
    font-size: 17px;
    font-weight: 700;
    color: rgba(255,255,255,0.38);
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}
.crash-amt-input {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    padding: 14px 14px 14px 30px;
    outline: none;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    width: 100%;
    transition: border-color 0.15s;
}
.crash-amt-input::-webkit-inner-spin-button,
.crash-amt-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.crash-amt-input:focus {
    border-color: rgba(255,255,255,0.15);
}
.crash-amt-suffix {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.28);
    flex-shrink: 0;
}

/* Presets */
.crash-presets {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    margin-top: 4px;
}
.crash-preset {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}
.crash-preset:hover {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
}
.crash-preset:active {
    background: rgba(255,255,255,0.06);
}

/* Auto cash out toggle */
.crash-auto-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.crash-toggle-wrap {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.crash-toggle-chk { display: none; }
.crash-toggle-pill {
    display: block;
    width: 40px;
    height: 22px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    position: relative;
    transition: background 0.22s, border-color 0.22s;
    cursor: pointer;
}
.crash-toggle-pill::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    transition: transform 0.22s, background 0.22s;
}
.crash-toggle-chk:checked + .crash-toggle-pill {
    background: #22c55e;
    border-color: rgba(34,197,94,0.5);
}
.crash-toggle-chk:checked + .crash-toggle-pill::after {
    transform: translateX(18px);
    background: #fff;
}

/* Start / Auto row (kept for compat but hidden) */
.crash-start-row { display: none; }

/* ── Live connection dot ──────────────────────── */
.crash-conn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.4s;
}
.crash-conn-dot.live {
    background: #4ade80;
}
.crash-conn-dot.connecting {
    background: rgba(255,255,255,0.25);
    animation: connBlink 1s ease-in-out infinite alternate;
}
@keyframes connPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(34,197,94,0.5); }
    50%       { box-shadow: 0 0 10px rgba(34,197,94,0.9); }
}
@keyframes connBlink {
    from { opacity: 0.3; }
    to   { opacity: 0.8; }
}

/* ── Balance row ──────────────────────────────── */
.crash-balance-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.crash-balance-label {
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 1.6px;
    flex: 1;
}
.crash-balance-val {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}
.crash-balance-unit {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── Panel spacer ─────────────────────────────── */
.crash-panel-spacer { flex: 1; min-height: 0; }

/* ── Toast notification area (floats over chart) ── */
.crash-toast-area {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
    max-width: 260px;
}
.crash-toast-area > * {
    pointer-events: auto;
}
.crash-toast {
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
    animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.crash-toast-area .crash-msg {
    text-align: right;
    font-size: 11px;
    min-height: 0;
    padding: 6px 10px;
    background: rgba(14,14,18,0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.crash-toast-area .crash-msg:empty {
    display: none;
}

/* ── Bets box ─────────────────────────────────── */
.crash-bets-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 14px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.crash-bets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.crash-bets-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.crash-bets-num {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}
.crash-bets-lbl {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.28);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.crash-your-bet {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset;
}
.crash-your-bet-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.28);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    flex: 1;
}
.crash-your-bet-val {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.crash-your-bet-status {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}
.crash-your-bet-status.queued {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}
.crash-your-bet-status.active {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.22);
}
.crash-your-bet-status.cashout {
    background: rgba(250,204,21,0.1);
    color: #fbbf24;
    border: 1px solid rgba(250,204,21,0.2);
}

/* ── Next-round queue ────────────────────────── */
.crash-next-queue {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(167,139,250,0.04);
    border: 1px solid rgba(167,139,250,0.1);
    border-radius: 12px;
}
.crash-next-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.crash-next-queue-label {
    font-size: 9px;
    font-weight: 800;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}
.crash-next-queue-count {
    font-size: 9px;
    font-weight: 700;
    color: rgba(167,139,250,0.6);
}
.crash-next-queue-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 110px;
    overflow-y: auto;
    scrollbar-width: none;
}
.crash-next-queue-list::-webkit-scrollbar { display: none; }
.crash-nq-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
}
.crash-nq-av {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.crash-nq-addr {
    flex: 1;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    font-family: 'JetBrains Mono', monospace;
}
.crash-nq-amt {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    font-variant-numeric: tabular-nums;
}
@keyframes nqRowIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes nqRowOut {
    from { opacity: 1; transform: translateY(0); max-height: 28px; }
    to   { opacity: 0; transform: translateY(-4px); max-height: 0; padding: 0; margin: 0; }
}

/* ── Potential payout row ─────────────────────── */
.crash-potential-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(34,197,94,0.04);
    border: 1px solid rgba(34,197,94,0.1);
    border-radius: 10px;
    padding: 10px 14px;
    flex-shrink: 0;
}
.crash-potential-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.crash-potential-item:last-child { align-items: flex-end; }
.crash-potential-label {
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.crash-potential-val {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.crash-potential-val.green { color: #4ade80; }
.crash-potential-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.07);
    flex-shrink: 0;
    margin: 0 10px;
}

/* Crash action bar — contains Buy/CashOut buttons */
.crash-action-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.crash-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
/* On desktop, action-wager placeholder is empty (wager stays in panel) */
.crash-action-wager:empty { display: none; }
/* Hide fixed action bar when crash tab is not active */
#crashTab:not(.active) .crash-action-bar {
    display: none !important;
}

/* Divider above buttons */
.crash-btn-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    flex-shrink: 0;
    margin: 2px 0;
}

/* Buy Next Round */
.crash-btn-buy {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 3px solid rgba(10,80,30,0.7);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(0,0,0,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    width: 100%;
    transition: all 0.15s ease;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}
.crash-btn-buy:hover:not(:disabled) {
    background: linear-gradient(180deg, #2dd864 0%, #1aaf52 100%);
}
.crash-btn-buy:active:not(:disabled) {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
    border-bottom-width: 1px;
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.crash-btn-buy:disabled { opacity: 0.28; cursor: default; }
.crash-btn-buy.locked {
    background: rgba(255,255,255,0.04);
    color: #888;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: none;
    opacity: 1;
    cursor: not-allowed;
}
.crash-btn-buy.queued {
    background: rgba(34,197,94,0.06);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.18);
    box-shadow: 0 0 20px rgba(34,197,94,0.08);
    animation: queuedPulse 2s ease-in-out infinite;
}
@keyframes queuedPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(34,197,94,0.08); }
    50%      { box-shadow: 0 0 28px rgba(34,197,94,0.15); }
}

/* Cash Out */
.crash-btn-cashout {
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    color: rgba(255,255,255,0.25);
    font-size: 16px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 3px solid rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 18px;
    cursor: default;
    width: 100%;
    letter-spacing: 0.2px;
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.crash-btn-cashout.active {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 3px solid rgba(120,15,15,0.7);
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(0,0,0,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.crash-btn-cashout.active:hover {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
}
.crash-btn-cashout.active:active {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    border-bottom-width: 1px;
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.crash-btn-cashout:disabled { opacity: 0.35; }

/* Message */
.crash-msg {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-align: center;
    min-height: 0;
    flex-shrink: 0;
    letter-spacing: 0.4px;
}
.crash-msg.win  { color: #4ade80; }
.crash-msg.loss { color: #f87171; }

/* Mobile */
@media (max-width: 900px) {
    .crash-page { height: auto; padding: 6px 0 80px; overflow: visible; }
    .crash-bets-box { display: none !important; }
    .crash-feed { display: none !important; }
    .crash-main { grid-template-columns: 1fr; gap: 10px; padding: 0 10px; }
    .crash-chart-box { min-height: 280px; height: 280px; border-radius: 14px; }
    .crash-mult-val { font-size: 52px; letter-spacing: -2px; }

    /* Toast area on mobile */
    .crash-toast-area { top: 10px; right: 10px; max-width: 200px; }
    .crash-toast-area .crash-your-bet { padding: 6px 10px; }
    .crash-toast-area .crash-potential-row { padding: 6px 10px; }

    /* Panel wrapper */
    .crash-panel { overflow: visible; max-height: none; gap: 10px; padding: 14px; border-radius: 14px; }
    .crash-panel-section { gap: 6px; }
    .crash-panel-label { font-size: 9px; letter-spacing: 1.4px; }

    /* Amount input row */
    .crash-amt-input { font-size: 16px; padding: 12px 12px 12px 26px; border-radius: 10px; }
    .crash-input-prefix { font-size: 16px; left: 12px; }

    /* Preset buttons */
    .crash-presets { gap: 5px; margin-top: 2px; }
    .crash-preset { padding: 9px 0; font-size: 12px; border-radius: 100px; }

    /* Balance row */
    .crash-balance-row { padding: 8px 12px; border-radius: 10px; }
    .crash-balance-val { font-size: 14px; }

    /* Fixed action bar — pinned above mobile nav bar */
    .crash-action-bar {
        position: fixed;
        bottom: calc(58px + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        z-index: 9998;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
        background: rgba(20, 20, 24, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255,255,255,0.06);
    }

    /* Wager section inside action bar on mobile */
    .crash-action-wager { width: 100%; margin-bottom: 6px; }
    .crash-action-wager .crash-panel-section { gap: 6px; }
    .crash-action-wager .crash-panel-label { font-size: 9px; letter-spacing: 1.4px; }
    .crash-action-wager .crash-amt-input { font-size: 16px; padding: 10px 10px 10px 24px; border-radius: 10px; }
    .crash-action-wager .crash-input-prefix { font-size: 16px; left: 10px; }
    .crash-action-wager .crash-presets { gap: 5px; margin-top: 2px; }
    .crash-action-wager .crash-preset { padding: 7px 0; font-size: 11px; border-radius: 100px; }

    /* Buttons row — side by side */
    .crash-action-buttons { flex-direction: row; gap: 8px; }
    .crash-btn-buy { border-radius: 12px; padding: 14px 8px; font-size: 14px; font-weight: 700; flex: 1; min-width: 0; }
    .crash-btn-cashout { border-radius: 12px; padding: 14px 8px; font-size: 14px; font-weight: 700; flex: 1; min-width: 0; }

    /* Extra bottom padding on crash page to clear fixed action bar */
    .crash-page { padding-bottom: 220px !important; }

    .crash-msg { font-size: 11px; min-height: 0; }

    .crash-right-col { gap: 8px; }
    .crash-feed { padding: 10px; border-radius: 14px; max-height: 300px; overflow: hidden; }
    .crash-feed-list { overflow-y: auto; max-height: 260px; }
    .crash-feed-row { padding: 7px 10px; gap: 8px; border-radius: 10px; }
    .crash-feed-av { width: 24px; height: 24px; font-size: 9px; }
    .crash-feed-addr { font-size: 10px; }
    .crash-feed-mult { font-size: 10px; padding: 3px 6px; }
    .crash-feed-pnl { font-size: 11px; min-width: 44px; }

    /* Disable entrance animations on mobile for snappier feel */
    .crash-chart-box,
    .crash-panel,
    .crash-feed { animation: none; opacity: 1; }
    .crash-history-bar { animation: none; opacity: 1; }

    /* Remove glow orbs on mobile (performance) */
    .exchange-container:has(#crashTab.active)::before,
    .exchange-container:has(#crashTab.active)::after { display: none; }
}

/* ── Crash Light Mode ────────────────────────────────── */
html[data-theme="light"] .crash-chart-box {
    background: rgba(245,245,247,0.95);
    border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .crash-panel {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .crash-panel-label {
    color: rgba(0,0,0,0.45);
}
html[data-theme="light"] .crash-amt-input {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: #111;
}
html[data-theme="light"] .crash-amt-input:focus {
    border-color: rgba(34,197,94,0.4);
}
html[data-theme="light"] .crash-input-prefix {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .crash-preset {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .crash-preset:hover {
    background: rgba(0,0,0,0.08);
    color: #111;
}
html[data-theme="light"] .crash-balance-row {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .crash-balance-label {
    color: rgba(0,0,0,0.4);
}
html[data-theme="light"] .crash-balance-val {
    color: #111;
}
html[data-theme="light"] .crash-balance-unit {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .crash-btn-buy {
    background: #16a34a;
}
html[data-theme="light"] .crash-btn-buy:hover:not(:disabled) {
    background: #22c55e;
}
html[data-theme="light"] .crash-btn-cashout {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.25);
}
html[data-theme="light"] .crash-btn-cashout.active {
    background: #d42d2d;
    color: #fff;
    border-color: transparent;
}
html[data-theme="light"] .crash-btn-divider {
    background: rgba(0,0,0,0.06);
}
html[data-theme="light"] .crash-history-label {
    color: rgba(0,0,0,0.3);
}
html[data-theme="light"] .crash-hist-pill.hi {
    background: rgba(34,197,94,0.08);
    color: #16a34a;
    border-color: rgba(34,197,94,0.2);
}
html[data-theme="light"] .crash-hist-pill.lo {
    background: rgba(239,68,68,0.06);
    color: #dc2626;
    border-color: rgba(239,68,68,0.15);
}
html[data-theme="light"] .crash-mult-sub {
    color: rgba(0,0,0,0.3);
}
html[data-theme="light"] .crash-status-text {
    color: rgba(0,0,0,0.7);
}
html[data-theme="light"] .crash-cd-badge {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.55);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
html[data-theme="light"] .crash-cd-badge strong {
    color: rgba(0,0,0,0.85);
}
html[data-theme="light"] .crash-bets-box {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .crash-bets-num {
    color: #111;
}
html[data-theme="light"] .crash-bets-lbl {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .crash-your-bet {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .crash-your-bet-label {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .crash-your-bet-val {
    color: #111;
}
html[data-theme="light"] .crash-potential-row {
    background: rgba(34,197,94,0.05);
    border-color: rgba(34,197,94,0.12);
}
html[data-theme="light"] .crash-potential-label {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .crash-potential-val {
    color: #111;
}
html[data-theme="light"] .crash-potential-divider {
    background: rgba(0,0,0,0.08);
}
html[data-theme="light"] .crash-msg {
    color: rgba(0,0,0,0.25);
}
html[data-theme="light"] .crash-msg.win { color: #16a34a; }
html[data-theme="light"] .crash-msg.loss { color: #dc2626; }
html[data-theme="light"] .crash-conn-dot.live {
    background: #16a34a;
}
html[data-theme="light"] .crash-spinner {
    border-color: rgba(0,0,0,0.08);
    border-top-color: rgba(34,197,94,0.6);
}
html[data-theme="light"] .crash-amt-suffix {
    color: rgba(0,0,0,0.3);
}
html[data-theme="light"] .crash-next-queue {
    background: rgba(167,139,250,0.04);
    border-color: rgba(167,139,250,0.1);
}
html[data-theme="light"] .crash-nq-addr {
    color: rgba(0,0,0,0.5);
}
html[data-theme="light"] .crash-nq-amt {
    color: rgba(0,0,0,0.7);
}

/* ── Right column wrapper ────────────────────── */
.crash-right-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

/* ── Live Bet Feed ───────────────────────────── */
.crash-feed {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    opacity: 1;
}
.crash-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-shrink: 0;
}
.crash-feed-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.crash-feed-count {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
    padding: 2px 7px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
}
.crash-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: none;
}
.crash-feed-list::-webkit-scrollbar { display: none; }

/* ── Feed row ────────────────────────────────── */
.crash-feed-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-radius: 0;
    font-variant-numeric: tabular-nums;
    animation: feedSlideIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    transition: opacity 0.3s, transform 0.3s;
}
.crash-feed-row.removing {
    opacity: 0;
    transform: translateX(16px) scale(0.97);
}
@keyframes feedSlideIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Avatar */
.crash-feed-av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,0.85);
    flex-shrink: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Info block (addr + bet) */
.crash-feed-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}
.crash-feed-addr {
    color: rgba(255,255,255,0.5);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.crash-feed-bet {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.2px;
}

/* Multiplier pill */
.crash-feed-mult {
    font-weight: 700;
    font-size: 11px;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}
.crash-feed-row.win .crash-feed-mult {
    color: #4ade80;
    background: rgba(34,197,94,0.1);
}
.crash-feed-row.loss .crash-feed-mult {
    color: #f87171;
    background: rgba(239,68,68,0.08);
}
.crash-feed-row.live .crash-feed-mult {
    color: #fbbf24;
    background: rgba(250,204,21,0.08);
}

/* Profit / loss */
.crash-feed-pnl {
    font-weight: 700;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
    min-width: 48px;
    flex-shrink: 0;
}
.crash-feed-row.win  .crash-feed-pnl { color: #4ade80; }
.crash-feed-row.loss .crash-feed-pnl { color: #f87171; }
.crash-feed-row.live .crash-feed-pnl { color: #fbbf24; }

/* Row color variants */
.crash-feed-row.win {
    border-bottom-color: rgba(34,197,94,0.08);
}
.crash-feed-row.loss {
    border-bottom-color: rgba(239,68,68,0.06);
}
.crash-feed-row.live {
    border-bottom-color: rgba(250,204,21,0.08);
}

/* ── Feed light mode ─────────────────────────── */
html[data-theme="light"] .crash-feed {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .crash-feed-label {
    color: rgba(0,0,0,0.35);
}
html[data-theme="light"] .crash-feed-count {
    color: rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.04);
}
html[data-theme="light"] .crash-feed-row {
    background: rgba(0,0,0,0.015);
    border-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .crash-feed-av {
    color: rgba(255,255,255,0.9);
}
html[data-theme="light"] .crash-feed-addr {
    color: rgba(0,0,0,0.45);
}
html[data-theme="light"] .crash-feed-bet {
    color: rgba(0,0,0,0.3);
}
html[data-theme="light"] .crash-feed-row.win {
    background: rgba(22,163,74,0.03);
    border-color: rgba(22,163,74,0.12);
}
html[data-theme="light"] .crash-feed-row.loss {
    background: rgba(220,38,38,0.02);
    border-color: rgba(220,38,38,0.1);
}
html[data-theme="light"] .crash-feed-row.win  .crash-feed-mult { color: #16a34a; background: rgba(22,163,74,0.08); }
html[data-theme="light"] .crash-feed-row.loss .crash-feed-mult { color: #dc2626; background: rgba(220,38,38,0.06); }
html[data-theme="light"] .crash-feed-row.win  .crash-feed-pnl { color: #16a34a; }
html[data-theme="light"] .crash-feed-row.loss .crash-feed-pnl { color: #dc2626; }
html[data-theme="light"] .crash-feed-row.live .crash-feed-mult { color: #ca8a04; background: rgba(202,138,4,0.08); }
html[data-theme="light"] .crash-feed-row.live .crash-feed-pnl { color: #ca8a04; }

/* ── TX Status Banners ─────────────────────────────────── */
.tx-status-container {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.tx-status-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(36, 36, 38, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    font-family: var(--rounded-font);
    font-size: 13px;
    color: #fff;
    min-width: 220px;
    animation: txBannerIn 0.25s ease;
}

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

.tx-status-pending { border-color: rgba(127,102,255,0.35); }
.tx-status-success { border-color: rgba(52,211,153,0.5); background: rgba(20,40,32,0.96); }
.tx-status-failed  { border-color: rgba(239,68,68,0.5);  background: rgba(40,18,18,0.96); }

.tx-status-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tx-status-success .tx-status-icon { color: #34d399; }
.tx-status-failed  .tx-status-icon { color: #ef4444; }

.tx-status-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(127,102,255,0.3);
    border-top-color: rgb(127,102,255);
    border-radius: 50%;
    animation: txSpin 0.7s linear infinite;
    display: inline-block;
}

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

.tx-status-label {
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
}

.tx-status-hash {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-family: monospace;
    letter-spacing: 0.3px;
}

.tx-status-state {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tx-status-pending .tx-status-state { color: rgba(127,102,255,0.85); }
.tx-status-success .tx-status-state { color: #34d399; }
.tx-status-failed  .tx-status-state { color: #ef4444; }

@media (max-width: 480px) {
    .tx-status-container { bottom: 70px; right: 10px; left: 10px; }
    .tx-status-banner { min-width: unset; width: 100%; }
}

/* ── Predictions Page ─────────────────────────── */
.pred-page { padding: 20px 20px 40px; padding-top: 70px; overflow-y: auto; height: 100vh; width: 100%; max-width: 100%; opacity: 0; animation: predPageIn .2s ease forwards; }
@keyframes predPageIn { from { opacity: 0; } to { opacity: 1; } }
.pred-section { margin-bottom: 32px; opacity: 0; animation: predSectionIn .2s ease .05s forwards; }
@keyframes predSectionIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.pred-section-title { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.35); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.04); }
.pred-resolved-title { color: rgba(255,255,255,.15); }
.pred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; width: 100%; }
.pred-empty { text-align: center; padding: 60px 20px; color: rgba(255,255,255,.2); font-size: 13px; }

.pred-card { opacity: 0; animation: predCardIn .25s cubic-bezier(.22,1,.36,1) forwards; background: transparent; border: 1px solid rgba(255,255,255,.04); border-radius: 14px; overflow: hidden; transition: background 0.2s ease, border-color 0.2s ease; box-shadow: none; content-visibility: auto; contain-intrinsic-size: auto 220px; }
.pred-card:hover { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,0.02); }
.pred-card.resolved { filter: saturate(.7); }
.pred-card.resolved { --pred-card-end-opacity: .5; }
@keyframes predCardIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: var(--pred-card-end-opacity, 1); transform: translateY(0) scale(1); } }
.pred-card:nth-child(1) { animation-delay: .04s; }
.pred-card:nth-child(2) { animation-delay: .08s; }
.pred-card:nth-child(3) { animation-delay: .12s; }
.pred-card:nth-child(4) { animation-delay: .16s; }
.pred-card:nth-child(5) { animation-delay: .20s; }
.pred-card:nth-child(6) { animation-delay: .24s; }
.pred-grid.no-anim .pred-card { animation: none; opacity: 1; }
.pred-section.no-anim { animation: none; opacity: 1; }

.pred-header { display: flex; align-items: center; gap: 12px; padding: 14px 14px 0; }
.pred-img-wrap { width: 56px; height: 56px; flex-shrink: 0; }
.pred-img { width: 56px; height: 56px; object-fit: cover; display: block; border-radius: 10px; box-shadow: none; }
.pred-img-placeholder { width: 56px; height: 56px; background: rgba(255,255,255,.03); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.06); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; border-radius: 10px; }

.pred-body { padding: 10px 14px 12px; }
.pred-title-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin-bottom: 0; }
.pred-title { font-size: 13px; font-weight: 500; flex: 1; line-height: 1.35; letter-spacing: -.005em; color: rgba(255,255,255,.7); font-family: 'Inter', system-ui, -apple-system, sans-serif; -webkit-background-clip: unset; -webkit-text-fill-color: unset; background: none; }
.pred-badge { font-size: 7px; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: .8px; text-transform: uppercase; flex-shrink: 0; margin-top: 3px; }
.pred-badge.open { background: rgba(0,214,143,.08); color: #00d68f; border: 1px solid rgba(0,214,143,.15); }
.pred-badge.resolved { background: rgba(167,139,250,.08); color: #a78bfa; border: 1px solid rgba(167,139,250,.15); }

.pred-odds-labels { display: flex; justify-content: space-between; margin-bottom: 8px; align-items: baseline; }
.pred-odds-lbl { font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace; letter-spacing: -.02em; }
.pred-odds-lbl.no { color: #f87171; }
.pred-odds-lbl.yes { color: #4ade80; }
.pred-odds-row { display: flex; align-items: center; border-radius: 20px; overflow: hidden; height: 6px; margin-bottom: 16px; background: rgba(255,255,255,.04); position: relative; }
.pred-odds-side { display: none; }
.pred-odds-bar { flex: 1; height: 100%; display: flex; border-radius: 20px; overflow: hidden; }
.pred-odds-fill-no { height: 100%; background: rgba(239,68,68,.35); transition: width .5s cubic-bezier(.4,0,.2,1); border-radius: 20px 0 0 20px; }
.pred-odds-fill-yes { height: 100%; background: rgba(34,197,94,.3); transition: width .5s cubic-bezier(.4,0,.2,1); border-radius: 0 20px 20px 0; }

.pred-odds-row.winner-yes .pred-odds-fill-yes { background: rgba(34,197,94,.5); }
.pred-odds-row.winner-no .pred-odds-fill-no { background: rgba(239,68,68,.5); }

.pred-bet-row { display: flex; gap: 8px; margin-bottom: 12px; }
.pred-bet-input { flex: 0.8; min-width: 0; background: rgba(255,255,255,.04); border: 1.5px solid rgba(255,255,255,.1); border-radius: 8px; padding: 10px 12px; color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; outline: none; transition: border-color .2s; }
.pred-bet-input:focus { border-color: rgba(167,139,250,.4); }
.pred-bet-input::placeholder { color: rgba(255,255,255,.1); }

.pred-btn-yes, .pred-btn-no { flex: 1; border: none; border-radius: 8px; padding: 10px 0; font-size: 12px; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: all .15s ease; position: relative; overflow: hidden; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pred-btn-yes { background: #1a9e4a; color: #fff; }
.pred-btn-yes:hover { background: #22c55e; }
.pred-btn-yes:active { background: #15803d; }
.pred-btn-no { background: #dc2626; color: #fff; }
.pred-btn-no:hover { background: #ef4444; }
.pred-btn-no:active { background: #b91c1c; }
.pred-btn-yes:disabled, .pred-btn-no:disabled { opacity: .3; cursor: default; }

.pred-positions { display: flex; gap: 6px; margin-bottom: 10px; }
.pred-pos { display: flex; align-items: center; gap: 6px; flex: 1; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.04); }
.pred-pos-info { flex: 1; min-width: 0; }
.pred-pos-label { font-size: 8px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: rgba(255,255,255,.25); }
.pred-pos-amt { font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.pred-pos-amt.yes { color: #4ade80; }
.pred-pos-amt.no { color: #f87171; }
.pred-sell-btn {
    border: none; border-radius: 8px; padding: 6px 14px; font-size: 11px; font-weight: 700;
    cursor: pointer; transition: all .15s; flex-shrink: 0;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    background: #dc2626; color: #fff;
}
.pred-sell-btn:hover { background: #ef4444; }
.pred-sell-btn:active { background: #b91c1c; }
.pred-sell-btn.sell-yes, .pred-sell-btn.sell-no { background: #dc2626; color: #fff; }

.pred-foot { display: flex; align-items: center; justify-content: space-between; font-size: 9px; color: rgba(255,255,255,.2); font-family: 'JetBrains Mono', monospace; padding-top: 10px; border-top: none; letter-spacing: .02em; }
.pred-foot-bets { cursor: default; padding: 2px 6px; border-radius: 5px; transition: all .15s; border: 1px solid transparent; }
.pred-foot-bets:hover { color: rgba(255,255,255,.45); background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.06); }
.pred-bets-tip { display: none; position: fixed; background: linear-gradient(170deg, rgba(14,16,24,.97) 0%, rgba(8,10,16,.98) 100%); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 0; min-width: 340px; max-width: 420px; max-height: 300px; z-index: 9999; box-shadow: 0 16px 48px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); overflow: hidden; }
.pred-bets-tip.show { display: block; animation: predTipIn .18s cubic-bezier(.22,1,.36,1); }
@keyframes predTipIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.pred-tip-cols { display: flex; min-height: 0; }
.pred-tip-col { flex: 1; min-width: 0; padding: 12px 14px; max-height: 280px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent; }
.pred-tip-col::-webkit-scrollbar { width: 3px; }
.pred-tip-col::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 2px; }
.pred-tip-col-hdr { font-size: 10px; font-weight: 800; letter-spacing: .3px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.05); display: flex; align-items: center; gap: 6px; }
.pred-tip-col-hdr::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pred-tip-col-hdr.yes { color: #4ade80; }
.pred-tip-col-hdr.yes::before { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.4); }
.pred-tip-col-hdr.no { color: #f87171; }
.pred-tip-col-hdr.no::before { background: #f87171; box-shadow: 0 0 6px rgba(248,113,113,.4); }
.pred-tip-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 10px; font-family: 'JetBrains Mono', monospace; }
.pred-tip-row + .pred-tip-row { border-top: 1px solid rgba(255,255,255,.03); }
.pred-tip-addr { color: rgba(255,255,255,.3); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.pred-tip-amt { color: rgba(255,255,255,.7); font-weight: 700; flex-shrink: 0; }
.pred-tip-pct { color: rgba(255,255,255,.2); font-size: 9px; flex-shrink: 0; min-width: 30px; text-align: right; background: rgba(255,255,255,.03); padding: 1px 4px; border-radius: 3px; }
.pred-tip-empty { color: rgba(255,255,255,.12); text-align: center; padding: 12px 0; font-size: 10px; font-style: italic; }
.pred-tip-divider { width: 1px; background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.06) 20%, rgba(255,255,255,.06) 80%, transparent 100%); flex-shrink: 0; }
.pred-result { font-size: 11px; font-weight: 800; padding: 6px 0; text-align: center; margin-bottom: 10px; border-radius: 8px; letter-spacing: .02em; }
.pred-result.won { color: #4ade80; background: rgba(34,197,94,.08); }
.pred-result.lost { color: #f87171; background: rgba(239,68,68,.08); }

.pred-msg { font-size: 10px; text-align: center; padding: 4px 0; margin-bottom: 6px; color: rgba(167,139,250,.7); }

/* ── Card Yes/No buttons (full width, with odds) ── */
.pred-card-btns {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.pred-card-btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.pred-card-btn.yes {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.15);
}
.pred-card-btn.yes:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.3);
}
.pred-card-btn.yes:active {
    background: rgba(34, 197, 94, 0.25);
}
.pred-card-btn.no {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.15);
}
.pred-card-btn.no:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.3);
}
.pred-card-btn.no:active {
    background: rgba(239, 68, 68, 0.25);
}
.pred-card-btn:disabled { opacity: 0.3; cursor: default; }

/* ── Market Modal ── */
/* ── Market Modal ── */
.pred-modal-backdrop {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    opacity: 0; transition: opacity 0.25s ease;
}
.pred-modal-backdrop.show { opacity: 1; }
.pred-modal {
    position: fixed; z-index: 9999;
    top: 50%; left: 50%; transform: translate(-50%, -48%) scale(0.92);
    width: 440px; max-width: calc(100vw - 32px); max-height: calc(100vh - 60px);
    background: rgba(22, 22, 26, 0.97);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 22px;
    overflow-y: auto; overflow-x: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    opacity: 0; transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16,1,0.3,1);
    scrollbar-width: none;
}
.pred-modal::-webkit-scrollbar { display: none; }
.pred-modal.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Header */
.pred-modal-header {
    display: flex; align-items: center; gap: 16px;
    padding: 22px 22px 16px; position: relative;
    border-bottom: none;
}
.pred-modal-img {
    width: 68px; height: 68px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.pred-modal-title-wrap { flex: 1; min-width: 0; padding-right: 24px; }
.pred-modal-title { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.35; margin: 0; }
.pred-modal-vol { font-size: 11px; color: rgba(255,255,255,0.28); margin-top: 6px; letter-spacing: 0.2px; }
.pred-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.35); width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.pred-modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.12); }

/* Odds */
.pred-modal-odds { padding: 16px 22px 10px; }

/* Bet section */
.pred-modal-bet {
    padding: 4px 22px 20px; display: flex; flex-direction: column; gap: 12px;
}
.pred-modal-amt-label { font-size: 9px; font-weight: 800; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1.8px; }
.pred-modal-input {
    width: 100%; box-sizing: border-box;
    background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 15px 16px; color: #fff;
    font-size: 20px; font-weight: 700; outline: none;
    font-variant-numeric: tabular-nums; -moz-appearance: textfield;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pred-modal-input:focus { border-color: rgba(167,139,250,0.4); box-shadow: 0 0 0 3px rgba(167,139,250,0.08); }
.pred-modal-input::-webkit-inner-spin-button,
.pred-modal-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.pred-modal-input::placeholder { color: rgba(255,255,255,0.12); font-weight: 500; }

/* Slider */
.pred-modal-slider {
    width: 100%; -webkit-appearance: none; appearance: none;
    height: 5px; border-radius: 3px; outline: none; cursor: pointer;
    background: rgba(255,255,255,0.06);
    margin: 2px 0;
}
.pred-modal-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, #c4b5fd, #a78bfa);
    box-shadow: 0 2px 10px rgba(167,139,250,0.45), 0 0 0 3px rgba(167,139,250,0.12);
    cursor: pointer; border: 2px solid #1e2028;
    transition: box-shadow 0.15s;
}
.pred-modal-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 14px rgba(167,139,250,0.6), 0 0 0 4px rgba(167,139,250,0.15);
}
.pred-modal-slider::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, #c4b5fd, #a78bfa);
    box-shadow: 0 2px 10px rgba(167,139,250,0.45);
    cursor: pointer; border: 2px solid #1e2028;
}
.pred-modal-bal {
    font-size: 11px; color: rgba(255,255,255,0.25); text-align: right;
    font-variant-numeric: tabular-nums; letter-spacing: 0.2px;
}

/* Yes/No buttons in modal */
.pred-modal-btns { display: flex; gap: 10px; }
.pred-modal-btns .pred-card-btn {
    padding: 15px 0; font-size: 15px; font-weight: 800; border-radius: 12px;
}

/* Positions */
.pred-modal-positions {
    padding: 0 22px 16px; display: flex; flex-direction: column; gap: 6px;
    border-top: 1px solid rgba(255,255,255,0.04); padding-top: 16px; margin-top: 4px;
}
.pred-modal-pos-hdr { font-size: 9px; font-weight: 800; color: rgba(255,255,255,0.25); text-transform: uppercase; letter-spacing: 1.8px; margin-bottom: 6px; }
.pred-modal-pos-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px; background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05); border-radius: 11px;
}
.pred-modal-pos-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.pred-modal-pos-label.yes { color: #4ade80; }
.pred-modal-pos-label.no { color: #f87171; }
.pred-modal-pos-val { font-size: 13px; font-weight: 700; font-family: 'JetBrains Mono', monospace; display: block; margin-top: 3px; }

/* Mobile modal */
@media (max-width: 480px) {
    .pred-modal { width: calc(100vw - 20px); border-radius: 18px; }
    .pred-modal-header { padding: 18px 16px 14px; gap: 12px; }
    .pred-modal-img { width: 56px; height: 56px; border-radius: 12px; }
    .pred-modal-title { font-size: 15px; }
    .pred-modal-odds { padding: 12px 16px 8px; }
    .pred-modal-bet { padding: 4px 16px 16px; }
    .pred-modal-input { font-size: 18px; padding: 13px 14px; }
    .pred-modal-positions { padding: 0 16px 12px; padding-top: 12px; }
}

/* header-pred-btn now shares styles with header-crash-btn above */

@media (max-width: 480px) {
    .pred-grid { grid-template-columns: 1fr; }
    .pred-page { padding: 12px; padding-top: 60px; }
    .pred-detail-page { padding: 0 10px; }
    .pred-detail-title { font-size: 17px; }
}

/* ═══════════════════════════════════════════════════════════ */
/* TOWER GAME                                                 */
/* ═══════════════════════════════════════════════════════════ */
#towerTab {
    display: none;
    height: 100%;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
}
#towerTab.active { display: flex; justify-content: center; align-items: flex-start; }

.tower-wrap {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    display: block;
    box-sizing: border-box;
}
@media (max-width: 640px) {
    .tower-wrap {
        max-width: 100%;
        padding: 10px 14px 80px;
    }
}

.tower-grid {
    display: block;
    width: 100%;
    background: rgba(22,22,28,0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 10px 10px 6px;
    box-sizing: border-box;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.tower-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    opacity: 0.35;
    transition: opacity 0.12s ease, transform 0.1s ease;
}
.tower-row.active-row {
    opacity: 1;
    z-index: 2;
    position: relative;
}
.tower-row.cleared-row {
    opacity: 0.65;
}

.tower-mult-label {
    width: 38px;
    min-width: 38px;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.22);
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    flex-shrink: 0;
    transition: color 0.15s ease, font-size 0.15s ease;
}
.tower-row.active-row .tower-mult-label {
    color: #4ade80;
    font-size: 12px;
    font-weight: 700;
}
.tower-row.cleared-row .tower-mult-label {
    color: rgba(74,222,128,0.45);
}

.tower-tiles {
    display: flex;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.tower-tile {
    flex: 1;
    height: 44px;
    min-width: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(40,40,48,0.8);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
    position: relative;
    outline: none;
    box-sizing: border-box;
}
.tower-tile:disabled {
    cursor: default;
}

/* Active row tiles */
.tower-row.active-row .tower-tile:not(:disabled) {
    height: 50px;
    background: rgba(30,130,65,0.35);
    border: 1px solid rgba(74,222,128,0.3);
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(74,222,128,0.08), 0 1px 3px rgba(0,0,0,0.3);
}
.tower-row.active-row .tower-tile:not(:disabled)::before {
    content: '?';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    transition: all 0.15s ease;
}
.tower-row.active-row .tower-tile:not(:disabled):hover {
    background: rgba(40,150,75,0.45);
    border-color: rgba(74,222,128,0.5);
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(74,222,128,0.12), 0 2px 6px rgba(0,0,0,0.3);
}
.tower-row.active-row .tower-tile:not(:disabled):hover::before {
    color: rgba(255,255,255,0.55);
}
.tower-row.active-row .tower-tile:not(:disabled):active {
    transform: translateY(1px);
    box-shadow: 0 0 8px rgba(74,222,128,0.06);
    transition-duration: 0.06s;
}

/* Safe tile — revealed */
.tower-tile.safe {
    background: rgba(25,90,45,0.35);
    border: 1px solid rgba(74,222,128,0.15);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.tower-tile.safe.picked {
    background: rgba(30,120,55,0.4);
    border: 1px solid rgba(74,222,128,0.35);
    box-shadow: 0 0 8px rgba(74,222,128,0.08);
    animation: towerSafePop 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tower-tile.safe.picked::after {
    content: '\2705';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
@keyframes towerSafePop {
    0% { transform: scale(0.75); opacity: 0.3; }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

/* Bomb tile — revealed */
.tower-tile.bomb {
    background: rgba(100,25,25,0.35);
    border: 1px solid rgba(248,82,82,0.15);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.tower-tile.bomb::after {
    content: '\1F4A5';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0.5;
}
.tower-tile.bomb.picked {
    background: rgba(140,30,30,0.45);
    border: 1px solid rgba(248,82,82,0.4);
    box-shadow: 0 0 10px rgba(248,82,82,0.1);
    animation: towerBombShake 0.5s ease;
}
.tower-tile.bomb.picked::after {
    opacity: 1;
    font-size: 24px;
}
@keyframes towerBombShake {
    0%, 100% { transform: translateX(0); }
    12% { transform: translateX(-7px) rotate(-4deg); }
    24% { transform: translateX(7px) rotate(4deg); }
    36% { transform: translateX(-5px) rotate(-3deg); }
    48% { transform: translateX(5px) rotate(3deg); }
    60% { transform: translateX(-3px) rotate(-1deg); }
    72% { transform: translateX(3px) rotate(1deg); }
    84% { transform: translateX(-1px); }
}

/* Controls */
.tower-controls {
    display: block;
    width: 100%;
    margin-top: 14px;
}

.tower-bet-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.tower-bet-input {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 13px 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    outline: none;
    box-sizing: border-box;
    -moz-appearance: textfield;
    transition: border-color 0.15s;
}
.tower-bet-input::-webkit-inner-spin-button,
.tower-bet-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.tower-bet-input:focus {
    border-color: rgba(74,222,128,0.3);
}

.tower-bet-btn {
    padding: 13px 28px;
    border-radius: 10px;
    border: none;
    background: #1a9e4a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.tower-bet-btn:hover { background: #22c55e; }
.tower-bet-btn:active { background: #15803d; }
.tower-bet-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.tower-cash-btn {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: none;
    background: #1a9e4a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.tower-cash-btn:hover:not(:disabled) { background: #22c55e; }
.tower-cash-btn:active:not(:disabled) { background: #15803d; }
.tower-cash-btn:disabled { opacity: 0.3; cursor: default; background: rgba(255,255,255,0.06); }

.tower-msg {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    min-height: 18px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    margin-top: 10px;
}

/* ═══════════════════════════════════════════════
   COIN FLIP
   ═══════════════════════════════════════════════ */
#flipTab {
    display: none;
    height: 100%;
    padding-bottom: env(safe-area-inset-bottom);
    overflow-y: auto;
}
#flipTab.active { display: flex; justify-content: center; align-items: flex-start; }
.exchange-container:has(#flipTab.active) {
    max-width: 100%;
    padding: 55px 0 0;
    position: relative;
    overflow: hidden;
}
.flip-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 60px 0 160px;
    min-height: calc(100vh - 140px);
}

/* ── Coin arena ────────────────────────────────── */
.flip-coin-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 480px;
    padding: 40px 0 28px;
    position: relative;
}
.flip-coin-area::before {
    display: none;
}
.flip-coin {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    will-change: transform, margin-top;
}
/* Waiting for result — continuous spin */
.flip-coin.spinning {
    animation: coinSpinLoop 0.4s linear infinite, coinFloat 0.6s ease-out forwards;
}
/* Land on heads */
.flip-coin.land-heads {
    animation: coinLandHeads 0.6s cubic-bezier(0.15, 0.9, 0.3, 1) forwards, coinDrop 0.6s ease-in-out forwards;
}
/* Land on tails */
.flip-coin.land-tails {
    animation: coinLandTails 0.6s cubic-bezier(0.15, 0.9, 0.3, 1) forwards, coinDrop 0.6s ease-in-out forwards;
}
.flip-coin-front, .flip-coin-back {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    overflow: hidden;
}
.flip-coin-rim {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    pointer-events: none;
}
.flip-coin-face {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    position: relative;
    z-index: 1;
}
.flip-coin-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    opacity: 0.7;
}
.flip-coin-front {
    background: conic-gradient(from 135deg, #fbbf24, #fde68a, #f59e0b, #b45309, #d97706, #fcd34d, #fbbf24);
    color: #713f12;
    border: 4px solid rgba(253,224,71,0.5);
    box-shadow:
        inset 0 3px 12px rgba(255,255,255,0.35),
        inset 0 -4px 12px rgba(0,0,0,0.25),
        0 0 0 1px rgba(251,191,36,0.2);
}
.flip-coin-front .flip-coin-rim {
    border-color: rgba(120,53,18,0.2);
    box-shadow: inset 0 0 8px rgba(251,191,36,0.15);
}
.flip-coin-back {
    background: conic-gradient(from 135deg, #3b82f6, #93c5fd, #1d4ed8, #1e3a5f, #2563eb, #60a5fa, #3b82f6);
    color: #e0f2fe;
    border: 4px solid rgba(96,165,250,0.4);
    box-shadow:
        inset 0 3px 12px rgba(255,255,255,0.25),
        inset 0 -4px 12px rgba(0,0,0,0.3),
        0 0 0 1px rgba(59,130,246,0.2);
    transform: rotateY(180deg);
}
.flip-coin-back .flip-coin-rim {
    border-color: rgba(191,219,254,0.2);
    box-shadow: inset 0 0 8px rgba(59,130,246,0.2);
}
.flip-coin-back .flip-coin-label {
    color: rgba(224,242,254,0.6);
}
/* Continuous fast spin while waiting for server */
@keyframes coinSpinLoop {
    from { transform: rotateY(0deg); }
    to   { transform: rotateY(360deg); }
}
/* Float up on spin start */
@keyframes coinFloat {
    0%   { margin-top: 0; }
    100% { margin-top: -18px; }
}
/* Land on heads — decelerate to 0deg (front face) */
@keyframes coinLandHeads {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(720deg); }
}
/* Land on tails — decelerate to 180deg (back face) */
@keyframes coinLandTails {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(900deg); }
}
/* Drop back down with bounce */
@keyframes coinDrop {
    0%   { margin-top: -18px; }
    50%  { margin-top: 2px; }
    75%  { margin-top: -4px; }
    100% { margin-top: 0; }
}

/* ── Result text ───────────────────────────────── */
.flip-result-text {
    font-size: 20px;
    font-weight: 800;
    min-height: 30px;
    letter-spacing: -0.03em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.flip-result-text.win, .flip-result-text.lose {
    opacity: 1;
    transform: translateY(0);
}
.flip-result-text.win { color: #4ade80; text-shadow: 0 0 20px rgba(74,222,128,0.3); }
.flip-result-text.lose { color: #f87171; text-shadow: 0 0 20px rgba(248,113,113,0.3); }

/* ── Controls ──────────────────────────────────── */
.flip-controls {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    box-sizing: border-box;
}
.flip-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.flip-panel-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.flip-amt-row {
    display: flex;
    gap: 8px;
}
.flip-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 0 14px;
    height: 48px;
    transition: border-color 0.2s;
}
.flip-input-wrap:focus-within {
    border-color: rgba(251,191,36,0.4);
}
.flip-input-prefix {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    margin-right: 6px;
}
.flip-amt-input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    width: 100%;
    font-family: inherit;
    -moz-appearance: textfield;
}
.flip-amt-input::-webkit-inner-spin-button,
.flip-amt-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.flip-presets {
    display: flex;
    gap: 6px;
}
.flip-preset {
    flex: 1;
    padding: 9px 0;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.flip-preset:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.12); }
.flip-balance-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
    padding: 0 2px;
}
.flip-balance-val { color: rgba(255,255,255,0.8); }

/* ── Side picker ───────────────────────────────── */
.flip-pick-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.flip-side-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.flip-side-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 0;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.flip-side-btn .flip-side-letter {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.02em;
}
.flip-side-btn.selected {
    border-color: rgba(251,191,36,0.5);
    background: rgba(251,191,36,0.08);
    color: #fbbf24;
    box-shadow: 0 0 24px rgba(251,191,36,0.08), inset 0 0 0 1px rgba(251,191,36,0.05);
}
.flip-side-btn[data-side="tails"].selected {
    border-color: rgba(59,130,246,0.5);
    background: rgba(59,130,246,0.08);
    color: #60a5fa;
    box-shadow: 0 0 24px rgba(59,130,246,0.08), inset 0 0 0 1px rgba(59,130,246,0.05);
}
/* Coin preview — show selected side */
.flip-coin.show-tails {
    transform: rotateY(180deg);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.flip-coin.show-heads {
    transform: rotateY(0deg);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.flip-side-btn:not(.selected):hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    transform: translateY(-1px);
}

/* ── Action bar (fixed above nav) ──────────────── */
.flip-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: rgba(24,24,28,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 6px;
}
@media (min-width: 641px) {
    .flip-action-bar {
        position: fixed;
        bottom: 0;
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
        padding-bottom: 14px;
    }
}
body:not(:has(#flipTab.active)) .flip-action-bar { display: none; }
.flip-go-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 3px solid rgba(10,80,30,0.7);
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: -0.01em;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    -webkit-tap-highlight-color: transparent;
}
.flip-go-btn:active:not(:disabled) { background: linear-gradient(180deg, #16a34a 0%, #15803d 100%); border-bottom-width: 1px; transform: translateY(2px); }
.flip-go-btn:disabled { opacity: 0.35; cursor: default; transform: none; border-bottom: 3px solid rgba(10,80,30,0.7); }
.flip-payout-info { display: none; }

/* ── History ───────────────────────────────────── */
.flip-history {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 4px 0;
}
.flip-hist-pill {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}
.flip-hist-pill.win { background: rgba(74,222,128,0.1); color: #4ade80; border: 1px solid rgba(74,222,128,0.1); }
.flip-hist-pill.lose { background: rgba(248,113,113,0.1); color: #f87171; border: 1px solid rgba(248,113,113,0.1); }

@media (max-width: 640px) {
    .flip-page { padding: 70px 0 140px; gap: 0; min-height: auto; }
    .flip-coin-area { padding: 24px 0 14px; gap: 12px; }
    .flip-coin { width: 100px; height: 100px; }
    .flip-coin-face { font-size: 36px; }
    .flip-coin-label { font-size: 7px; letter-spacing: 2px; }
    .flip-coin-area::before { width: 140px; height: 140px; }
    .flip-result-text { font-size: 16px; min-height: 24px; }
    .flip-controls { padding: 0 14px; gap: 8px; }
    .flip-panel { padding: 14px 14px 12px; gap: 10px; border-radius: 16px; }
    .flip-panel-label { font-size: 9px; }
    .flip-input-wrap { height: 42px; }
    .flip-amt-input { font-size: 17px; }
    .flip-preset { padding: 7px 0; font-size: 11px; }
    .flip-side-btns { gap: 8px; }
    .flip-side-btn { padding: 12px 0; gap: 4px; border-radius: 12px; }
    .flip-side-btn .flip-side-letter { font-size: 22px; }
    .flip-side-btn span:last-child { font-size: 9px; }
    .flip-go-btn { padding: 14px; font-size: 15px; }
    .flip-payout-info { font-size: 11px; }
    .flip-pick-label { font-size: 9px; }
    .flip-balance-row { font-size: 11px; }
    .flip-action-bar { bottom: calc(52px + env(safe-area-inset-bottom)); padding: 10px 14px; border-radius: 0; max-width: 100%; left: 0; right: 0; transform: none; }
}
