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

html, body {
    height: 100%;
    background-color: #050510;
    color: #f0f0f0;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 400;
    overflow: hidden;
    letter-spacing: 0.3px;
}

audio { display: none; }

/* --- LOADING SCREEN --- */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000008;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}
.loading-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #0066FF;
    margin-bottom: 20px;
    animation: pulse-glow 1.5s infinite alternate;
}
@keyframes pulse-glow {
    from { box-shadow: 0 0 20px rgba(0, 102, 255, 0.5); }
    to { box-shadow: 0 0 50px rgba(0, 255, 204, 0.8); }
}
.loading-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 26px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-shadow: 0 0 20px #0066FF;
}
.loading-bar-container {
    width: 80%;
    max-width: 300px;
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 2px solid rgba(0, 102, 255, 0.4);
    overflow: hidden;
    position: relative;
}
.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #003399, #0066FF, #00FFCC);
    border-radius: 10px;
    transition: width 0.15s ease-out;
}
.loading-text {
    font-size: 14px;
    color: #88BBFF;
    margin-top: 15px;
    letter-spacing: 1px;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at top, rgba(20, 16, 56, 0.88) 0%, rgba(5, 5, 16, 0.94) 60%),
        url('images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
}

/* --- ICONE INLINE PER TESTI E PULSANTI --- */
.token-inline-icon {
    width: 15px;
    height: 15px;
    vertical-align: -2px;
    object-fit: cover;
    border-radius: 50%;
    display: inline-block;
}

/* --- TOP BAR --- */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    z-index: 10;
    background: rgba(5, 5, 18, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 102, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0A1128;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    color: #fff;
    border: 2px solid #00FFCC;
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.4);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.avatar img, .lb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.user-name {
    font-size: 14px;
    font-weight: 800;
    color: #FFFFFF;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-handle {
    font-size: 11px;
    color: #66AAFF;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
}
.top-balances {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    min-width: 0;
}
.top-balance, .top-shard-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 20, 55, 0.55);
    padding: 4px 9px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 11px;
    border: 1px solid rgba(0, 102, 255, 0.3);
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    min-width: 0;
    max-width: 100%;
}
.top-balance span, .top-shard-balance span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.top-balance {
    border-color: rgba(0, 230, 118, 0.4);
    color: #00E676;
}
.top-shard-balance {
    border-color: rgba(0, 150, 255, 0.4);
    color: #66CCFF;
}
.token-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.settings-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    flex-shrink: 0;
    background: rgba(0, 30, 80, 0.45);
    border: 1px solid rgba(0, 102, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.settings-btn:active {
    transform: scale(0.92);
    border-color: #00FFCC;
    background: rgba(0, 102, 255, 0.3);
}
.settings-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* --- PAGE CONTAINER --- */
.page-container {
    position: relative;
    z-index: 1;
    padding: 85px 18px 90px;
    height: 100%;
    overflow-y: auto;
}
.page {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.page.active { display: flex; }

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: white;
    margin: 15px 0 10px;
    width: 100%;
    text-align: left;
}
.card {
    background: rgba(0, 20, 60, 0.35);
    border: 1px solid rgba(0, 102, 255, 0.25);
    border-radius: 18px;
    padding: 15px;
    width: 100%;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(8px);
}

.browser-shell {
    position: fixed;
    inset: 0;
    z-index: 40; /* sopra top-bar (10) e bottom-nav (20), sotto i modali (100+) */
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(7, 15, 28, 0.98), rgba(8, 10, 25, 0.98));
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.browser-close-btn {
    background: rgba(255, 102, 102, 0.15);
    border: 1px solid rgba(255, 102, 102, 0.4);
    color: #FF6666;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    font-size: 16px;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.browser-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: rgba(10, 16, 33, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
}

.browser-branding {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #00FFCC;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    min-width: 72px;
}

.browser-logo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.browser-tab-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
}

.browser-tab-strip::-webkit-scrollbar { display: none; }

.browser-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 120px;
    padding: 6px 10px;
    border-radius: 10px 10px 0 0;
    background: rgba(255, 255, 255, 0.04);
    color: #AABBEA;
    border: 1px solid transparent;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browser-tab.active {
    background: rgba(0, 255, 204, 0.12);
    border-color: rgba(0, 255, 204, 0.25);
    color: #fff;
}

