/**
 * Apex-Links - Glassmorphism Dashboard
 * Design Premium avec effets de verre
 */

:root {
    --primary: #D4AF37;
    --primary-dark: #B8960C;
    --primary-light: #E5C158;
    --primary-glow: rgba(212, 175, 55, 0.4);
    
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    
    --bg-dark: #030712;
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --bg-input: rgba(30, 41, 59, 0.5);
    
    --glass-border: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #030712 0%, #0f172a 50%, #1e1b4b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 80% at 0% 100%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a { color: inherit; text-decoration: none; }

.app-container {
    max-width: 100%;
    min-height: 100vh;
}

.main-content {
    padding: 16px;
    padding-top: 76px;
    padding-bottom: 90px;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .main-content {
        padding: 100px 24px 40px;
        max-width: 1200px;
    }
    body { padding-bottom: 0; }
}

/* HEADER */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
}

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

.header-logo img {
    height: 32px;
}

.header-logo span {
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: var(--secondary);
    color: white;
    overflow: hidden;
    text-decoration: none;
}

.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* NAVIGATION MOBILE */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

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

.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.nav-item.active .nav-avatar {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.nav-item-center {
    position: relative;
    top: -12px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    color: #000;
    border: 3px solid var(--bg-dark);
}

.nav-item-center svg {
    width: 24px;
    height: 24px;
    stroke: #000;
}

@media (min-width: 768px) {
    .bottom-nav { display: none; }
}

/* CARDS */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* BALANCE CARD */
.balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary-dark) 100%);
    border: none;
    color: #000;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.3);
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10%, 10%) rotate(5deg); }
}

.balance-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 60px rgba(212, 175, 55, 0.4);
}

.balance-label {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.balance-change {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-card.active-session {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.2rem;
}

.stat-icon.green { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.stat-icon.red { background: rgba(239, 68, 68, 0.2); color: var(--error); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.2); color: var(--info); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }
.stat-icon.gold { background: rgba(212, 175, 55, 0.2); color: var(--primary); }

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* QUICK ACTIONS */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

.action-icon.deposit { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.action-icon.withdraw { background: rgba(239, 68, 68, 0.2); color: var(--error); }
.action-icon.trade { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }
.action-icon.team { background: rgba(59, 130, 246, 0.2); color: var(--info); }

.action-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* FORMS */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 44px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ALERTS */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--error); }
.alert-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--warning); }
.alert-info { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--info); }

/* LISTS */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.list-item:last-child { border-bottom: none; }

.list-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-icon.deposit { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.list-icon.withdraw { background: rgba(239, 68, 68, 0.2); color: var(--error); }
.list-icon.bonus { background: rgba(212, 175, 55, 0.2); color: var(--primary); }
.list-icon.referral { background: rgba(59, 130, 246, 0.2); color: var(--info); }

.list-content { flex: 1; min-width: 0; }
.list-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.list-subtitle { font-size: 0.75rem; color: var(--text-muted); }
.list-amount { text-align: right; font-weight: 700; font-size: 0.95rem; }
.list-amount.positive { color: var(--success); }
.list-amount.negative { color: var(--error); }

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge-error { background: rgba(239, 68, 68, 0.2); color: var(--error); }
.badge-info { background: rgba(59, 130, 246, 0.2); color: var(--info); }
.badge-gold { background: rgba(212, 175, 55, 0.2); color: var(--primary); }

/* PROGRESS */
.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* SECTION */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
}

.section-link {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

/* PAGE HEADER */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* TABS */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
}

/* COPY INPUT */
.copy-input {
    display: flex;
    gap: 8px;
}

.copy-input input {
    flex: 1;
}

.copy-btn {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* FILE UPLOAD */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.05);
}

.file-upload input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.file-upload-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-upload-text span {
    color: var(--primary);
    font-weight: 600;
}

/* UTILITIES */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.4s ease forwards;
}

/* QR CODE */
.qr-container {
    background: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    display: inline-block;
    margin: 16px 0;
}

.qr-container img {
    display: block;
    max-width: 200px;
}

/* CRYPTO ADDRESS */
.crypto-address {
    background: var(--bg-input);
    padding: 12px;
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    color: var(--text-secondary);
}

/* NETWORK SELECT */
.network-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.network-btn {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.network-btn:hover, .network-btn.active {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary);
}

/* TABLE */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

td {
    font-size: 0.9rem;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-input);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.lang-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--text-primary);
}

.lang-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.lang-flag {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 4px 6px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
}

.lang-name {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Avatar Upload */
.avatar-upload {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: var(--bg-input);
    border: 3px solid var(--primary);
}

.avatar-upload:hover .avatar-overlay {
    opacity: 1;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-letter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
}

/* Trading Code Display */
.trading-code-display {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 20px 30px;
    margin: 20px 0;
    display: inline-block;
}

.trading-code-display .code-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.trading-code-display .code-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 1.1rem;
}

/* ============================================
   PWA STYLES
   ============================================ */

/* Bannière d'installation */
.pwa-install-banner {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(150%);
    opacity: 0;
    transition: all 0.3s ease;
}

.pwa-install-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.pwa-install-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pwa-install-text strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.pwa-install-text span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-banner-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.pwa-install-banner-btn:hover {
    transform: scale(1.05);
}

.pwa-install-dismiss {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

/* Guide iOS */
.pwa-ios-guide {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.pwa-ios-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.pwa-ios-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.pwa-ios-content h3 {
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.pwa-ios-step .step-num {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.pwa-ios-step svg {
    margin-left: auto;
    stroke: var(--primary);
}

/* Notification de mise à jour */
.pwa-update-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 99999;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.pwa-update-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pwa-update-notification span {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.pwa-update-notification button {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Bouton d'installation PWA dans le header */
#pwa-install-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

#pwa-install-btn:hover {
    background: rgba(212, 175, 55, 0.15);
}

#pwa-install-btn svg {
    display: block;
}

/* Bouton d'installation dans le profil (version card) */
.pwa-install-card #pwa-install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-weight: 600;
}

.pwa-install-card #pwa-install-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
}
