/* --- Advanced Premium Crypto App Design v3 --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

:root {
    --bg-dark: #0a0e17;
    --primary-neon: #00d2ff;
    --primary-dark: #3a7bd5;
    --accent-purple: #8a2be2;
    --success-neon: #00e676;
    --danger-neon: #ff1744;
    --glass-bg: rgba(16, 22, 35, 0.45);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: #8b94a5;
    --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Hide Scrollbar for a seamless app feel */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* --- Animated Glowing Background Orbs --- */
body::before, body::after {
    content: '';
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: floatOrb 15s infinite ease-in-out alternate;
}
body::before {
    top: -10%; left: -10%;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 60%);
}
body::after {
    bottom: 5%; right: -15%;
    background: radial-gradient(circle, var(--primary-dark) 0%, transparent 60%);
    animation-duration: 20s;
    animation-delay: -5s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    50% { transform: translate(60px, 100px) scale(1.3); opacity: 0.9; }
    100% { transform: translate(-40px, 150px) scale(0.8); opacity: 0.5; }
}

/* --- Layout Container --- */
.app-container {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    animation: fadeIn 0.8s ease-out;
}

/* --- Glassmorphism Master Classes --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    color: var(--text-main);
    transition: var(--transition-smooth);
}

/* --- Navbar --- */
nav.navbar {
    background: transparent !important;
    border: none !important;
    animation: fadeInDown 0.8s ease-out;
}
.brand-logo {
    border: 2px solid var(--primary-neon);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
}
.text-neon-cyan { color: var(--primary-neon); text-shadow: 0 0 10px rgba(0,210,255,0.6); }

/* --- Buttons --- */
.btn-neon-primary {
    background: linear-gradient(135deg, var(--primary-neon), var(--primary-dark));
    border: none; color: #fff;
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.4);
    transition: var(--transition-smooth);
}
.btn-neon-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 210, 255, 0.6);
    color: #fff;
}
.btn-neon-outline {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid var(--primary-neon);
    color: var(--primary-neon);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}
.btn-neon-success {
    background: linear-gradient(135deg, #00e676, #00b359);
    border: none; color: #fff;
    box-shadow: 0 8px 25px rgba(0, 230, 118, 0.4);
}

/* --- Neon Ticker --- */
.neon-ticker-container {
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.1) 50%, transparent);
    border-top: 1px solid rgba(0, 210, 255, 0.2);
    border-bottom: 1px solid rgba(0, 210, 255, 0.2);
}
.neon-icon { text-shadow: 0 0 10px var(--warning-color); }

/* --- Hero Dashboard Cards --- */
.glowing-orb-bg {
    position: absolute;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(0,210,255,0.4) 0%, transparent 70%);
    top: -50px; right: -50px;
    border-radius: 50%;
    z-index: 0;
}
.guest-orb { background: radial-gradient(circle, rgba(138,43,226,0.5) 0%, transparent 70%); left: -50px; }
.hero-card-logged-in *, .hero-card-guest * { z-index: 1; position: relative; }
.tracking-wider { letter-spacing: 2px; }

/* --- Quick Access Grid --- */
.quick-menu-item .icon-box {
    width: 55px; height: 55px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    margin: 0 auto;
    font-size: 24px;
    transition: var(--transition-smooth);
}
.pulse-blue { box-shadow: 0 0 0 rgba(0, 210, 255, 0.4); animation: pulseBlue 2s infinite; }
.pulse-orange { box-shadow: 0 0 0 rgba(255, 165, 0, 0.4); animation: pulseOrange 2.5s infinite; }
.pulse-green { box-shadow: 0 0 0 rgba(0, 230, 118, 0.4); animation: pulseGreen 2.2s infinite; }

@keyframes pulseBlue { 0% { box-shadow: 0 0 0 0 rgba(0,210,255,0.4); } 70% { box-shadow: 0 0 0 15px rgba(0,210,255,0); } 100% { box-shadow: 0 0 0 0 rgba(0,210,255,0); } }
@keyframes pulseOrange { 0% { box-shadow: 0 0 0 0 rgba(255,193,7,0.4); } 70% { box-shadow: 0 0 0 15px rgba(255,193,7,0); } 100% { box-shadow: 0 0 0 0 rgba(255,193,7,0); } }
@keyframes pulseGreen { 0% { box-shadow: 0 0 0 0 rgba(0,230,118,0.4); } 70% { box-shadow: 0 0 0 15px rgba(0,230,118,0); } 100% { box-shadow: 0 0 0 0 rgba(0,230,118,0); } }

