/* ============================================
   PRIVACY WALLET - Dark Crypto Theme
   Zero data, zero tracking, full privacy
   ============================================ */

/* CSS Variables */
:root {
    /* Dark Theme Colors */
    --bg-primary: #080810;
    --bg-secondary: #0f0f18;
    --bg-tertiary: #16161f;
    --bg-card: #111118;
    --bg-card-hover: #1a1a24;

    /* Accent Colors */
    --accent-primary: #00d4aa;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #f59e0b;
    --accent-glow: rgba(0, 212, 170, 0.12);
    --accent-gradient: linear-gradient(135deg, #00d4aa 0%, #00a896 100%);
    --card-gradient: linear-gradient(135deg, rgba(0, 212, 170, 0.03) 0%, rgba(124, 58, 237, 0.03) 100%);

    /* Text Colors */
    --text-primary: #f0f0f5;
    --text-secondary: #9898a8;
    --text-muted: #5a5a6a;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Border & Shadow */
    --border-color: #232330;
    --border-subtle: #1a1a25;
    --border-glow: rgba(0, 212, 170, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(0, 212, 170, 0.15);

    /* Spacing */
    --sidebar-width: 260px;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 20px;

    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
}

/* App-like feel */
html {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    overflow-x: hidden;
    width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* CRITICAL: Prevent iOS zoom on input focus - must be 16px minimum */
input, select, textarea, button {
    font-size: 16px !important;
    touch-action: manipulation;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Allow larger fonts to override */
input.amount-input-large {
    font-size: 28px !important;
}

@supports (-webkit-touch-callout: none) {
    /* iOS specific */
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 170, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   LAYOUT
   ============================================ */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.75rem;
    color: var(--accent-primary);
    animation: pulse-glow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px var(--accent-primary));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 15px var(--accent-primary));
        transform: scale(1.05);
    }
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #00f5c4 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Navigation */
.nav-menu {
    list-style: none;
    padding: 1.25rem 0;
    flex: 1;
}

.nav-item {
    margin: 0.35rem 0.875rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-primary);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
    border-radius: 0 4px 4px 0;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-link:hover::before {
    transform: scaleY(0.5);
}

.nav-item.active .nav-link {
    background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
    color: var(--accent-primary);
    font-weight: 500;
}

.nav-item.active .nav-link::before {
    transform: scaleY(1);
    box-shadow: 0 0 10px var(--accent-primary);
}

.nav-icon {
    font-size: 1.2rem;
    width: 1.75rem;
    text-align: center;
    transition: transform var(--transition-fast);
}

.nav-link:hover .nav-icon {
    transform: scale(1.15);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.tor-status {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--warning);
    animation: blink 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px var(--warning);
}

.tor-status.connected .status-dot {
    background: var(--success);
    animation: none;
    box-shadow: 0 0 10px var(--success);
}

.tor-status.connected {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@keyframes blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--warning); }
    50% { opacity: 0.4; box-shadow: 0 0 4px var(--warning); }
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.network-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-tertiary);
}

.content-area {
    padding: 2rem;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    background-image: var(--card-gradient);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 170, 0.3), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover {
    border-color: rgba(0, 212, 170, 0.25);
    box-shadow: var(--shadow-md), 0 0 30px rgba(0, 212, 170, 0.05);
    transform: translateY(-2px);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    display: flex;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.15);
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.wallet-card {
    grid-column: span 1;
}

.wallet-address {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.address-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    word-break: break-all;
    color: var(--text-secondary);
}