.browser-new-tab {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 18px;
}

.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 8px 10px 10px;
    background: rgba(16, 20, 35, 0.96);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.browser-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #fff;
}

.browser-address-bar {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 12px;
}

.browser-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-shrink: 0;
    padding: 10px 12px 0;
}

.browser-home-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    flex: 1;
    min-height: 0;
    background: radial-gradient(circle at top, rgba(0, 102, 255, 0.15), transparent 45%), linear-gradient(180deg, rgba(8, 12, 28, 0.94), rgba(13, 18, 30, 0.98));
    padding: 24px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.browser-home-screen.hidden {
    display: none;
}

.browser-home-logo-wrap {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    padding: 10px;
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.18);
}

.browser-home-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.browser-home-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
}

.browser-home-subtitle {
    max-width: 280px;
    color: #9BB5E5;
    font-size: 12px;
    line-height: 1.5;
}

.browser-home-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.luxa-browser-frame {
    width: 100%;
    flex: 1;
    min-height: 0;
    border: 0;
    background: #fff;
    display: block;
}

.browser-sidebar {
    flex-shrink: 0;
    max-height: 22vh;
    overflow-y: auto;
    padding: 12px;
    background: rgba(4, 9, 24, 0.9);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.browser-sidebar-header {
    font-size: 11px;
    color: #88BBFF;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.browser-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.browser-history-item {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 9px 10px;
    color: #fff;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.browser-history-item strong {
    font-size: 12px;
    color: #00FFCC;
    font-family: 'Orbitron', sans-serif;
}

.browser-history-item span {
    font-size: 10px;
    color: #9DB8E6;
    word-break: break-all;
}

.explorer-result-card {
    background: rgba(10, 20, 40, 0.9);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.explorer-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    font-size: 11px;
    color: #88BBFF;
}

.explorer-row strong {
    color: #fff;
}

.explorer-hash {
    font-family: monospace;
    font-size: 10px;
    word-break: break-all;
    color: #FFD700;
}

.explorer-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.explorer-actions button {
    flex: 1;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #fff;
}

/* --- MINING RING --- */
.mining-rate {
    font-size: 13px;
    color: #00E676;
    font-weight: 700;
    background: rgba(0, 230, 118, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 230, 118, 0.3);
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
}
.active-nft-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: -10px 0 16px 0;
}
.active-nft-pill {
    font-size: 10px;
    font-weight: 700;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.mining-ring-wrap {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mining-ring-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.mining-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 10;
}
.mining-ring-progress {
    fill: none;
    stroke: #0066FF;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}
.mining-ring-wrap.boosted .mining-ring-progress {
    stroke: #FFD700;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1));
}
.center-level-img {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    cursor: pointer;
    border: 2px solid rgba(0, 102, 255, 0.4);
}

.timer-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 34px;
    font-weight: 900;
    color: white;
    margin-top: 15px;
}
.timer-label {
    font-size: 12px;
    color: #88BBFF;
    margin-bottom: 20px;
}

.collect-btn {
    display: none;
    background: linear-gradient(90deg, #00C878, #009955);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    font-family: 'Russo One', sans-serif;
}

/* --- WHEEL --- */
.wheel-container {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 15px auto;
}
.wheel-arrow {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 24px solid #00FFCC;
    z-index: 10;
}
.wheel-svg {
    width: 100%;
    height: 100%;
    transition: transform 8s cubic-bezier(0.15, 0.75, 0.1, 1);
    border-radius: 50%;
}
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    background: #000;
    border: 2px solid #00FFCC;
    border-radius: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- TASKS --- */
.task-card {
    width: 100%;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 25, 70, 0.35);
    border: 1px solid rgba(0, 102, 255, 0.25);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.task-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.task-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 102, 255, 0.15);
    border: 1px solid rgba(0, 102, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.task-icon-box img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}
.task-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.task-title {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    font-family: 'Orbitron', sans-serif;
}
.task-reward-tag {
    font-size: 11px;
    font-weight: 700;
    color: #FFD700;
    margin-top: 3px;
    font-family: 'Orbitron', sans-serif;
}

/* --- BUTTONS --- */
.action-btn-sm {
    font-family: 'Russo One', sans-serif;
    background: linear-gradient(90deg, #0066FF, #0044CC);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.action-btn-sm.sell-btn { background: linear-gradient(90deg, #FF6666, #CC0000); }
.action-btn-sm:disabled {
    background: rgba(255,255,255,0.1);
    color: #7788AA;
    cursor: not-allowed;
}

.action-btn {
    font-family: 'Russo One', sans-serif;
    background: linear-gradient(90deg, #0066FF, #0044CC);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}
.action-btn:disabled {
    background: rgba(255,255,255,0.08);
    color: #667799;
    cursor: not-allowed;
}

/* --- MODALS & FORMS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 20, 0.92);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}
.modal-content {
    background: rgba(0, 20, 60, 0.95);
    border: 2px solid #0066FF;
    border-radius: 24px;
    padding: 20px;
    width: 92%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
}
.close-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 28px;
    color: white;
    cursor: pointer;
}

.form-input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #0066FF;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 15px;
}
.form-select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #00FFCC;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 15px;
}

/* --- HEROES GRID --- */
.hero-thumb {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 6px;
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer;
    position: relative;
    text-align: center;
}
.hero-thumb.active {
    border-color: #00FFCC;
    box-shadow: 0 0 10px rgba(0,255,204,0.5);
}
.hero-thumb img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
}
.hero-thumb.locked img {
    filter: grayscale(100%) brightness(40%);
}
.hero-thumb img.thumb-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35%;
    height: auto;
}
.hero-thumb:not(.locked) img.thumb-lock { display: none; }
.hero-thumb-name {
    font-size: 10px;
    color: #FFF;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- LEADERBOARD --- */
.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.2);
    border-radius: 14px;
    padding: 10px 14px;
    width: 100%;
    margin-bottom: 8px;
}
.lb-rank {
    font-weight: bold;
    font-size: 14px;
    width: 32px;
    color: #88BBFF;
    font-family: 'Orbitron', sans-serif;
}
.lb-row.top1 {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.12);
}
.lb-row.top1 .lb-rank { color: #FFD700; }
.lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
    font-family: 'Orbitron', sans-serif;
}
.lb-name {
    flex: 1;
    font-size: 13px;
    font-weight: bold;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #00E676;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- NFT VAULT & MARKET --- */
.nft-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}
.nft-card {
    background: rgba(0, 25, 70, 0.4);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    position: relative;
}
.nft-img-box {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    margin: 0 auto 8px;
    border: 2px solid #0066FF;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.nft-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.nft-zoom-hint {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}
.nft-title {
    font-size: 12px;
    font-weight: bold;
    color: #FFF;
    font-family: 'Orbitron', sans-serif;
}
.nft-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 4px;
    margin-bottom: 8px;
    font-weight: bold;
    background: rgba(0, 255, 204, 0.15);
    color: #00FFCC;
}
.nft-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #0066FF;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    z-index: 2;
}
.nft-ability {
    font-size: 10px;
    color: #FFD700;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* --- LUXA WALLET CARD --- */
.wallet-card {
    width: 100%;
    background: rgba(0, 102, 255, 0.15);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 102, 255, 0.4);
    margin-bottom: 15px;
}
.wallet-balance-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 5px 0;
}
.wallet-balance {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #FFFFFF;
}
.wallet-address {
    font-size: 14px;
    font-weight: bold;
    color: #00E676;
    background: rgba(0, 230, 118, 0.1);
    padding: 8px 12px;
    border-radius: 10px;
    margin-top: 10px;
    display: inline-block;
}

/* --- BOTTOM NAV: SCROLLABLE MENU --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: rgba(5, 5, 18, 0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(0, 102, 255, 0.3);
    padding: 8px 0 10px;
}
.nav-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-btn {
    font-family: 'Russo One', sans-serif;
    background: none;
    border: none;
    color: #6688BB;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 25%;
    max-width: 25%;
    scroll-snap-align: start;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 2px;
    transition: color 0.15s ease, transform 0.1s ease;
}
.nav-btn:active { transform: scale(0.93); }
.nav-btn.active { color: #00FFCC; }
.nav-icon-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: brightness(0.75) saturate(0.6);
    transition: filter 0.15s ease, transform 0.15s ease;
}
.nav-btn.active .nav-icon-img {
    filter: brightness(1.15) saturate(1.3) drop-shadow(0 0 8px rgba(0,255,204,0.7));
    transform: translateY(-2px);
}
.nav-hint-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
}
.nav-hint-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(102, 136, 187, 0.4);
    transition: background 0.2s ease, transform 0.2s ease;
}
.nav-hint-dot.active {
    background: #00FFCC;
    transform: scale(1.3);
}

.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 20, 50, 0.95);
    border: 1px solid #0066FF;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 100;
}
.toast.show { opacity: 1; }

/* --- SETTINGS ROW & TOGGLES --- */
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 25, 70, 0.35);
    border: 1px solid rgba(0, 102, 255, 0.25);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 10px;
}
.settings-row-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}
.settings-row-icon { font-size: 17px; }

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(0, 102, 255, 0.3);
    transition: 0.2s;
    border-radius: 26px;
}
.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.toggle-switch input:checked + .toggle-slider {
    background-color: #00C878;
    border-color: #00E676;
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.settings-link-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    background: rgba(0, 102, 255, 0.15);
    border: 1px solid rgba(0, 102, 255, 0.35);
    border-radius: 14px;
    padding: 13px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.settings-link-btn:active {
    transform: scale(0.97);
    background: rgba(0, 102, 255, 0.3);
}

/* --- LUXA ENCLOSED WALLET & LEDGER STYLES --- */
.seed-box {
    background: rgba(0, 0, 0, 0.65);
    border: 1px dashed #FFD700;
    border-radius: 14px;
    padding: 14px;
    color: #FFF;
    font-family: 'Orbitron', sans-serif;
    font-size: 12.5px;
    line-height: 1.9;
    word-spacing: 8px;
    user-select: all;
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.1);
}

