/* ============================================================
   Matchic — App UI Mockup (CSS-only)
   Simulates the actual app interface with multiple screens
   ============================================================ */

/* ===== APP MOCKUP CONTAINER ===== */
.app-mockup-wrapper {
  position: relative;
  width: 300px;
  margin: 0 auto;
  perspective: 1200px;
}

.app-phone-frame {
  width: 300px;
  height: 620px;
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border-radius: 44px;
  padding: 14px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  animation: phone-entrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.4s;
}

.app-phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 32px;
  background: #1a1a2e;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.app-phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a1a 0%, #151030 100%);
  position: relative;
}

/* Light mode */
[data-theme="light"] .app-phone-frame {
  background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .app-phone-screen {
  background: linear-gradient(180deg, #f8f9fa, #e9ecef);
}

[data-theme="light"] .app-phone-notch {
  background: #f0f0f0;
}

/* ===== SCREEN ROTATION ===== */
.app-screens {
  width: 100%;
  height: 100%;
  position: relative;
}

.app-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: screen-cycle 12s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
}

.app-screen:nth-child(1) { animation-delay: 0s; }
.app-screen:nth-child(2) { animation-delay: 4s; }
.app-screen:nth-child(3) { animation-delay: 8s; }

@keyframes screen-cycle {
  0%, 20% { opacity: 1; }
  33%, 87% { opacity: 0; }
  100% { opacity: 0; }
}

/* ===== SCREEN 1: CLOSET ===== */
.mock-closet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0 var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mock-closet-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: #fff;
}

.mock-closet-search {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-xs);
  margin: var(--space-2) 0;
}

.mock-closet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.mock-item {
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  animation: mock-item-pop 0.4s ease-out both;
}

.mock-item::after {
  content: attr(data-tag);
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

.mock-item:nth-child(1) { background: linear-gradient(135deg, #5C6BC0, #3949AB); height: 100px; animation-delay: 0.1s; }
.mock-item:nth-child(2) { background: linear-gradient(135deg, #EF5350, #D32F2F); height: 130px; animation-delay: 0.2s; }
.mock-item:nth-child(3) { background: linear-gradient(135deg, #66BB6A, #43A047); height: 115px; animation-delay: 0.3s; }
.mock-item:nth-child(4) { background: linear-gradient(135deg, #FFA726, #F57C00); height: 95px; animation-delay: 0.4s; }
.mock-item:nth-child(5) { background: linear-gradient(135deg, #AB47BC, #8E24AA); height: 125px; animation-delay: 0.5s; }
.mock-item:nth-child(6) { background: linear-gradient(135deg, #26C6DA, #00ACC1); height: 105px; animation-delay: 0.6s; }

@keyframes mock-item-pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.mock-nav-bar {
  display: flex;
  justify-content: space-around;
  padding: var(--space-3) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.mock-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 9px;
}

.mock-nav-item.active {
  color: var(--primary);
}

.mock-nav-item svg {
  width: 20px;
  height: 20px;
}

/* ===== SCREEN 2: OUTFIT SUGGESTION ===== */
.mock-outfit-header {
  padding: var(--space-2) 0;
}

.mock-outfit-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-1);
}

.mock-outfit-subtitle {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

.mock-outfit-card {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(3, 218, 198, 0.08));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: var(--glass-radius);
  padding: var(--space-4);
  margin: var(--space-3) 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mock-outfit-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.mock-outfit-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.mock-outfit-info h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.mock-outfit-info p {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

.mock-outfit-ai-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(33, 150, 243, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: 100px;
  font-size: var(--text-xs);
  color: var(--primary-light);
  align-self: center;
  margin-top: auto;
  animation: pulse-badge 2s ease-in-out infinite;
}

/* ===== SCREEN 3: SCAN ===== */
.mock-scan-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mock-scan-frame {
  width: 180px;
  height: 180px;
  border: 2px dashed rgba(33, 150, 243, 0.4);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: scan-pulse 2s ease-in-out infinite;
}

.mock-scan-frame::before,
.mock-scan-frame::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--primary);
}

.mock-scan-frame::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
  border-radius: 20px 0 0 0;
}

.mock-scan-frame::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 20px 0;
}

@keyframes scan-pulse {
  0%, 100% { border-color: rgba(33, 150, 243, 0.3); }
  50% { border-color: rgba(33, 150, 243, 0.7); }
}

.mock-scan-label {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.mock-scan-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  justify-content: center;
}

.mock-scan-tag {
  padding: var(--space-1) var(--space-3);
  background: rgba(33, 150, 243, 0.15);
  border: 1px solid rgba(33, 150, 243, 0.25);
  border-radius: 100px;
  font-size: var(--text-xs);
  color: var(--primary-light);
  animation: tag-pop 0.3s ease-out both;
}

.mock-scan-tag:nth-child(1) { animation-delay: 0.5s; }
.mock-scan-tag:nth-child(2) { animation-delay: 0.7s; }
.mock-scan-tag:nth-child(3) { animation-delay: 0.9s; }
.mock-scan-tag:nth-child(4) { animation-delay: 1.1s; }

@keyframes tag-pop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== FLOATING FEATURE TAGS ===== */
.phone-float-items {
  position: absolute;
  top: 0;
  right: -60px;
  left: -60px;
  bottom: 0;
  pointer-events: none;
  z-index: 3;
}

.float-tag {
  position: absolute;
  padding: 8px 16px;
  background: var(--surface-solid);
  backdrop-filter: blur(16px);
  border: var(--glass-border) solid var(--border);
  border-radius: 100px;
  font-size: var(--text-xs);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: float 4s ease-in-out infinite;
  white-space: nowrap;
}

.float-tag svg {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: middle;
}

/* Light mode float tags */
[data-theme="light"] .float-tag {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== ANIMATIONS ===== */
@keyframes phone-entrance {
  0% {
    transform: translateY(60px) rotateY(-15deg) scale(0.9);
    opacity: 0;
  }
  100% {
    transform: translateY(0) rotateY(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-12px) translateX(4px); }
  50% { transform: translateY(-6px) translateX(-4px); }
  75% { transform: translateY(-18px) translateX(2px); }
}

@keyframes pulse-badge {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .app-mockup-wrapper {
    display: none;
  }
}
