@tailwind base; @tailwind components; @tailwind utilities; @import 'https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap'; @import 'https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap'; :root { --primary: #3a86ff; --secondary: #8338ec; --danger: #ff006e; --success: #06d6a0; --warning: #ffbe0b; --dark: #1a1a2e; --light: #f8f9fa; --glass: rgba(30, 30, 46, 0.7); --glass-border: rgba(255, 255, 255, 0.1); --location-bg: rgba(15, 23, 42, 0.9); --job-bg: rgba(15, 23, 42, 0.9); } * { margin: 0; padding: 0; border: 0; outline: 0; text-decoration: none; line-height: inherit; vertical-align: inherit; font-family: 'Mulish', sans-serif; box-sizing: border-box; } body { overflow: hidden; background-color: transparent; color: var(--light); } /* Modern glassmorphism logo */ .logo { position: absolute; top: 20px; right: 20px; width: 80px; height: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)); transition: transform 0.3s ease, opacity 0.3s ease; } /* Stats container - modern glass panel */ .stats { position: absolute; bottom: 1px; /* Reducido de 20px */ left: 15px; /* Reducido de 20px */ display: flex; gap: 8px; /* Reducido de 12px */ align-items: center; justify-content: flex-start; width: 380px; /* Reducido de 420px */ padding: 8px; /* Reducido de 12px */ -webkit-backdrop-filter: blur(10px); border-radius: 10px; /* Reducido de 12px */ } .stats .item { border-radius: 6px; /* Reducido de 8px */ width: calc(25% - 6px); /* Ajustado por el gap reducido */ height: 20px; /* Reducido de 24px */ background: rgba(0, 0, 0, 0.3); box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2); /* Reducido */ display: flex; align-items: center; justify-content: flex-start; gap: 5px; /* Añadido espacio entre icono y barra */ overflow: hidden; position: relative; padding-left: 5px; /* Añadido espacio interno */ } .stats .fill { border-radius: 4px; /* Reducido de 6px */ width: 0%; max-width: calc(100% - 25px); /* Ajustado para el nuevo espaciado */ height: 12px; /* Reducido de 16px */ transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); margin-left: 0; /* Eliminado el margen izquierdo */ margin-right: 5px; /* Añadido espacio a la derecha */ } /* Gradient fills with animation */ .stats .health .fill { background: linear-gradient(90deg, var(--danger), #ff6b9c); box-shadow: 0 0 10px rgba(255, 0, 110, 0.6); } .stats .water .fill { background: linear-gradient(90deg, var(--primary), #6bb9ff); box-shadow: 0 0 10px rgba(58, 134, 255, 0.6); } .stats .food .fill { background: linear-gradient(90deg, var(--success), #4ef1c2); box-shadow: 0 0 10px rgba(6, 214, 160, 0.6); } .stats .armour .fill { background: linear-gradient(90deg, var(--warning), #ffd166); box-shadow: 0 0 10px rgba(255, 190, 11, 0.6); } .stats .item svg { width: 12px; /* Reducido de 14px */ height: 12px; /* Reducido de 14px */ fill: white; /* left ya no es necesario por el padding-left */ z-index: 1; filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.7)); /* Reducido */ transition: transform 0.2s ease; } .stats .item:hover svg { transform: scale(1.1); } /* Speedometer - futuristic design */ .speedometer { position: absolute; bottom: 2vw; left: 50%; transform: translateX(-50%); display: flex; gap: 0.8vw; align-items: center; justify-content: center; transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); } .speedometer .item p.px { position: absolute; font-weight: 700; color: white; font-size: 0.7vw; margin-bottom: -1vw; width: 10.2vw; text-align: center; text-shadow: 0 0 8px rgba(0, 0, 0, 0.8); } .speedometer .item svg { width: 50%; fill: white; margin-bottom: 0.55vw; margin-right: 0.55vw; z-index: 1; filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.7)); transition: transform 0.3s ease; } .speedometer:hover .item svg { transform: scale(1.1); } .speedometer .speed-items { display: flex; align-items: center; opacity: 0; transition: opacity 0.4s ease; } .speedometer .item.speedNum { display: flex; padding: 0 1vw; align-items: center; color: white; background: transparent; flex-direction: column; } .speedometer .item.sItem, .speedometer .item.fuel { border-radius: 12px; width: 2.8vw; height: 2.8vw; background: var(--glass); -webkit-backdrop-filter: blur(4px); border: 1px solid var(--glass-border); display: flex; justify-content: flex-end; align-items: flex-end; overflow: hidden; position: relative; transition: transform 0.3s ease; } .speedometer .item.sItem:hover, .speedometer .item.fuel:hover { transform: translateY(-5px); } .speedometer .item.sItem .fill, .speedometer .item.fuel .fill { border-radius: 10px 10px 0 0; position: absolute; width: 100%; height: 0%; background: linear-gradient(to top, var(--primary), #6bb9ff); transition: height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); box-shadow: 0 -4px 12px rgba(58, 134, 255, 0.6); } .speedometer .item.fuel .fill { background: linear-gradient(to top, var(--warning), #ffd166); box-shadow: 0 -4px 12px rgba(255, 190, 11, 0.6); } .speedometer .item.fuel .px { position: absolute; bottom: 0.3vw; width: 100%; text-align: center; font-size: 0.8vw; color: white; z-index: 1; text-shadow: 0 0 8px rgba(0, 0, 0, 0.8); } .speedometer .more-info { position: absolute; bottom: 3vw; left: 50%; transform: translateX(-50%); display: flex; gap: 1vw; } .speedometer .item p { text-shadow: 0 0 10px rgba(0, 0, 0, 0.9); font-weight: 900; font-size: 1.8vw; line-height: 1.8vw; background: linear-gradient(to bottom, white, #e0e0e0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.05vw; } .speedometer .item p.px { line-height: normal; } .speedometer .item span { font-weight: 700; font-size: 0.7vw; text-shadow: 0 0 8px rgba(0, 0, 0, 0.8); display: flex; color: rgba(255, 255, 255, 0.8); } /* === Optimización de renders === */ .hud-layer { will-change: transform, opacity; contain: strict; } .stats .fill, .speed-value, .fuel-level { will-change: width, height, transform; } /* Pulsing animation for important elements */ @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } } .pulse { animation: pulse 2s infinite; } /* Glow effect for low stats */ .low-stat { animation: glow 1.5s infinite alternate; } @keyframes glow { from { box-shadow: 0 0 5px var(--danger); } to { box-shadow: 0 0 15px var(--danger); } } .hidden { display: none !important; opacity: 0; transform: scale(0.9); transition: all 0.3s ease; } /* === Ubicación estilo imagen 2 === */ .location-display { position: absolute; bottom: 210px; left: 25px; background: var(--location-bg); border-radius: 6px; padding: 10px 12px; width: 280px; display: flex; justify-content: space-between; transition: bottom 0.4s cubic-bezier(0.4, 0.2, 0.2, 1); /* transición suave */ } /* Nueva clase para bajar la ubicación cuando NO estás en vehículo */ .location-display.lowered { bottom: 40px; /* Ajusta el valor según donde lo quieras ver cuando bajas del coche */ } .route-info { text-align: left; max-width: 60%; } .route-name { font-size: 16px; font-weight: 800; color: white; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .street-name { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.9); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .time-info { text-align: right; } .current-time { font-size: 16px; font-weight: 700; color: white; margin-bottom: 2px; letter-spacing: 1px; } .current-date { font-size: 12px; color: rgba(255, 255, 255, 0.7); font-weight: 500; } /* === Efectos de actualización === */ @keyframes textUpdate { 0% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-3px); opacity: 0.5; } 100% { transform: translateY(0); opacity: 1; } } .updating { animation: textUpdate 0.6s ease; } /* === Efecto para velocidad === */ .speed-value { transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .speed-value.accelerating { color: #ff5555 !important; text-shadow: 0 0 10px rgba(255, 85, 85, 0.7); } .speed-value.decelerating { color: #55ff55 !important; text-shadow: 0 0 10px rgba(85, 255, 85, 0.7); } .hidden { display: none !important; }