:root {
    --primary: #22C55E;        /* Emerald green */
    --primary-glow: rgba(34, 197, 94, 0.4);
    --primary-dark: #15803d;
    --gold: #D4AF37;           /* Premium gold accent */
    --gold-glow: rgba(212, 175, 55, 0.3);
    --bg-dark: #050505;        /* Near black */
    --bg-card: #111111;        /* Dark card */
    --bg-elevated: #1A1A1A;    /* Elevated surface */
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-active: rgba(34, 197, 94, 0.5);
    --success: #22C55E;
    --warning: #fbbf24;
    --danger: #ef4444;
    --gradient-1: linear-gradient(135deg, #22C55E 0%, #15803d 100%);
    --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #B4941F 100%);
    --gradient-bg: radial-gradient(circle at top, rgba(34, 197, 94, 0.1) 0%, transparent 60%);
    
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    background-image: var(--gradient-bg);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
}

.app-container {
    max-width: 480px; /* Mobile focused width */
    margin: 0 auto;
    padding-bottom: 90px;
    background: var(--bg-dark);
    min-height: 100vh;
    border-left: 1px solid rgba(255,255,255,0.02);
    border-right: 1px solid rgba(255,255,255,0.02);
}

/* Header */
.header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(5,5,5,0.9), rgba(5,5,5,0.6));
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
}

.logo-icon span {
    transform: rotate(-45deg);
    font-size: 14px;
}

/* Page Content */
.page-content {
    padding: 0 20px 20px;
    animation: fadeIn 0.4s ease-out;
}

.page-content.active {
    display: block;
}

/* Dashboard */
.greeting {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    font-family: var(--font-display);
    letter-spacing: -0.5px;
}

.greeting span {
    color: var(--primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Premium Card Styles */
.balance-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 30px 24px;
    margin-bottom: 24px;
    position: relative;
    border: 1px solid var(--border-active);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
    text-align: center;
}

.balance-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    font-weight: 500;
}

.balance-amount {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

/* Bracketed Button System */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    padding: 14px;
    border: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 4px; /* Slight rounding for bracket effect */
}

/* Primary Button: [ DEPOSIT ] style */
.btn-primary {
    background: var(--primary);
    color: #000;
    font-weight: 700;
    position: relative;
    clip-path: polygon(
        10px 0, 100% 0, 100% calc(100% - 10px), 
        calc(100% - 10px) 100%, 0 100%, 0 10px
    );
}

.btn-primary:hover {
    background: #4ade80;
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-2px);
}

/* Secondary Button: [ WITHDRAW ] style */
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    position: relative;
}

.btn-secondary::before, .btn-secondary::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 100%;
    border: 1px solid var(--gold);
    top: 0;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.btn-secondary::before {
    left: 0;
    border-right: none;
}

.btn-secondary::after {
    right: 0;
    border-left: none;
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-secondary:hover::before, .btn-secondary:hover::after {
    opacity: 1;
    width: 12px;
}

/* Full width CTA */
.btn-purchase {
    width: 100%;
    padding: 18px;
    background: var(--gradient-1);
    border: none;
    color: black;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(
        20px 0, 100% 0, 100% calc(100% - 20px), 
        calc(100% - 20px) 100%, 0 100%, 0 20px
    );
}

.btn-purchase:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px var(--primary-glow);
}

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

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--gold);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Transactions List */
.transactions-section {
    margin-top: 32px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    display: block;
}

.transaction-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
}

.transaction-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.transaction-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.transaction-amount {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--text-primary); /* Neutral for withdrawal */
}

/* Auction Page Styling */
.auction-timer {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 24px;
    border: 1px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.timer-header {
    background: rgba(212, 175, 55, 0.1);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.session-label {
    font-size: 12px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.timer-body {
    padding: 30px;
    text-align: center;
}

.timer-display {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 10px 0;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.session-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 20px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.2);
}

.info-item {
    text-align: center;
}

.info-item .label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.info-item .value {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* Purchase Form */
.purchase-form {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-subtle);
}

.shares-display-large {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.shares-count-huge {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 18px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid var(--border-subtle);
    padding: 12px 0 24px; /* Extra padding for iOS home indicator */
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.nav-container {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

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

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

.nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modals */
.modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-active);
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.modal-header {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-title {
    color: var(--gold);
    font-family: var(--font-display);
}

/* Auth Pages */
.auth-container {
    padding-top: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    font-size: 32px;
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 10px;
}

/* Toast */
.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-left-width: 4px;
}

.toast-title {
    font-family: var(--font-display);
}

/* Utilities */
.text-gold { color: var(--gold); }
.text-primary { color: var(--primary); }

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

/* Prominent Available Units Hero Card */
.available-units-hero {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 2px solid var(--primary);
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.2);
}

.units-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.3) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.units-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-weight: 600;
}

.units-count {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
    transition: all 0.3s ease;
}

.units-count.shares-updated {
    animation: units-pulse 0.5s ease;
}

@keyframes units-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: var(--gold); }
    100% { transform: scale(1); }
}

.units-rate {
    font-size: 14px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 6px;
    font-family: var(--font-display);
}

.units-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Live Activity Feed */
.live-activity-feed {
    margin-top: 20px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border-subtle);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.activity-feed-container {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
    transition: background 0.3s ease;
}

.activity-item:hover {
    background: rgba(255,255,255,0.02);
}

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

.activity-item.activity-new {
    animation: activity-slide-in 0.5s ease;
    background: rgba(34, 197, 94, 0.1);
}

@keyframes activity-slide-in {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.activity-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.activity-dot.action-bid {
    background: var(--gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.activity-dot.action-deposit {
    background: var(--success);
}

.activity-dot.action-profit {
    background: var(--success);
}

.activity-dot.action-withdraw {
    background: var(--warning);
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-user {
    color: var(--primary);
    font-weight: 600;
}

.activity-time {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: 0.7;
}

.activity-placeholder {
    padding: 20px;
}

/* Additional Utilities */
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* Form Group - Complete */
.form-group {
    margin-bottom: 20px;
}

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px 18px;
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--success);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 360px;
    animation: toastSlideIn 0.4s ease;
    pointer-events: auto;
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    font-family: var(--font-display);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: var(--text-secondary);
}

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

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

/* Social Proof Notifications */
.social-proof-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.social-proof-toast {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 340px;
    animation: socialProofSlideIn 0.5s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.social-proof-toast.toast-exit {
    animation: socialProofSlideOut 0.4s ease forwards;
}

.social-proof-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: black;
    flex-shrink: 0;
}

.social-proof-content { flex: 1; }

.social-proof-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.social-proof-action {
    font-size: 12px;
    color: var(--text-secondary);
}

.social-proof-action .amount {
    color: var(--gold);
    font-weight: 700;
    font-family: var(--font-display);
}

.social-proof-time {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 2px;
}

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

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

/* Responsive */
@media (max-width: 480px) {
    .greeting { font-size: 24px; }
    .balance-amount { font-size: 36px; }
    .timer-display { font-size: 40px; }
    .stats-grid { gap: 12px; }
    .stat-value { font-size: 18px; }
    
    .social-proof-container,
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .social-proof-toast,
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* Disabled state */
.btn-purchase:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}
