/* ============================================
   DESKTOP.CSS - ESTRUCTURA BLINDADA CONTRA BUGS
   Proyecto: Tablet Android - Yeligzon
   ============================================ */

/* --- Pantalla Iniciando (transparente) --- */
.starting-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 4500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  font-family: 'Roboto', -apple-system, sans-serif;
}

.starting-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.starting-screen.hide {
  opacity: 0;
  pointer-events: none;
}

.starting-logo {
  font-size: 42px;
  font-weight: 300;
  letter-spacing: 10px;
  color: #ffffff;
  text-transform: lowercase;
  margin-bottom: 8px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.starting-subtitle {
  font-size: 13px;
  letter-spacing: 3px;
  color: #dddddd;
  text-transform: uppercase;
  margin-bottom: 60px;
}

.starting-bar-container {
  width: 260px;
  height: 4px;
  background-color: rgba(255,255,255,0.2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.starting-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 40%;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, #00e676, #ffffff, #00e676, transparent);
  animation: bar-go-back-forth 1.4s ease-in-out infinite;
}

@keyframes bar-go-back-forth {
  0%   { left: -40%; }
  50%  { left: 100%; }
  100% { left: -40%; }
}

/* ============================================
   ESCRITORIO PRINCIPAL
   ============================================ */
.desktop-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2564&auto=format&fit=crop') center/cover no-repeat;
  color: #ffffff;
  font-family: 'Roboto', -apple-system, sans-serif;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.desktop-screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- 1. BARRA DE ESTADO (FIJADA ARRIBA) --- */
.status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40px;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  box-sizing: border-box;
}

.status-left {
  display: flex;
  align-items: center;
}

#status-time {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-icon {
  width: 18px;
  height: 18px;
  fill: #ffffff;
  opacity: 0.95;
}

.status-battery-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-battery-text {
  font-size: 13px;
  font-weight: 600;
}

/* --- 2. CONTENIDO CENTRAL (RELOJ, BUSCADOR, APPS) --- */
.desktop-content {
  position: absolute;
  top: 40px;
  bottom: 120px;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 40px 0 40px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Reloj widget */
.desktop-clock-widget {
  text-align: center;
  margin-top: 6px;
  margin-bottom: 16px;
  text-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.desktop-clock-time {
  font-size: 72px;
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 1;
}

.desktop-clock-date {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  margin-top: 6px;
}

/* Buscador */
.search-bar {
  width: 100%;
  max-width: 850px;
  height: 50px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 28px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 14px;
  margin-bottom: 32px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

.search-bar:hover {
  background: rgba(255,255,255,0.26);
}

.search-bar span {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
}

.search-icon {
  width: 22px;
  height: 22px;
  fill: rgba(255,255,255,0.85);
}

/* Grid de Apps */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 24px;
  width: 100%;
  max-width: 880px;
  justify-items: center;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 90px;
  transition: transform 0.15s ease;
  user-select: none;
}

.app-icon:active {
  transform: scale(0.88);
}

.app-icon-img {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
}

.app-icon-img svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
}

.app-icon-name {
  font-size: 13px;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  text-align: center;
  max-width: 90px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Colores de Apps */
.icon-blue    { background: linear-gradient(135deg, #42a5f5, #1565c0); }
.icon-green   { background: linear-gradient(135deg, #66bb6a, #2e7d32); }
.icon-red     { background: linear-gradient(135deg, #ef5350, #c62828); }
.icon-orange  { background: linear-gradient(135deg, #ffa726, #ef6c00); }
.icon-purple  { background: linear-gradient(135deg, #ab47bc, #6a1b9a); }
.icon-teal    { background: linear-gradient(135deg, #26a69a, #00695c); }
.icon-pink    { background: linear-gradient(135deg, #ec407a, #ad1457); }
.icon-indigo  { background: linear-gradient(135deg, #5c6bc0, #283593); }
.icon-cyan    { background: linear-gradient(135deg, #26c6da, #00838f); }
.icon-gray    { background: linear-gradient(135deg, #78909c, #37474f); }
.icon-deep    { background: linear-gradient(135deg, #3949ab, #1a237e); }

/* --- 3. PARTE INFERIOR (PUNTOS Y DOCK FIJADOS ABAJO) --- */
.desktop-bottom {
  position: absolute;
  bottom: 16px;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 20;
}

.page-indicator {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.page-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}

.page-dot.active {
  background: #ffffff;
  width: 18px;
  border-radius: 4px;
}

.dock {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 12px 42px 14px 48px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 1px solid rgba(255,255,255,0.12);
  min-width: 460px;
  box-sizing: border-box;
}

.dock .app-icon {
  width: 60px;
}

.dock .app-icon-img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.dock .app-icon-img svg {
  width: 28px;
  height: 28px;
}

.dock .app-icon-name {
  display: none;
}
