:root {
	--night-neon: #00f2ff;
	--night-pink: #ff007b;
	--night-carbon: #121212;
	--night-concrete: #1e1e1e;
	--night-glass: rgba(255, 255, 255, 0.03);
	--night-border: rgba(255, 255, 255, 0.1);
}

.night-dashboard {
	background: linear-gradient(145deg, var(--night-carbon), #0a0a0a);
	color: #e0e0e0;
	padding: 2.5rem;
	border-radius: 16px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	border: 1px solid var(--night-border);
	box-shadow: 0 20px 40px rgba(0,0,0,0.6);
	position: relative;
	overflow: hidden;
}

/* Efecto Holograma/Cristal */
.night-dashboard::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(0,242,255,0.03) 0%, transparent 70%);
    pointer-events: none;
}

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

.night-xp-wrapper {
	margin-top: 5px;
	margin-bottom: 15px;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	padding: 3px;
}
.night-xp-bar {
	position: relative;
	height: 18px;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 2px;
	overflow: hidden;
}
.night-xp-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: linear-gradient(90deg, #f2c94c, #f2994a);
	box-shadow: 0 0 10px rgba(242, 201, 76, 0.5);
	transition: width 0.3s ease;
}
.night-xp-text {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 11px;
	font-weight: bold;
	text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
	letter-spacing: 1px;
	z-index: 2;
}

.night-metropolis-preview {
    background: #050505;
    height: 150px;
    border-radius: 12px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.03);
    box-shadow: inset 0 0 30px rgba(0,0,0,1);
}

.night-sky { position: absolute; width:100%; height:100%; z-index: 0; }
.night-stars {
    position: absolute; width: 100%; height: 100%;
    background-image: radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)), radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)), radial-gradient(1px 1px at 50px 160px, #fff, rgba(0,0,0,0));
    background-size: 200px 200px; opacity: 0.1;
}
.night-moon {
    width: 20px; height: 20px; background: #eee;
    border-radius: 50%; position: absolute; top: 20px; right: 40px;
    opacity: 0.1; filter: blur(1px);
}

.night-metropolis-preview.immersive.widescreen {
    height: 280px;
    background: linear-gradient(to bottom, #04040a 0%, #111135 60%, #1a1a4a 100%);
}

/* Sol Post-apocalíptico Detrás del Skyline */
.night-sky-sun {
    position: absolute;
    top: 25px;
    right: 50px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #ff5500 0%, rgba(255, 85, 0, 0.4) 40%, transparent 80%);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.35;
}

/* Capas de Profundidad */
.night-skyline-far {
    position: absolute; bottom: 0; width: 100%; display: flex; align-items: flex-end; justify-content: space-around; opacity: 0.2; z-index: 1;
}
.night-b.far { background: #1a1a1a; width: 50px; height: 70px; filter: blur(3px); margin: 0 10px; }
.night-b.far:nth-child(2) { height: 110px; width: 60px; }
.night-b.far:nth-child(5) { height: 90px; }

.night-skyline-mid {
    position: absolute; bottom: 0; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 20px; opacity: 0.35; z-index: 2;
}
.night-b.mid { background: #22222a; width: 35px; height: 100px; filter: blur(1px); }
.night-b.mid:nth-child(2) { height: 140px; width: 45px; }
.night-b.mid:nth-child(3) { height: 120px; }

.night-skyline {
    position: absolute; bottom: 0; width: 100%;
    display: flex; align-items: flex-end; justify-content: center;
    z-index: 3;
}

/* Identidad Única de Edificios (Minimalista) */
.night-b { border-radius: 2px 2px 0 0; position: relative; transition: all 0.5s; border-left: 1px solid rgba(255,255,255,0.02); }
.night-antenna { position: absolute; width:1px; height:15px; background: #444; top: -15px; left: 50%; opacity: 0.5; }
.night-antenna::after { content: ''; position: absolute; top:0; left:-1px; width:3px; height:3px; background: #ff5500; border-radius: 50%; box-shadow: 0 0 4px #ff5500; opacity: 0.8; animation: blink 2s infinite; }

@keyframes blink { 0%, 100% { opacity: 0.8; } 50% { opacity: 0.2; } }

.night-b.b1 { height: 95px; width: 24px; background: #1a1a1f; margin-right: -4px; z-index: 5; }
.night-b.b8 { height: 50px; width: 12px; background: #222228; margin-right: 2px; }
.night-b.b12 { height: 75px; width: 18px; background: #14141a; margin-right: -3px; z-index: 4; }
.night-b.b2 { height: 65px; width: 22px; background: #282830; z-index: 5; border-right: 1px solid rgba(255,255,255,0.03); }
.night-b.b9 { height: 85px; width: 20px; background: #1d1d24; margin-left: -4px; z-index: 6; }
.night-b.b13 { height: 100px; width: 22px; background: #24242e; margin-left: 1px; z-index: 4; }
.night-b.b3 { height: 135px; width: 32px; background: #2d2d38; border-top: 2px solid var(--night-neon); z-index: 10; }
.night-b.b3 span { width: 2px; height: 15px; background: var(--night-neon); position: absolute; top: -15px; left: 15px; opacity: 0.6; box-shadow: 0 0 10px var(--night-neon); }
.night-b.b10 { height: 55px; width: 14px; background: #202028; margin-left: 2px; }
.night-b.b14 { height: 90px; width: 18px; background: #2a2a35; margin-left: -2px; z-index: 4; }
.night-b.b4 { height: 85px; width: 26px; background: #22222a; z-index: 5; border-top: 1px solid rgba(255,255,255,0.05); }
.night-b.b11 { height: 65px; width: 16px; background: #2a2a32; margin-left: -5px; z-index: 4; }
.night-b.b15 { height: 110px; width: 20px; background: #1d1d22; margin-left: 2px; z-index: 4; }
.night-b.b5 { height: 60px; width: 20px; background: #2e2e38; z-index: 5; }
.night-b.b5 span { width: 1px; height: 20px; background: #ff007b; position: absolute; top: -20px; left: 10px; opacity: 0.4; }
.night-b.b6 { height: 115px; width: 28px; background: #25252d; border-top: 2px solid var(--night-pink); z-index: 6; }
.night-b.b7 { height: 75px; width: 24px; background: #2d2d38; z-index: 5; }

/* Detalle: Ventanas */
.night-windows {
    position: absolute; width:100%; height:100%; top:0; left:0;
    background-image: 
        radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 4px 6px;
    opacity: 0.2;
}

/* Detalle: Señal Neón */
.night-neon-sign {
    position: absolute; top: 10px; left: 4px; width: 10px; height: 2px;
    background: var(--night-pink); box-shadow: 0 0 5px var(--night-pink);
    opacity: 0.4;
}

/* Balances Compactos */
.night-wallet-compact {
    display: flex; justify-content: space-around; background: var(--night-glass);
    padding: 10px; border-radius: 8px; border: 1px solid var(--night-border); margin-bottom: 20px;
}
.night-wallet-compact .coin { font-weight: 800; font-size: 0.9rem; color: #fff; }
.night-wallet-compact .coin span { color: var(--night-neon); margin-right: 4px; font-size: 0.8rem; }

/* Baterías Vitales */
.night-simulation-batteries { display: flex; gap: 15px; margin-bottom: 25px; }
.battery-item { flex: 1; text-align: center; }
.battery-label { font-size: 9px; color: #888; letter-spacing: 1px; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; }
#stamina-timer { color: var(--night-neon); font-family: monospace; font-size: 10px; font-weight: bold; }
.battery-body {
    height: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2px; position: relative; overflow: hidden; padding: 1px;
}
.battery-level { height: 100%; border-radius: 1px; transition: width 0.5s; }
.health .battery-level { background: linear-gradient(90deg, #ff4b2b, #ff416c); box-shadow: 0 0 10px rgba(255, 75, 43, 0.3); }
.stamina .battery-level { background: linear-gradient(90deg, #00f2ff, #00c3ff); box-shadow: 0 0 10px rgba(0, 242, 255, 0.3); }
.battery-pct { font-size: 10px; font-weight: bold; margin-top: 4px; color: #ccc; }

/* Action Grid */
.night-action-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px;
}
.night-btn-action {
    background: var(--night-glass); border: 1px solid var(--night-border); border-radius: 4px;
    padding: 12px; color: #eee; font-size: 10px; font-weight: 700; letter-spacing: 1px;
    cursor: pointer; transition: all 0.2s; text-transform: uppercase;
}
.night-btn-action:hover { background: rgba(255,255,255,0.08); border-color: var(--night-neon); }
.night-btn-action.work {
    grid-column: span 2; padding: 18px; font-size: 13px;
    background: linear-gradient(135deg, #222, #111); border-color: rgba(255,255,255,0.2);
}
.night-btn-action.work:not(.disabled) { border-color: var(--night-neon); color: var(--night-neon); box-shadow: 0 0 15px rgba(0, 242, 255, 0.15); }
.night-btn-action.disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(1); }

.night-overlay-dead {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center;
    z-index: 20; color: #ff0000; font-weight: 900; font-size: 1.5rem; backdrop-filter: blur(4px);
}

.night-guest-welcome { text-align: center; padding: 20px 0; }
.night-guest-welcome p { color: #888; font-size: 0.9rem; margin-bottom: 20px; }

/* Contenedor de Bitácoras Duales */
.night-logs-container { 
    display: grid !important; 
    grid-template-columns: 1fr 1fr !important; 
    gap: 15px; 
    margin-top: 15px; 
    align-items: start;
}
.night-activity-log, .night-global-log {
    min-width: 0;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--night-neon) rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.2); 
    border: 1px dashed var(--night-border);
    padding: 10px; 
    border-radius: 4px; 
    font-family: monospace;
}
.night-activity-log::-webkit-scrollbar,
.night-global-log::-webkit-scrollbar {
    width: 4px;
}
.night-activity-log::-webkit-scrollbar-track,
.night-global-log::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
.night-activity-log::-webkit-scrollbar-thumb,
.night-global-log::-webkit-scrollbar-thumb {
    background: var(--night-neon);
    border-radius: 2px;
}
.night-global-log .log-title,
.night-activity-log .log-title { 
    font-size: 9px; 
    color: #555; 
    margin-bottom: 8px; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    padding-bottom: 4px; 
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.night-refresh-btn {
    cursor: pointer;
    font-size: 12px;
    opacity: 0.5;
    transition: all 0.2s ease;
    user-select: none;
}
.night-refresh-btn:hover {
    opacity: 1;
    color: var(--night-neon);
    transform: rotate(180deg);
}
.night-global-log .log-entry,
.night-activity-log .log-entry { font-size: 10px; color: #777; margin-bottom: 4px; border-left: 2px solid var(--night-neon); padding-left: 8px; }

@media (max-width: 800px) {
    .night-logs-container { grid-template-columns: 1fr; }
}

/* Modales NightCity */
.night-modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); align-items: center; justify-content: center;
}
.night-modal-content {
    background: #111; border: 1px solid var(--night-border); width: 90%; max-width: 500px;
    padding: 25px; border-radius: 12px; position: relative; box-shadow: 0 0 30px rgba(0, 242, 255, 0.1);
}
.night-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.night-modal-header h3 { margin: 0; color: var(--night-neon); letter-spacing: 2px; font-size: 1.2rem; }
.night-close-modal { color: #555; font-size: 28px; cursor: pointer; transition: 0.3s; }
.night-close-modal:hover { color: #fff; }

/* Shop Grid */
.night-shop-grid { display: grid; grid-template-columns: 1fr; gap: 12px; max-height: 400px; overflow-y: auto; padding-right: 5px; }
.night-shop-item {
    display: flex; align-items: center; background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; gap: 15px;
}
.night-shop-item.is-locked { opacity: 0.5; filter: grayscale(1); }
.item-icon { font-size: 1.8rem; }
.item-info { flex: 1; }
.item-name { font-weight: 800; color: #fff; font-size: 0.9rem; }
.item-stats { font-size: 10px; color: var(--night-neon); margin: 2px 0; }
.item-req { font-size: 9px; color: #666; font-style: italic; }
.night-btn-buy {
    background: #222; border: 1px solid var(--night-border); color: #fff;
    padding: 8px 15px; border-radius: 4px; font-weight: bold; cursor: pointer; transition: 0.2s;
}
.night-btn-buy:hover:not(:disabled) { background: var(--night-neon); color: #000; border-color: var(--night-neon); }
.night-btn-buy:disabled { cursor: not-allowed; opacity: 0.5; }

/* Ranking Modal & Table */
.night-modal-content.ranking { max-width: 600px; }
.night-modal-scroll { max-height: 450px; overflow-y: auto; padding-right: 10px; }

.night-ranking-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.night-ranking-table th { text-align: left; font-size: 10px; color: #555; padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.night-ranking-table td { padding: 12px 10px; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.02); }

.night-ranking-table tr.is-top-1 { background: rgba(255, 215, 0, 0.05); }
.night-ranking-table tr.is-top-2 { background: rgba(192, 192, 192, 0.05); }
.night-ranking-table tr.is-top-3 { background: rgba(205, 127, 50, 0.05); }

.night-ranking-table .pos { font-weight: 800; font-family: monospace; width: 40px; }
.night-ranking-table tr.is-top-1 .pos { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.night-ranking-table tr.is-top-2 .pos { color: #c0c0c0; }
.night-ranking-table tr.is-top-3 .pos { color: #cd7f32; }

.night-ranking-table .player { display: flex; align-items: center; gap: 10px; }
.night-ranking-table .player .name { font-weight: bold; color: #fff; }
.night-ranking-table .mystery-box { cursor: help; font-size: 1.2rem; filter: drop-shadow(0 0 5px var(--night-neon)); animation: float-box 2s ease-in-out infinite; }

.night-ranking-table .coupons { color: var(--night-neon); font-weight: bold; }
.night-ranking-table .tier { font-size: 10px; color: #777; font-style: italic; }

@keyframes float-box {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.1); }
}

/* Notificaciones inmersivas */
#night-notifications-area { position: fixed; top: 20px; right: 20px; z-index: 100000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.night-notification-banner { 
    pointer-events: auto; width: 320px; background: rgba(18, 18, 18, 0.95); border-left: 4px solid var(--night-neon);
    padding: 15px; border-radius: 4px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); display: flex; gap: 15px;
    animation: slide-in-notif 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) both; position: relative;
    backdrop-filter: blur(10px); color: #fff;
}
.night-notification-banner .notif-icon { font-size: 1.8rem; display: flex; align-items: center; }
.night-notification-banner .notif-body strong { color: var(--night-neon); font-size: 0.8rem; letter-spacing: 1px; }
.night-notification-banner .notif-body .reason { font-weight: 800; font-size: 1rem; }
.night-notification-banner .notif-body small { display: block; margin-top: 5px; color: #aaa; font-style: italic; }
.night-notification-banner .notif-close { background: none; border: none; color: #555; cursor: pointer; position: absolute; top: 5px; right: 5px; }

@keyframes slide-in-notif {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.log-job-active {
	background: rgba(45, 45, 56, 0.5);
	padding: 10px;
	border-left: 2px solid var(--night-neon);
	margin-top: 5px;
	border-radius: 4px;
	font-size: 0.9em;
}
.log-job-active.job-tier-1 { border-left-color: #c4a484; }
.log-job-active.job-tier-1 strong, .log-job-active.job-tier-1 .job-timer { color: #c4a484; }
.log-job-active.job-tier-2 { border-left-color: #00a8ff; }
.log-job-active.job-tier-2 strong, .log-job-active.job-tier-2 .job-timer { color: #00a8ff; }
.log-job-active.job-tier-3 { border-left-color: #2ecc71; }
.log-job-active.job-tier-3 strong, .log-job-active.job-tier-3 .job-timer { color: #2ecc71; }
.log-job-active.job-tier-4 { border-left-color: #9b59b6; }
.log-job-active.job-tier-4 strong, .log-job-active.job-tier-4 .job-timer { color: #9b59b6; }
.log-job-active.job-tier-5 { border-left-color: #f2994a; }
.log-job-active.job-tier-5 strong, .log-job-active.job-tier-5 .job-timer { color: #f2994a; }

.log-job-active small { display: block; margin-top: 5px; color: #aaa; font-style: italic; }

.night-btn-primary {
    width: 100%; padding: 18px;
    background: linear-gradient(to right, #f2c94c, #f2994a); border: none; border-radius: 30px;
    color: #121212; font-weight: 800; letter-spacing: 2px; cursor: pointer; transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(242, 201, 76, 0.3);
}
.night-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(242, 201, 76, 0.4); }
