/* ===== ANDROID PAGE SPECIFIC STYLES ===== */

/* Page Layout */
.android-page {
  overflow-x: hidden;
  background: linear-gradient(135deg, #0A0A0A 0%, #111111 100%);
}

.android-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}


.logo-link {
  text-decoration: none;
  color: inherit;
}

/* ===== SAMSUNG PHONE MOCKUP ===== */
.phone-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.samsung-phone {
  position: relative;
  width: 420px;
  height: 890px;
  max-height: 85vh;
  aspect-ratio: 9/19.5;
  animation: phoneEntrance 2s ease-out;
}

.phone-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #1c1c1e, #000000);
  border-radius: 40px;
  padding: 4px;
  box-shadow: 
    0 0 0 1px #333333,
    0 0 0 2px #1a1a1a,
    0 25px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 40px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  pointer-events: none;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 36px;
  overflow: hidden;
  cursor: pointer;
}


.phone-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 36px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 25%,
    transparent 75%,
    rgba(255, 255, 255, 0.02) 100%
  );
  pointer-events: none;
  z-index: 10;
}

.phone-shadow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3), transparent);
  border-radius: 50%;
  filter: blur(15px);
}

/* ===== LOCK SCREEN ===== */
.lock-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0f0f23, #1a1a2e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 5;
  opacity: 1;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.lock-screen.unlocking {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

.lock-time {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.lock-date {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: lockPulse 2s ease-in-out infinite;
}

.unlock-text {
  font-size: 0.9rem;
  opacity: 0.7;
  animation: fadeInOut 2s ease-in-out infinite;
}

/* ===== HOME SCREEN ===== */
.home-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000000;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.home-screen.active {
  opacity: 1;
  transform: scale(1);
}

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 8px 16px;
  background: transparent;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 10;
  position: relative;
  height: 40px;
}

.status-left .time {
  font-weight: 600;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.battery {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.battery-icon {
  animation: batteryPulse 3s ease-in-out infinite;
}

/* ===== WALLPAPER ===== */
.wallpaper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

/* ===== APP GRID ===== */
.app-grid-container {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 90px;
  overflow: hidden;
  padding: 15px;
}

.app-pages {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.app-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  grid-gap: 15px;
  align-content: start;
  padding: 10px;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.app-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 110, 199, 0.3), transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: 0;
}

.app-icon:hover::before,
.app-icon:focus::before {
  width: 120%;
  height: 120%;
}

.app-icon:hover,
.app-icon:focus {
  transform: translateY(-5px) scale(1.05);
  outline: none;
}

.app-icon:active {
  transform: translateY(-2px) scale(0.98);
}

.app-image {
  width: 75px;
  height: 75px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.app-icon:hover .app-image {
  box-shadow: 0 8px 25px rgba(255, 110, 199, 0.4);
  animation: iconGlow 1s ease-in-out;
}

.app-title {
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.1;
  max-width: 85px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== PAGE INDICATORS ===== */
.page-indicators {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.page-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.page-dot.active {
  background: var(--primary-neon);
  box-shadow: 0 0 10px rgba(255, 110, 199, 0.5);
  transform: scale(1.2);
}

/* ===== NAVIGATION BAR ===== */
.nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover,
.nav-btn:focus {
  color: white;
  background: rgba(255, 110, 199, 0.2);
  transform: scale(1.1);
  outline: none;
}

.nav-btn:active {
  transform: scale(0.95);
}

/* ===== APP POPUP MODAL ===== */
.app-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.app-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.app-popup {
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  position: relative;
  transform: scale(0.8) translateY(50px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-popup-overlay.active .app-popup {
  transform: scale(1) translateY(0);
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover,
.popup-close:focus {
  color: var(--primary-neon);
  background: rgba(255, 110, 199, 0.1);
  transform: scale(1.1);
  outline: none;
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.popup-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.popup-title-container h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.popup-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.popup-message {
  margin-bottom: 2rem;
  color: var(--text-secondary);
  text-align: center;
  font-size: 1rem;
}

.popup-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.discord-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-neon), var(--accent-pink));
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.discord-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.discord-btn:hover::before {
  left: 100%;
}

.discord-btn:hover,
.discord-btn:focus {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(255, 110, 199, 0.4);
  outline: none;
}

.discord-btn:active {
  transform: translateY(0) scale(0.98);
}

.discord-icon {
  font-size: 1.2rem;
}

/* ===== BACK TO HOME BUTTON ===== */
.back-to-home {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
}

.back-btn-home {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 2rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.back-btn-home:hover,
.back-btn-home:focus {
  background: rgba(255, 110, 199, 0.1);
  box-shadow: var(--shadow-neon);
  transform: translateX(-5px);
  outline: none;
}

/* ===== ANIMATIONS ===== */
@keyframes phoneEntrance {
  0% {
    opacity: 0;
    transform: scale(0.8) rotateY(-15deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
  }
}

@keyframes lockPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes batteryPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Wallpaper animation removed for realism */
/* @keyframes wallpaperShift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.05) rotate(1deg); }
} */

@keyframes iconGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 110, 199, 0.5)); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Idle animation for icons - DISABLED */
/* .app-icon {
  animation: iconFloat 4s ease-in-out infinite;
}

.app-icon:nth-child(2n) {
  animation-delay: 1s;
}

.app-icon:nth-child(3n) {
  animation-delay: 2s;
} */

/* ===== TOUCH FEEDBACK ===== */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 110, 199, 0.6);
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .android-main {
    padding: 1rem;
  }
  
  .samsung-phone {
    width: 350px;
    height: 740px;
    max-height: 80vh;
  }
  
  .back-to-home {
    position: fixed;
    top: 1rem;
    left: 1rem;
  }
  
  .app-page {
    grid-gap: 12px;
    padding: 8px;
    grid-template-rows: repeat(4, 1fr);
  }
  
  .app-image {
    width: 60px;
    height: 60px;
  }
  
  .app-title {
    font-size: 0.7rem;
    max-width: 70px;
  }
}

@media (max-width: 480px) {
  .samsung-phone {
    width: 300px;
    height: 635px;
    max-height: 85vh;
  }
  
  .app-popup {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .popup-buttons {
    flex-direction: column;
  }
  
  .discord-btn {
    justify-content: center;
  }
  
  .app-image {
    width: 55px;
    height: 55px;
  }
  
  .app-title {
    font-size: 0.65rem;
    max-width: 65px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .samsung-phone,
  .app-icon,
  .lock-icon,
  .unlock-text,
  .battery-icon,
  .wallpaper {
    animation: none !important;
  }
  
  .app-pages {
    transition: none !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .phone-frame {
    border: 2px solid #fff;
  }
  
  .app-icon {
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
  
  .page-dot {
    border: 1px solid #fff;
  }
}
