/* Core Neumorphic Variables */
:root {
    --bg: #e0e5ec;
    --text-main: #2d3436;
    --text-light: #636e72;
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --accent-green: #00e676;
    --accent-gold: #ffb300;
    --danger: #ff5252;
    
    /* Neumorphic Shadows */
    --shadow-out: 9px 9px 16px rgba(163, 177, 198, 0.6), -9px -9px 16px rgba(255, 255, 255, 0.5);
    --shadow-in: inset 6px 6px 10px 0 rgba(163, 177, 198, 0.6), inset -6px -6px 10px 0 rgba(255, 255, 255, 0.8);
    --shadow-out-hover: 4px 4px 8px rgba(163, 177, 198, 0.6), -4px -4px 8px rgba(255, 255, 255, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Neumorphic Base Classes --- */
.neumorphic {
    background: var(--bg);
    border-radius: 20px;
    box-shadow: var(--shadow-out);
    transition: all 0.3s ease;
}
.neumorphic-inset {
    background: var(--bg);
    border-radius: 15px;
    box-shadow: var(--shadow-in);
}
.hidden { display: none !important; }
.text-primary { color: var(--secondary); font-weight: 600; }

/* --- Layout --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    margin: 20px;
    border-radius: 20px;
    position: sticky;
    top: 20px;
    z-index: 1000;
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    padding: 0 20px 40px 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* --- Left Panel (Map & Feed) --- */
.left-panel { display: flex; flex-direction: column; gap: 30px; }

.map-wrapper {
    height: 500px;
    padding: 10px;
    display: flex;
    border: 2px solid transparent;
}
#map {
    width: 100%; height: 100%;
    border-radius: 12px;
    z-index: 1;
}

.economy-feed { padding: 20px; }
.feed-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px;
}
.feed-header h3 { font-size: 16px; color: var(--text-main); }
.live-indicator {
    width: 10px; height: 10px; background: var(--accent-green);
    border-radius: 50%; box-shadow: 0 0 10px var(--accent-green);
    animation: blink 1.5s infinite;
}
@keyframes blink { 0% {opacity: 1;} 50% {opacity: 0.3;} 100% {opacity: 1;} }

.feed-list {
    height: 150px; padding: 15px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px;
}
.feed-item {
    font-size: 13px; display: flex; justify-content: space-between;
    padding-bottom: 8px; border-bottom: 1px solid rgba(163,177,198,0.3);
}
.feed-item:last-child { border-bottom: none; }

/* --- Right Panel (Wallet, Portfolio & Pools) --- */
.right-panel { display: flex; flex-direction: column; gap: 30px; height: calc(100vh - 120px); }

/* The Wallet Display in Navbar */
.wallet-display {
    display: flex; align-items: center; gap: 15px;
}
.wallet-box {
    padding: 8px 20px;
    color: var(--accent-green);
    font-weight: 700;
    font-size: 15px;
    display: flex; align-items: center; gap: 8px;
}

.portfolio-panel { padding: 20px; }
.portfolio-panel h3 { font-size: 16px; margin-bottom: 15px; }
.portfolio-stats { display: flex; gap: 15px; }
.stat-box {
    flex: 1; padding: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.stat-box span { font-size: 12px; color: var(--text-light); }
.stat-box strong { font-size: 16px; color: var(--secondary); margin-top: 5px; }

.pools-wrapper { display: flex; flex-direction: column; overflow: hidden; flex: 1; }
.section-title { font-size: 18px; margin-bottom: 15px; color: var(--text-light); padding-left: 5px;}
.pools-list { display: flex; flex-direction: column; gap: 20px; overflow-y: auto; padding: 10px; padding-right: 15px; }

/* Pool Cards */
.pool-card {
    padding: 20px; cursor: pointer; border: 2px solid transparent;
}
.pool-card.active {
    box-shadow: var(--shadow-in);
    border: 2px solid var(--primary);
}
.pool-card:hover { transform: translateY(-3px); }
.pool-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;}
.pool-title { font-weight: 700; font-size: 16px; }
.yield-badge { font-size: 11px; font-weight: 700; color: var(--accent-green); background: rgba(0,230,118,0.1); padding: 4px 8px; border-radius: 8px; }
.pool-stats { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: var(--text-light);}
.progress-track { height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 15px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width 0.5s; }

/* --- Buttons & Inputs --- */
.btn {
    border: none; outline: none; padding: 10px 20px;
    border-radius: 25px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.neumorphic-btn {
    background: var(--bg); box-shadow: var(--shadow-out); color: var(--secondary); transition: all 0.2s;
}
.neumorphic-btn:hover { box-shadow: var(--shadow-out-hover); }
.neumorphic-btn:active { box-shadow: var(--shadow-in); }

.btn-action { background: var(--secondary); color: white; box-shadow: 4px 4px 10px rgba(58,123,213,0.4); }
.btn-action:hover { background: var(--primary); color: white; }

.neumorphic-input {
    width: 100%; padding: 12px 18px; border: none; outline: none;
    background: var(--bg); box-shadow: var(--shadow-in);
    border-radius: 12px; color: var(--text-main); font-size: 14px;
}

/* --- Modals & Toasts --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(224, 229, 236, 0.7); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center; z-index: 2000;
}
.modal-content { width: 350px; padding: 30px; position: relative; }
.close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-light); }
.auth-tabs { display: flex; padding: 5px; margin-bottom: 25px; }
.tab-btn { flex: 1; padding: 10px; background: transparent; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; color: var(--text-light); }
.tab-btn.active { background: var(--bg); box-shadow: var(--shadow-out); color: var(--primary); }
.input-group { margin-bottom: 15px; }
.auth-form .btn { width: 100%; margin-top: 10px; }
.error-text { color: var(--danger); font-size: 12px; text-align: center; margin-top: 10px; }

#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--accent-green); color: white; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 4px 12px rgba(0,230,118,0.3); animation: slideIn 0.3s forwards; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .dashboard { grid-template-columns: 1fr; }
    .right-panel { height: auto; }
    .pools-list { max-height: 500px; }
}
@media (max-width: 600px) {
    .navbar { flex-direction: column; gap: 15px; padding: 15px; text-align: center; margin: 10px; }
    .wallet-display { flex-direction: column; }
    .map-wrapper { height: 350px; }
}