/* --- Winner Feed (FOMO) --- */
.winner-feed-container { max-height: 85px; overflow: hidden; }
.winner-feed { display: flex; flex-direction: column; gap: 4px; }

/* --- Custom Dark Table --- */
.custom-dark-table { color: var(--text-main); background: transparent !important; }
.custom-dark-table th { 
    border-bottom: 1px solid var(--glass-border); 
    color: var(--text-muted); 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    padding: 12px 10px;
    background: transparent !important;
}
.custom-dark-table td { 
    border-bottom: 1px solid rgba(255,255,255,0.03); 
    padding: 15px 10px;
    vertical-align: middle;
    background: transparent !important;
}
.custom-dark-table tr {
    animation: slideUpFade 0.5s ease backwards;
    transition: var(--transition-smooth);
    background: transparent !important;
}
.custom-dark-table tr:hover, .custom-dark-table tr:hover td { background: rgba(255,255,255,0.05) !important; }
.custom-dark-table tr:nth-child(1) { animation-delay: 0.1s; }
.custom-dark-table tr:nth-child(2) { animation-delay: 0.2s; }
.custom-dark-table tr:nth-child(3) { animation-delay: 0.3s; }
.custom-dark-table tr:nth-child(4) { animation-delay: 0.4s; }

.coin-icon { border-radius: 50%; box-shadow: 0 0 10px rgba(255,255,255,0.2); }

/* --- Badges & Pills --- */
.neon-badge { background: rgba(255,255,255,0.1); border: 1px solid var(--glass-border); }
.blink { animation: blink 1.5s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.coin-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 700; font-size: 13px;
    min-width: 80px; text-align: center;
}
.pill-up { background: rgba(0, 230, 118, 0.15); color: var(--success-neon); }
.pill-down { background: rgba(255, 23, 68, 0.15); color: var(--danger-neon); }

/* --- Footer --- */
footer {
    position: fixed !important;
    bottom: 20px !important;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 470px;
    background: rgba(10, 14, 23, 0.85) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 30px;
    z-index: 1000;
    padding: 12px 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
}
footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px; font-weight: 600;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    flex: 1; transition: var(--transition-smooth);
}
footer a i { font-size: 20px; transition: var(--transition-smooth); }
footer a.active, footer a:hover { color: var(--primary-neon); }
footer a.active i, footer a:hover i { transform: translateY(-4px) scale(1.1); text-shadow: 0 0 15px var(--primary-neon); }
.market-center-icon {
    background: linear-gradient(135deg, var(--primary-neon), var(--primary-dark));
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transform: translateY(-15px);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.5);
    border: 3px solid #0a0e17;
}
.market-center-icon i { color: #fff !important; font-size: 22px; text-shadow: none !important; transform: none !important; }
footer a:hover .market-center-icon { transform: translateY(-20px) scale(1.05); }

/* Misc */
.form-control, .form-select { background: rgba(0,0,0,0.2) !important; color: #fff !important; border: 1px solid var(--glass-border) !important; }
.form-control:focus { border-color: var(--primary-neon) !important; box-shadow: 0 0 15px rgba(0,210,255,0.3); }

/* Toasts */
#customToastContainer {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; width: 90%; max-width: 400px;
}
.custom-toast {
    display: flex; align-items: center; padding: 14px 20px; margin-bottom: 10px;
    border-radius: 16px; color: #fff; font-weight: 600;
    backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.custom-toast.success { background: rgba(0, 230, 118, 0.8); }
.custom-toast.error { background: rgba(255, 23, 68, 0.8); }
.custom-toast.info { background: rgba(0, 210, 255, 0.8); }
.custom-toast.warning { background: rgba(255, 193, 7, 0.8); }

@keyframes slideUpFade { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }

/* Balance value styles for preventing container breakages */
.balance-value {
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
    text-align: right;
    display: block;
}
.fiat-value {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
    text-align: right;
    display: block;
}
.fiat-value span {
    color: inherit;
    font-family: inherit;
    font-size: inherit;
}

/* Custom responsive balance classes to prevent container overflow on mobile devices */
.balance-display-large {
    font-size: clamp(1.2rem, 6vw, 2.5rem) !important;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.balance-display-medium {
    font-size: clamp(0.9rem, 4.5vw, 1.5rem) !important;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.profile-info-value {
    font-size: clamp(0.75rem, 3.5vw, 1.1rem) !important;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    display: block;
    line-height: 1.2;
}
