/* --- PERCY LAB: MASTER STYLESHEET --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

body.gateway-mode {
    background-color: #050505;
    background-image: radial-gradient(circle at 50% 0%, #112233 0%, #050505 70%);
    color: #ffffff; 
    font-family: 'Poppins', sans-serif;
    
    /* Responsive Hotfix */
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    box-sizing: border-box;
    padding: 30px 15px;
    
    min-height: 100vh; 
    margin: 0; 
    overflow-x: hidden; 
    overflow-y: auto;
}

/* --- 1. GATEWAY & CALIBRATION STYLES --- */
.percy-logo { width: 80px; margin-bottom: 20px; }
.percy-logo-small { width: 50px; margin-bottom: 20px; }

#gateway-container, #calibration-container {
    width: 85%; max-width: 380px; background: rgba(20, 20, 20, 0.7);
    padding: 40px 30px; border-radius: 24px; text-align: center;
    box-shadow: 0 10px 40px rgba(0, 195, 255, 0.1); border: 1px solid rgba(0, 195, 255, 0.15);
    backdrop-filter: blur(10px); animation: fadeIn 0.8s ease forwards;
}

#gateway-container h1 { color: #00f2fe; margin: 10px 0 5px 0; font-size: 2.2rem; text-shadow: 0 0 15px rgba(0, 242, 254, 0.4); }
#gateway-container p { color: #888; margin-bottom: 35px; font-size: 0.95rem; text-transform: uppercase; }

#auth-ui input, .input-grid input {
    width: 100%; padding: 16px; margin-bottom: 15px; border-radius: 12px;
    border: 1px solid #333; background: #0a0a0a; color: white; font-family: 'Poppins'; outline: none; box-sizing: border-box;
}
#auth-ui input:focus, .input-grid input:focus { border-color: #00f2fe; box-shadow: 0 0 10px rgba(0, 242, 254, 0.2); }

#login-btn, .next-btn {
    width: 100%; padding: 16px; background: linear-gradient(90deg, #00c6ff 0%, #0072ff 100%);
    border: none; border-radius: 12px; color: white; font-weight: 700; font-size: 1.1rem;
    cursor: pointer; text-transform: uppercase; box-shadow: 0 6px 20px rgba(0, 114, 255, 0.4);
}

.progress-track { width: 100%; height: 6px; background: #222; border-radius: 10px; overflow: hidden; margin-bottom:20px; }
#progress-fill { height: 100%; width: 20%; background: #00f2fe; box-shadow: 0 0 10px #00f2fe; transition: width 0.4s ease; }

.cal-slide { display: none; opacity: 0; }
.cal-slide.active { display: block; opacity: 1; animation: slideUp 0.5s ease forwards; }
.cal-slide h2 { font-size: 1.3rem; margin-bottom: 20px; }
.input-grid label { font-size: 0.85rem; color: #aaa; display: block; margin-bottom: 5px; text-align: left; }

.option-grid { display: flex; flex-direction: column; gap: 10px; }
.cal-card {
    background: #111; border: 2px solid #333; border-radius: 16px; padding: 18px; color: white;
    font-size: 1rem; font-family: 'Poppins'; cursor: pointer; text-align: left; font-weight: 600;
}
.cal-card:active { background: #00f2fe; color: black; }
.neon-text { color: #00f2fe; text-shadow: 0 0 15px rgba(0, 242, 254, 0.6); }


/* --- 2. DASHBOARD STYLES --- */
#dashboard-container {
    width: 100%; max-width: 450px; min-height: 100vh;
    display: flex; flex-direction: column; padding: 20px 20px 40px 20px; box-sizing: border-box;
    animation: fadeIn 1s ease forwards; margin: 0 auto;
}

/* Ensure global app views respect bounds and don't leak horizontally */
.app-view {
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    margin: 0 auto;
}

.dash-header { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.dash-titles { display: flex; flex-direction: column; }
.dash-title-main { color: #00f2fe; font-weight: 700; font-size: 1.3rem; text-shadow: 0 0 10px rgba(0,242,254,0.5); }
.dash-title-sub { color: #888; font-size: 0.85rem; }
.dash-profile { display: flex; flex-direction: column; align-items: center; font-size: 0.8rem; color: white; }
.dash-profile img { width: 45px; height: 45px; border-radius: 50%; border: 2px solid #00f2fe; margin-bottom: 5px; }

/* Engine Ring */
.engine-core { display: flex; justify-content: center; margin: 40px 0; }
.glow-ring {
    width: 250px; height: 250px; border-radius: 50%;
    background: conic-gradient(#00f2fe 0% 33%, #ff4b4b 33% 66%, #ffdd00 66% 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 30px rgba(0,242,254,0.2), inset 0 0 20px rgba(0,0,0,0.8);
}
.ring-inner {
    width: 230px; height: 230px; border-radius: 50%; background: #0a0a0a;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-inner h1 { font-size: 3rem; margin: 0; color: white; }
.ring-label { color: #aaa; font-size: 1rem; font-weight: 600; letter-spacing: 2px; margin-bottom: 5px; }
.ring-goal { color: #666; font-size: 0.9rem; }

/* Macros */
.fuel-gauges { display: flex; justify-content: space-between; gap: 10px; background: #111; padding: 20px; border-radius: 16px; border: 1px solid #333; margin-bottom: 20px; }
.macro-box { flex: 1; display: flex; flex-direction: column; }
.macro-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 5px; }
.macro-val { color: white; font-size: 0.85rem; margin-bottom: 8px; }
.bar-bg { width: 100%; height: 6px; background: #222; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }

/* Buttons & Nav */
#talk-btn {
    width: 100%; padding: 18px; background: #00f2fe; border: none; border-radius: 16px;
    color: black; font-weight: 700; font-size: 1.1rem; box-shadow: 0 0 20px rgba(0,242,254,0.4);
    cursor: pointer; transition: transform 0.2s; margin-bottom: 20px;
}
#talk-btn:active { transform: scale(0.97); }

.bottom-nav {
    display: flex; justify-content: space-between; padding: 15px 0; border-top: 1px solid #333; margin-top: auto;
}
.nav-item { display: flex; flex-direction: column; align-items: center; color: #666; font-size: 1.5rem; cursor: pointer; }
.nav-item span { font-size: 0.7rem; margin-top: 5px; font-weight: 600; font-family: 'Poppins'; }
.nav-item.active { color: #00f2fe; }


/* --- 3. YAZIO QUICK ADD ENGINE & UTILITIES --- */

/* Utility: Hides the ugly scrollbar on horizontal scroll areas like the filter rows */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Remove blue tap highlight on mobile devices for a native app feel */
.yazio-filter, .btn-open-yazio, .btn-yazio-quickadd, .btn-yazio-confirm {
    -webkit-tap-highlight-color: transparent;
}

/* Subtle interactions for Quick Add elements */
.btn-open-yazio:active { opacity: 0.6; }
.btn-yazio-quickadd:hover { background: rgba(0, 242, 254, 0.1) !important; }
.btn-yazio-confirm:active { transform: scale(0.95); }


/* --- 4. ANIMATIONS --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }