@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@600;700;800;900&family=Noto+Sans+Sinhala:wght@600;700;800;900&display=swap');

/* App Hold Pages (Inside App View) Styles - Premium Native App Shell */

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #f0f9ff;
  --bg: #f8fafc;
  --card: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-sub: #334155;
  --text-muted: #64748b;
  --radius-lg: 1.25rem;
  --radius-md: 0.85rem;
  --max-w: 430px;
}

* {
  box-sizing: border-box;
}

body.app-screen-body {
  background: #cbd5e1;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  font-family: 'Outfit', 'Plus Jakarta Sans', 'Noto Sans Sinhala', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  width: 100%;
  overflow-x: hidden;
  letter-spacing: -0.015em;
}

/* Mobile App Canvas Frame */
.app-frame {
  width: 100%;
  max-width: var(--max-w);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 35px rgba(0,0,0,0.18);
  position: relative;
  overflow-y: auto;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  body.app-screen-body {
    background: var(--bg);
  }
  .app-frame {
    max-width: 100%;
    box-shadow: none;
  }
}

/* App Header Bar */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 20;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-avatar {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-greeting {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.user-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-badge {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* Main Content Area */
.app-content {
  flex: 1;
  padding: 1rem 1rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Download Status Card */
.download-status-card {
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
}

.status-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.status-spinner {
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 0 0 0.15rem 0;
  letter-spacing: -0.01em;
}

.status-sub {
  font-size: 0.76rem;
  color: var(--text-sub);
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}

.progress-bar-wrap {
  width: 100%;
  height: 0.65rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.15s ease, background 0.3s;
}

/* Guide Section */
.guide-section {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.guide-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #f1f5f9;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.guide-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.step-badge {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.guide-content {
  flex: 1;
  min-width: 0;
}

.guide-step-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.guide-step-desc {
  font-size: 0.74rem;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.35;
}

/* Mock UI Boxes for visual clarity */
.mock-alert-box {
  margin-top: 0.5rem;
  background: #0f172a;
  color: #ffffff;
  border-radius: 0.4rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.mock-btn-highlight {
  background: #0284c7;
  color: #ffffff;
  padding: 0.2rem 0.45rem;
  border-radius: 0.3rem;
  font-size: 0.65rem;
  font-weight: 800;
  position: relative;
}

.mock-btn-highlight::after {
  content: "👆";
  position: absolute;
  bottom: -1rem;
  right: 0.2rem;
  font-size: 0.85rem;
  animation: pointer-bounce 1.2s infinite ease-in-out;
}

@keyframes pointer-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.15); }
}

/* Floating Notification Bar Down-Arrow Alert Banner */
.notice-drawer-bar {
  display: none;
  margin-top: 0.75rem;
  background: #fefce8;
  border: 1.5px solid #fde047;
  color: #713f12;
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
  animation: slide-notice-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-drawer-bar.active {
  display: flex;
}

@keyframes slide-notice-down {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.notice-drawer-icon {
  font-size: 1.1rem;
  animation: arrow-bounce 1s infinite ease-in-out;
}

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

.mock-toggle-on {
  width: 1.8rem;
  height: 0.95rem;
  background: #16a34a;
  border-radius: 999px;
  position: relative;
}

.mock-toggle-on::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 1px;
  width: 0.75rem;
  height: 0.75rem;
  background: #ffffff;
  border-radius: 50%;
}

/* App Header Shield Icon */
.app-icon-shield {
  width: 2.3rem;
  height: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.verified-badge-pill {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  border: 1px solid #86efac;
}

/* Play Protect Status Pill inside Downloader Card */
.play-protect-status-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.protect-icon-svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Download Metrics Row (Realtime Speed & MB) */
.dl-metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.action-btn-hold {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 3.1rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.action-btn-hold:active {
  transform: scale(0.98);
}
