/* ============================================
   RIDOPAY — La Famiglia Wallet
   Dark Mafia Theme — Lightweight 2026
   ============================================ */

/* === CSS Variables / Design Tokens === */
:root {
    /* Colors */
    --bg-deep: #0a0a0c;
    --bg-card: #13131a;
    --bg-card-alt: #1a1a24;
    --bg-nav: rgba(12, 12, 18, 0.95);
    --gold: #c9a84c;
    --gold-dim: #8a7434;
    --text-primary: #f0eee6;
    --text-secondary: #9a978e;
    --text-muted: #5a584f;
    --green: #4caf50;
    --red: #e74c3c;
    --eth-color: #627eea;
    --btc-color: #f7931a;
    --usdt-color: #26a17b;
    --border-subtle: rgba(201, 168, 76, 0.1);
    --border-card: rgba(201, 168, 76, 0.12);

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Playfair Display', serif;

    /* Dimensions */
    --nav-height: 68px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background: var(--bg-deep);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* === App Container === */
.app-container {
    width: 100vw;
    height: 100vh;
    background: var(--bg-deep);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* === App Content (scrollable) === */
.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 0 10px;
}

.app-content::-webkit-scrollbar {
    display: none;
}

/* === Header === */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px 4px;
}

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

.app-logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 3px;
}

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

.header-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    background: var(--red);
    border-radius: 50%;
    border: 1.5px solid var(--bg-deep);
}

.header-silhouette {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Greeting === */
.greeting-section {
    padding: 10px 20px 4px;
}

.greeting-text {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.greeting-text em {
    font-style: italic;
}

.greeting-text strong {
    color: var(--gold);
    font-weight: 600;
}

/* === Balance Card === */
.balance-card {
    position: relative;
    margin: 10px 16px 0;
    padding: 18px 20px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
}

/* Mafia silhouette watermark — lightweight, no animation */
.balance-card::after {
    content: '';
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 120px;
    height: 150px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120'%3E%3Cpath d='M30 45 Q35 25 50 30 Q65 25 70 45 L75 45 L25 45 Z' fill='%23c9a84c'/%3E%3Crect x='25' y='44' width='50' height='4' rx='2' fill='%23c9a84c'/%3E%3Cellipse cx='50' cy='60' rx='15' ry='17' fill='%23c9a84c'/%3E%3Cpath d='M35 75 Q35 95 50 100 Q65 95 65 75 L65 72 Q58 78 50 78 Q42 78 35 72 Z' fill='%23c9a84c'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.035;
    pointer-events: none;
}

/* === Balance Header Row (Label + Currency Toggle) === */
.balance-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.balance-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

/* === Currency Toggle === */
.currency-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 3px;
}

.currency-btn {
    font-family: var(--font-main);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: background 0.15s ease, color 0.15s ease;
}

.currency-btn.active {
    background: var(--gold);
    color: #0a0a0c;
}

.currency-btn:not(.active):not(.coming-soon):hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
}

.currency-btn.coming-soon {
    opacity: 0.4;
    cursor: not-allowed;
    font-size: 9px;
}

.balance-amount {
    font-family: var(--font-main);
    font-size: 34px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.balance-cents {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* === Crypto Assets Row === */
.crypto-assets {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
    z-index: 1;
}

.crypto-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.crypto-item:active {
    background: rgba(201,168,76,0.06);
}

.crypto-divider {
    width: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

.crypto-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 2px;
}

.crypto-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.usdt-label {
    color: var(--usdt-color) !important;
}

.crypto-values {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.crypto-val {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.crypto-change {
    font-size: 10px;
    font-weight: 500;
}

.crypto-change.negative { color: var(--red); }
.crypto-change.positive { color: var(--green); }
.crypto-change.neutral { color: var(--text-muted); }

/* === Quick Actions === */
.quick-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px 16px 8px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 14px 10px 10px;
    width: 76px;
    cursor: pointer;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.action-btn:active {
    background: var(--bg-card-alt);
    border-color: var(--gold-dim);
}

.action-icon-wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn span {
    letter-spacing: 0.5px;
}

/* === Transaction History === */
.transactions-section {
    padding: 14px 16px 0;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
}

.transaction-item:active {
    background: var(--bg-card-alt);
}

.tx-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201,168,76,0.07);
    border-radius: 10px;
}

.crypto-purchase-icon {
    background: rgba(98,126,234,0.1) !important;
}

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

.tx-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-status {
    font-size: 11px;
    font-weight: 500;
}

.tx-status.completed { color: var(--green); }
.tx-status.pending { color: var(--gold); }

.tx-amount-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    white-space: nowrap;
}

.tx-amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.tx-time {
    font-size: 10px;
    color: var(--text-muted);
}

/* === Bottom Spacer === */
.bottom-spacer {
    height: calc(var(--nav-height) + 10px);
}

/* === Bottom Navigation === */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 10px;
    background: var(--bg-nav);
    border-top: 1px solid var(--border-subtle);
    z-index: 50;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    position: relative;
}

.nav-item.active {
    color: var(--gold);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.nav-item svg {
    width: 22px;
    height: 22px;
}

/* === Responsive === */
@media (min-width: 600px) {
    .app-container {
        max-width: 480px;
        margin: 0 auto;
        border-left: 1px solid var(--border-subtle);
        border-right: 1px solid var(--border-subtle);
    }
}