.ledger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 102, 255, 0.15);
    padding: 9px 4px;
    font-size: 12px;
    transition: background 0.15s ease;
}
.ledger-item:last-child {
    border-bottom: none;
}
.ledger-item:hover {
    background: rgba(0, 102, 255, 0.05);
}

.ledger-tx-amount {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ledger-tx-amount.send { color: #FF6666; }
.ledger-tx-amount.receive { color: #00E676; }

/* --- LUXA BROWSER & DAPP HUB STYLES --- */
.browser-search-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 10, 30, 0.7);
    border: 1px solid rgba(0, 255, 204, 0.35);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
}
.browser-search-bar input {
    width: 100%;
    background: none;
    border: none;
    color: #00FFCC;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    outline: none;
}
.browser-actions-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.dapp-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 25, 70, 0.35);
    border: 1px solid rgba(0, 102, 255, 0.25);
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.dapp-card:active {
    transform: scale(0.98);
    border-color: #00FFCC;
}
.dapp-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 102, 255, 0.15);
    border: 1px solid rgba(0, 102, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.dapp-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dapp-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #FFF;
}
.dapp-category {
    font-size: 10px;
    font-weight: 700;
    color: #00FFCC;
    text-transform: uppercase;
    margin: 2px 0;
}
.dapp-desc {
    font-size: 11px;
    color: #88BBFF;
    line-height: 1.3;
}
/* --- LUXA ECOSYSTEM HUB (griglia stile app, sostituisce il vecchio Browser) --- */
.pihub-header {
    width: 100%;
    text-align: center;
    margin: 6px 0 20px;
}
.pihub-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid rgba(0, 255, 204, 0.35);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
}
.pihub-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 21px;
    font-weight: 900;
    color: #fff;
}
.pihub-subtitle {
    font-size: 12px;
    color: #88BBFF;
    margin-top: 4px;
}

.pihub-section-label {
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    color: #66AAFF;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 4px 0 14px;
    text-align: left;
}

.pihub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 10px;
    width: 100%;
}

.pihub-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.pihub-icon-box {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: rgba(0, 102, 255, 0.08);
    border: 1.5px solid rgba(0, 255, 204, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.pihub-tile:active .pihub-icon-box {
    transform: scale(0.92);
    border-color: #00FFCC;
    background: rgba(0, 255, 204, 0.14);
}

.pihub-icon-box img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.pihub-emoji {
    font-size: 26px;
    line-height: 1;
}

.pihub-label {
    font-size: 11.5px;
    color: #CCD6FF;
    font-weight: 600;
    text-align: center;
}
