:root {
    --bg-dark: #0b0c15;
    --bg-card: #151621;
    --primary: #6c5ce7;
    /* Soft Purple */
    --accent: #00cec9;
    /* Cyan */
    --gold: #ffeaa7;
    --text-main: #ffffff;
    --text-muted: #a4b0be;
    --nav-height: 70px;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll, handle in main-content */
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 600px;
    /* PC constraint */
    margin: 0 auto;
    background: radial-gradient(circle at top, #1e1f3a, var(--bg-dark));
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Header */
.top-bar {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: rgba(21, 22, 33, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.balance-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gold);
}

.user-profile .avatar {
    background: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Main Content */
#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: calc(var(--nav-height) + 20px);
    position: relative;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Race Section */
.race-status {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 60px;
    /* Space for button */
    position: relative;
    /* Ensure it catches the absolute child */
}

.race-status h2 {
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.race-status p {
    color: var(--text-muted);
}

.race-track-container {
    background-color: #0b0c15;
    /* Static background removed for Canvas Starfield */

    border-radius: 16px;
    padding: 10px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    /* Vertical Race Changes */
    height: 400px;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
}

/* Class to trigger animation via JS */
.race-track-container.animating {
    animation: scrollStars 0.5s linear infinite;
    /* FAST speed illusion */
}

#distance-counter {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--accent);
    font-weight: 800;
    font-size: 1.2rem;
    z-index: 10;
    text-shadow: 0 0 10px rgba(0, 206, 201, 0.5);
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid rgba(0, 206, 201, 0.3);
}

@keyframes scrollStars {
    from {
        background-position: 0 0, 0 0, 0 0;
    }

    to {
        background-position: 0 550px, 0 350px, 0 250px;
    }
}

.track-lane {
    flex: 1;
    height: 100%;
    margin: 0 5px;
    border-right: none;
    /* Removed dashed lines for 'open space' feel */
    position: relative;
    display: flex;
    justify-content: center;
}

.track-lane:last-child {
    border-right: none;
}

.racer {
    width: 60px;
    height: 60px;
    /* object-fit: contain; REMOVED (moved to img) */
    position: absolute;
    bottom: 20px;
    /* Default start pos */
    left: 50%;
    transform: translateX(-50%);
    /* Remove transition to allow tight physics control, or keep specific transform */
    transition: transform 0.2s;
    z-index: 2;
    overflow: visible !important;
    /* Visual Fix */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

.racer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.finish-line {
    position: absolute;
    top: -50px;
    /* HIDDEN initially */
    left: 0;
    right: 0;
    height: 4px;
    width: 100%;
    background: repeating-linear-gradient(90deg,
            #fff,
            #fff 5px,
            #000 5px,
            #000 10px);
    opacity: 0.8;
    z-index: 1;
    transition: top 1s ease-out;
    /* Drop down animation */
    box-shadow: 0 0 10px #fff;
}

/* Betting UI */
.betting-controls {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
}

.racer-selection {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.select-racer-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.select-racer-btn.selected {
    border-color: var(--accent);
    background: rgba(0, 206, 201, 0.1);
    box-shadow: 0 0 10px rgba(0, 206, 201, 0.3);
}

.bet-input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.bet-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-family: var(--font-main);
}

#place-bet-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    color: #fff;
    font-weight: bold;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
}

#bet-status-msg {
    margin-top: 10px;
    font-size: 0.9rem;
    min-height: 1.2em;
}

/* Referral & Tasks */
.referral-card,
.task-item,
.wallet-card {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.copy-box {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.copy-box input {
    flex: 1;
    background: #000;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 6px;
}

.friend-list li,
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.task-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Wallet */
.big-balance {
    font-size: 2.5rem;
    color: var(--gold);
    margin: 10px 0;
}

.wallet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.action-btn {
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.action-btn.deposit {
    background: rgba(255, 234, 167, 0.1);
    color: var(--gold);
    border: 1px solid rgba(255, 234, 167, 0.3);
}

.action-btn.withdraw {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Bottom Nav */
.bottom-nav {
    height: var(--nav-height);
    background: #1e1f3a;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 999;
    /* Ensure TOP layer */
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item .resync-overlay {
    font-size: 1.5em;
}


/* Payment Modal Styles */
.package-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.package-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: transform 0.2s, background 0.2s;
}

.package-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.pkg-icon {
    font-size: 24px;
    margin-right: 15px;
}

.pkg-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pkg-title {
    font-weight: bold;
    color: #ffd700;
}

.pkg-price {
    font-size: 0.9em;
    color: #a4b0be;
}

.pkg-tag {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e17055;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.payment-modal {
    width: 90%;
    max-width: 350px;
    background: #1e272e;
}

.payment-modal .close-btn {
    background: transparent;
    border: 1px solid #636e72;
    color: #b2bec3;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.nav-item .icon {
    font-size: 1.5rem;
}

.nav-item .label {
    font-size: 0.7rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    width: 80%;
    max-width: 300px;
    text-align: center;
    border: 1px solid var(--primary);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.3);
}

.modal h3 {
    margin-bottom: 10px;
    color: var(--accent);
}

.modal p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.modal button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.ad-content {
    color: white;
    text-align: center;
}

/* Responsive Adjustments */
@media (min-width: 601px) {
    body {
        background: #000;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .app-container {
        width: 100%;
        height: 90vh;
        border-radius: 20px;
        overflow: hidden;
    }
}

/* TURBO BOOST ANIMATION */
.turbo-active {
    filter: drop-shadow(0 0 10px #ff9f43) drop-shadow(0 15px 25px rgba(255, 100, 0, 0.8));
    transform: scale(1.1);
    transition: transform 0.2s ease, filter 0.2s ease;
    z-index: 10;
}

.turbo-active::after {
    content: '';
    position: absolute;
    top: 60%;
    /* Lower down */
    left: 50%;
    transform: translate(-50%, 0);
    /* Push down */
    width: 30px;
    /* Wider */
    height: 60px;
    /* Taller */
    background: radial-gradient(ellipse at center, #ffeb3b 0%, #ff5722 60%, transparent 100%);
    border-radius: 50%;
    filter: blur(2px);
    animation: flame-flicker 0.1s infinite alternate;
    z-index: 10;
    /* ON TOP to prove it works */
    /* Behind ship */
    opacity: 0.9;
    pointer-events: none;
    /* Click through */
}

@keyframes flame-flicker {
    0% {
        height: 40px;
        opacity: 1;
    }

    100% {
        height: 50px;
        opacity: 0.8;
    }
}

/* --- SELECTION BUTTONS --- */
.select-racer-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: white;
    font-family: inherit;
    /* Layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.ship-name-label {
    font-size: 10px;
    font-weight: 800;
    color: #a4b0be;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.select-racer-btn.selected .ship-name-label {
    color: #00cec9;
}

.select-racer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.select-racer-btn.selected {
    background: rgba(0, 206, 201, 0.2);
    border-color: #00cec9;
    box-shadow: 0 0 10px rgba(0, 206, 201, 0.3);
    transform: scale(1.05);
}

/* SOUND TOGGLE BTN */
.sound-toggle-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;

    width: 40px;
    height: 40px;
    border-radius: 50%;

    /* Default (ON) State */
    background: rgba(0, 206, 201, 0.1);
    border: 1px solid #00cec9;
    color: #00cec9;
    box-shadow: 0 0 10px rgba(0, 206, 201, 0.2);

    font-size: 18px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sound-toggle-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: rgba(0, 206, 201, 0.2);
    box-shadow: 0 0 15px rgba(0, 206, 201, 0.4);
}

.sound-toggle-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* OFF State */
.sound-toggle-btn.muted {
    background: rgba(255, 118, 117, 0.1);
    border-color: #ff7675;
    color: #ff7675;
    box-shadow: none;
    opacity: 0.8;
}

.sound-toggle-btn.muted:hover {
    background: rgba(255, 118, 117, 0.2);
    box-shadow: 0 0 10px rgba(255, 118, 117, 0.3);
}

/* PROFILE PAGE */
.profile-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
}

.big-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.profile-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: white;
}

.user-id {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
}

.stat-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-box .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-box .value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
}

.play-btn {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 206, 201, 0.3);
    transition: transform 0.2s;
    width: 100%;
}

/* LUCKY REEL (Horizontal) */
/* LUCKY REEL (Horizontal) */
.reel-container {
    background: linear-gradient(180deg, #2d3436, #000);
    padding: 10px;
    /* Reduced padding */
    border-radius: 16px;
    /* Slightly smaller radius */
    margin-bottom: 15px;
    text-align: center;
    border: 2px solid #636e72;
    /* Thinner border */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    /* Less shadow */
    max-width: 320px;
    /* Constrain width */
    margin-left: auto;
    margin-right: auto;
}

.reel-container h3 {
    color: #ffeaa7;
    margin-bottom: 10px;
    font-size: 1.1rem;
    /* Smaller font */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reel-window {
    position: relative;
    width: 100%;
    height: 70px;
    /* Reduced height from 100px */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 2px solid #b2bec3;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.reel-track {
    display: flex;
    height: 100%;
    align-items: center;
    /* Will translate via JS */
    will-change: transform;
}

/* 2D Cube / Card Look */
.reel-item {
    min-width: 60px;
    /* Reduced from 80 */
    height: 60px;
    /* Reduced from 80 */
    margin: 0 4px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 0.8rem;
    /* Smaller font */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
    /* 3D effect */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

/* Specific Colors based on content (JS will assign classes or we use nth-child for generic loop) */
.reel-item.gold {
    background: linear-gradient(135deg, #fdcb6e, #ffeaa7);
    color: #d35400;
}

.reel-item.usd {
    background: linear-gradient(135deg, #00cec9, #81ecec);
    color: #006266;
}

.reel-item.loss {
    background: linear-gradient(135deg, #ff7675, #d63031);
}

/* Pointers */
.reel-pointer-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #fff;
    z-index: 10;
    filter: drop-shadow(0 2px 2px black);
}

/* Withdrawal Modal Styles */
.withdrawal-modal-content {
    text-align: left;
    color: #dfe6e9;
    font-size: 0.95em;
}

.withdrawal-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
}

.withdrawal-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.withdrawal-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.withdrawal-list .label {
    color: #b2bec3;
}

.withdrawal-list .value {
    font-weight: bold;
    color: #fff;
}

.withdrawal-list .value.gold {
    color: #ffd700;
}

.withdrawal-footer {
    text-align: center;
    font-weight: bold;
    color: #00cec9;
    font-size: 1.1em;
}

.last-winner-box {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.last-winner-box h3 {
    margin-top: 0;
    color: #fdcb6e;
}

.small-date {
    font-size: 0.8em;
    color: #636e72;
}

/* --- RACE OVERLAYS --- */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 12, 21, 0.9);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s;
}

.loading-overlay h2 {
    margin-top: 15px;
    font-size: 1.2rem;
    color: var(--accent);
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.resync-overlay {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff7675;
    color: #ff7675;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 9999;
    pointer-events: none;
    backdrop-filter: blur(2px);
    box-shadow: 0 0 15px rgba(255, 118, 117, 0.3);
    animation: flash 1s infinite;
}

.resync-overlay.hidden {
    display: none;
}

@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.reel-pointer-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #fff;
    /* Smaller pointer */
    z-index: 10;
    filter: drop-shadow(0 2px 2px black);
}

/* --- LOTTERY TAB --- */
.lottery-card {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pool-header {
    margin-bottom: 20px;
}

.pool-header span {
    font-size: 0.9em;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.glow-text {
    font-size: 2.8em;
    margin: 0;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.timer-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.digital-timer {
    font-family: 'Courier New', monospace;
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    letter-spacing: 3px;
    margin-top: 5px;
}

.ticket-info {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.last-winner-box {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.last-winner-box h3 {
    margin-top: 0;
    color: #fdcb6e;
}

.small-date {
    font-size: 0.8em;
    color: #636e72;
}


/* --- MOBILE RESPONSIVENESS (Small Screens) --- */
@media (max-width: 600px) {

    /* Smaller Wallet Stats */
    .stats-grid {
        gap: 8px;
        /* Tighter gap */
        margin: 15px 0;
    }

    /* Wallet Card & Stats */
    .stat-box,
    .wallet-card {
        padding: 10px;
        /* Reduced padding */
        min-height: 80px;
        /* Consistent height */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .stat-box .label,
    .wallet-card .label {
        font-size: 0.7rem;
        /* Smaller label */
        margin-bottom: 2px;
    }

    .stat-box .value {
        font-size: 1.1rem;
        word-break: break-all;
    }

    /* Keep Balance and Emoji on one line */
    .big-balance {
        font-size: 1.4rem !important;
        /* Force smaller */
        margin: 2px 0 0 0;
        white-space: nowrap;
        /* Prevent wrap */
        display: flex;
        align-items: center;
        gap: 5px;
    }

    /* Make the USD one consistent */
    .wallet-card .big-balance {
        font-size: 1.3rem !important;
    }

    /* Compact Wallet Actions */
    .wallet-actions {
        gap: 8px;
        margin-top: 15px;
    }

    .action-btn {
        padding: 12px;
        font-size: 0.85rem;
    }

    /* Remove extra space */
    .wallet-row {
        margin-bottom: 10px !important;
        gap: 8px !important;
    }

    .wallet-settings {
        padding: 10px !important;
        margin-bottom: 15px !important;
    }
}