/* --- 1. Base Container --- */
.phone-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; 
  perspective: 1200px;
  padding: 2rem; 
}

/* --- 2. Phone Chassis (Matte Stealth Finish) --- */
.phone-chassis {
  position: relative;
  background-color: #000;
  border-radius: 3.2rem;
  transform-style: preserve-3d;
  
  /* Responsive sizing */
  width: 100%;
  max-width: 420px;       
  aspect-ratio: 9 / 19.5; 
  
  box-shadow: 
    0 0 0 1px #1a202c,
    0 0 0 6px #0a0a0a,
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 10px 25px -5px rgba(0, 0, 0, 0.5);
    
  transition: transform 0.4s cubic-bezier(0.1, 1, 0.2, 1); 
}

.phone-bezel {
  position: absolute;
  inset: -2px;
  border-radius: 3.1rem;
  border: 4px solid #000;
  pointer-events: none;
  z-index: 30;
  transform: translateZ(5px);
}

/* --- 3. The Screen & Content --- */
.phone-screen.reel-mode {
  position: absolute; 
  inset: 0;
  background-color: #000;
  border-radius: 2.8rem;
  overflow: hidden;
  color: #ffffff;
  transform: translateZ(2px);
  transform-style: preserve-3d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- 4. 3D Floating Effects --- */
.floating-ui {
  transform: translateZ(25px); 
  filter: drop-shadow(0 8px 15px rgba(0,0,0,0.4));
}

.floating-ui-heavy {
  transform: translateZ(40px); 
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.5));
}

.island-3d {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateZ(32px); 
  top: 12px;
  width: 28%;   
  height: 3.5%; 
  background-color: #000;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

/* --- 5. Background Layering --- */
.reel-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translateZ(0);
}

.reel-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom, 
    rgba(0,0,0,0.4) 0%, 
    transparent 20%, 
    transparent 60%, 
    rgba(0,0,0,0.8) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* --- 6. Status Bar & Icons --- */
.status-bar {
  top: 0;
  left: 0;
  right: 0;
  height: 7%; 
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10%;
  font-size: 0.75rem;
  font-weight: 700;
  position: absolute;
  z-index: 10;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* --- 7. Action Items (Sidebar) --- */
.reel-actions-stack {
  position: absolute;
  right: 12px;
  bottom: 12%; 
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px; 
  z-index: 10;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.action-item span {
  font-size: 0.7rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Fixed Audio Disc Logic */
.audio-disc-container {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0; /* Prevents squishing in flex stack */
}

.audio-disc {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- 8. Footer & User Info --- */
.reel-footer {
  position: absolute;
  bottom: 6%; 
  left: 16px;
  right: 60px; /* Room for sidebar */
  text-align: left;
  z-index: 10;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.reel-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.reel-username {
  font-size: 0.85rem;
  font-weight: 700;
}

.follow-btn {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

.reel-caption {
  font-size: 0.8rem;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #f7fafc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- 9. Bottom Navigation --- */
.bottom-nav.reel-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5%; 
  background-color: transparent;
  z-index: 10;
}

.home-indicator.light {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%) translateZ(35px);
  width: 30%; 
  height: 4px;
  background-color: #fff;
  border-radius: 10px;
  opacity: 0.8;
}