.wallet-balance {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.balance-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.balance-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Privacy Card */
.privacy-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shield-icon {
    font-size: 2.5rem;
}

.shield-icon.active {
    animation: shield-pulse 2s ease-in-out infinite;
}

@keyframes shield-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.shield-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.shield-title.success { color: var(--success); }
.shield-title.warning { color: var(--warning); }
.shield-title.error { color: var(--error); }

.shield-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tor-ip {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    margin-top: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.ip-label {
    color: var(--text-muted);
}

.ip-value {
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-value {
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 1.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 212, 170, 0.08) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.action-btn:hover {
    border-color: rgba(0, 212, 170, 0.3);
    color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.action-btn:hover::before {
    opacity: 1;
}

.action-icon {
    font-size: 1.75rem;
    transition: transform var(--transition-normal);
    position: relative;
    z-index: 1;
}

.action-btn:hover .action-icon {
    transform: scale(1.2);
}

.action-text {
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Security Notice */
.security-notice {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(124, 58, 237, 0.1));
    border: 1px solid var(--border-glow);
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
}

.notice-icon {
    font-size: 1.5rem;
}

.notice-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.notice-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
    width: 200%;
    height: 200%;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 170, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.625rem;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 0.95rem 1.125rem;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:hover {
    border-color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(0, 212, 170, 0.1);
    background: var(--bg-card);
}

.form-input.mono {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-hint.success { color: var(--success); }
.form-hint.error { color: var(--error); }
.form-hint.warning { color: var(--warning); }

/* ============================================
   WALLET PAGE
   ============================================ */

.tab-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--bg-tertiary);
}

.tab-btn.active {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tab-content.hidden {
    display: none;
}

/* Generate Options */
.generate-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.option-card {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.option-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.option-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 50px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Warning Banner */
.warning-banner {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
}

.warning-icon {
    font-size: 1.5rem;
}

.warning-text strong {
    color: var(--warning);
}

.warning-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Wallet Details */
.wallet-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.75rem;
}

.detail-row label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.detail-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.detail-value span {
    flex: 1;
    word-break: break-all;
}

.hidden-key {
    color: var(--text-muted);
    font-style: italic;
}

/* Current Wallet Display */
.current-wallet-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wallet-address-display,
.wallet-balance-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.wallet-address-display .label,
.wallet-balance-display .label {
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 60px;
}

.wallet-address-display .value {
    flex: 1;
    word-break: break-all;
}

/* ============================================
   SEND PAGE
   ============================================ */

.from-address-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.balance-badge {
    padding: 0.25rem 0.75rem;
    background: var(--accent-glow);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.amount-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.amount-input-wrapper .form-input {
    flex: 1;
}

.gas-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gas-item {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.gas-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.gas-value {
    font-weight: 500;
}

/* Transaction Summary */
.transaction-summary {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
}

.transaction-summary h4 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.summary-row.total {
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.send-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* TX Status */
.tx-success {
    text-align: center;
    padding: 1rem;
}

.success-icon {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.tx-hash-display {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin: 1rem 0;
}

.tx-hash-display .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.tx-hash-display .value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    word-break: break-all;
    display: block;
    margin-bottom: 0.75rem;
}

/* ============================================
   HISTORY PAGE
   ============================================ */

.address-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.address-input-wrapper .form-input {
    flex: 1;
}

.balance-display {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.balance-display .balance-label {
    color: var(--text-muted);
}

.balance-display .balance-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Transaction List */
.tx-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.tx-item:hover {
    background: var(--bg-card-hover);
}

.tx-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
}

.tx-item.incoming .tx-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.tx-item.outgoing .tx-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.tx-details {
    flex: 1;
}

.tx-primary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.tx-type {
    font-weight: 500;
}

.tx-amount {
    font-weight: 600;
    font-family: var(--font-mono);
}

.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--error); }

.tx-secondary {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tx-address {
    font-size: 0.8rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.page-info {
    color: var(--text-muted);
}

/* Loading */
.loading-card {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-right-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.25rem;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.2);
}

.loading-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h4 {
    margin-bottom: 0.625rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   SETTINGS PAGE
   ============================================ */

.tor-status-detail,
.session-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-row,
.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.status-row .status-value.success { color: var(--success); }
.status-row .status-value.error { color: var(--error); }

.network-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.session-actions {
    margin-top: 1rem;
}

.security-note {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--accent-glow);
    border-radius: var(--border-radius-sm);
    margin-top: 1rem;
}

.security-note p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Privacy Architecture */
.privacy-architecture {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.arch-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.arch-icon {
    font-size: 1.5rem;
}

.arch-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.arch-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.arch-arrow {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

/* About */
.about-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.about-content h5 {
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.about-content p {
    color: var(--text-secondary);
}

.about-content ul {
    list-style: none;
    padding-left: 0;
}

.about-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.about-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

#toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
    backdrop-filter: blur(10px);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.1) 100%);
}
.toast.error {
    border-color: var(--error);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(239, 68, 68, 0.1) 100%);
}
.toast.warning {
    border-color: var(--warning);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.1) 100%);
}
.toast.info {
    border-color: var(--info);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.toast-icon {
    font-size: 1.35rem;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden {
    display: none !important;
}

.mono {
    font-family: var(--font-mono);
}

.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }

.no-wallet {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .generate-options {
        grid-template-columns: 1fr;
    }
    
    .gas-display {
        grid-template-columns: 1fr;
    }
    
    .network-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu Button - Hidden on desktop */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
        margin-right: 1rem;
    }

    /* Sidebar */
    .sidebar {
        position: fixed;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .content-area {
        padding: 1rem;
    }

    .top-bar {
        padding: 0.75rem 1rem;
    }

    .top-bar .page-title h1 {
        font-size: 1.25rem;
    }

    /* Network selector - smaller on mobile */
    .network-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .network-name {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .network-dropdown {
        min-width: 250px;
        right: -10px;
    }

    /* Cards */
    .card {
        padding: 1rem;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    /* Action buttons */
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .action-btn {
        padding: 0.75rem;
    }

    /* Forms */
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Token selector */
    .token-select-btn {
        padding: 0.75rem;
    }

    .token-select-icon {
        font-size: 1.25rem;
    }

    .token-select-symbol {
        font-size: 0.95rem;
    }

    .token-select-name {
        font-size: 0.75rem;
    }

    .token-balance-amount {
        font-size: 0.9rem;
    }

    .token-dropdown {
        max-height: 250px;
    }

    /* Prices grid */
    .prices-grid {
        gap: 0.5rem;
    }

    .price-item.main-token {
        padding: 0.6rem 0.8rem;
    }

    /* Transaction history */
    .tx-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tx-details {
        width: 100%;
    }

    .tx-actions {
        width: 100%;
    }

    .tx-actions .btn {
        width: 100%;
    }

    /* Balance display */
    .wallet-balance {
        font-size: 1.5rem;
    }

    .wallet-usd {
        font-size: 1rem;
    }

    /* Security notice */
    .security-notice {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .notice-icon {
        margin-bottom: 0.5rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }

    .network-name {
        display: none;
    }

    .network-btn {
        padding: 0.5rem;
    }

    .prices-grid {
        grid-template-columns: 1fr;
    }

    .price-item.main-token {
        grid-column: span 1;
    }

    .dashboard-grid {
        gap: 1rem;
    }

    /* Address display */
    .address-text {
        font-size: 0.8rem;
    }
    
    /* Card improvements for small screens */
    .card {
        border-radius: var(--border-radius-sm);
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.875rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-footer {
        padding: 0.875rem 1rem;
    }
    
    /* Better touch targets */
    .btn {
        min-height: 44px;
    }
    
    .btn-sm {
        min-height: 36px;
    }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .content-area {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
    
    .sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ============================================
   NETWORK SELECTOR
   ============================================ */

.network-selector {
    position: relative;
}

.network-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.network-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.1);
}

.network-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-tertiary);
    transition: all var(--transition-normal);
}

.network-dot.bsc {
    background: #f0b90b;
    box-shadow: 0 0 8px rgba(240, 185, 11, 0.5);
}

.network-dot.tron {
    background: #ff0013;
    box-shadow: 0 0 8px rgba(255, 0, 19, 0.5);
}

.dropdown-arrow {
    font-size: 0.65rem;
    transition: transform var(--transition-normal);
    color: var(--text-muted);
}

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

.network-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    overflow: hidden;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.network-dropdown.hidden {
    display: none;
}

.network-option {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--border-subtle);
}

.network-option:last-child {
    border-bottom: none;
}

.network-option:hover {
    background: var(--bg-tertiary);
}

.network-option.active {
    background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
}

.network-icon {
    font-size: 1.5rem;
}

.network-info {
    flex: 1;
}

.network-title {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.network-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.check-mark {
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1rem;
}

.check-mark.hidden {
    visibility: hidden;
}

/* ============================================
   TOKEN SELECTOR (Send Page)
   ============================================ */

.token-selector {
    position: relative;
    margin-bottom: 1.5rem;
}

.token-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.token-select-btn:hover {
    border-color: var(--accent-primary);
}

.token-select-btn .dropdown-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.token-select-btn:hover .dropdown-arrow {
    color: var(--accent-primary);
}

.token-select-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.token-select-icon {
    font-size: 1.5rem;
}

.token-select-details {
    text-align: left;
}

.token-select-symbol {
    display: block;
    font-weight: 600;
}

.token-select-name {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.token-select-balance {
    text-align: right;
}

.token-balance-amount {
    display: block;
    font-family: var(--font-mono);
}

.token-balance-usd {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-primary);
}

.token-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.token-dropdown.hidden {
    display: none;
}

.token-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.token-option:last-child {
    border-bottom: none;
}

.token-option:hover {
    background: var(--bg-tertiary);
}

.token-option.active {
    background: var(--accent-glow);
}

.token-option-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.token-option-icon {
    font-size: 1.25rem;
}

.token-option-symbol {
    font-weight: 500;
}

.token-option-name {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.token-option-balance {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}
