/* mobile.css - Physio Companion Patient App Simulator stylesheet */
:root {
  --app-bg: #0f172a;
  --app-bg-secondary: #1e293b;
  --app-bg-card: rgba(30, 41, 59, 0.7);
  --app-border: rgba(255, 255, 255, 0.08);
  --app-teal: #14b8a6;
  --app-teal-glow: rgba(20, 184, 166, 0.15);
  --app-blue: #3b82f6;
  --app-text: #f8fafc;
  --app-text-muted: #94a3b8;
  --app-success: #10b981;
  --app-warning: #f59e0b;
  --app-danger: #ef4444;
  --app-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --app-font: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.simulator-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
  font-family: var(--app-font);
  color: var(--app-text);
  overflow: hidden;
}

/* PHONE FRAME MOCKUP */
.phone-frame {
  position: relative;
  width: 380px;
  height: 780px;
  background: #000;
  border: 12px solid #22252a;
  border-radius: 48px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
              0 0 0 4px #1a1c1f,
              0 0 40px rgba(20, 184, 166, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Notch / Dynamic Island */
.phone-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.phone-camera {
  width: 8px;
  height: 8px;
  background: #111;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.2);
}
.phone-speaker {
  width: 40px;
  height: 4px;
  background: #222;
  border-radius: 2px;
}

/* INTERNAL SCREEN */
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--app-bg);
  display: flex;
  flex-direction: column;
  padding-top: 44px; /* Space for status bar */
}

/* STATUS BAR */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--app-text);
  z-index: 90;
  background: transparent;
  user-select: none;
}
.status-bar-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* APP CONTENT LAYOUT */
.screen-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: none;
  flex-direction: column;
  scrollbar-width: none;
}
.screen-content::-webkit-scrollbar {
  display: none;
}
.screen-content.active {
  display: flex;
}

/* APP LOGO & HEADER */
.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--app-teal) 0%, var(--app-blue) 100%);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  margin: 20px auto 10px auto;
  box-shadow: 0 8px 16px rgba(20, 184, 166, 0.2);
}

.app-welcome h2 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  margin-bottom: 6px;
}
.app-welcome p {
  font-size: 13px;
  color: var(--app-text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* FORM ELEMENTS */
.app-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.app-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.app-input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--app-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.app-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--app-bg-secondary);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-family: var(--app-font);
  transition: var(--transition-smooth);
}
.app-input:focus {
  outline: none;
  border-color: var(--app-teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.app-btn {
  width: 100%;
  padding: 14px;
  background: var(--app-teal);
  border: none;
  border-radius: 12px;
  color: var(--app-bg);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
  transition: var(--transition-smooth);
}
.app-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.app-error {
  font-size: 13px;
  color: var(--app-danger);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  display: none;
}

/* TOP HEADER */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-bg-secondary);
}

/* TREATMENT PROGRESS CARD (GRADIENT MATCHING FLUTTER CARD) */
.progress-card {
  background: linear-gradient(135deg, var(--app-bg-secondary) 0%, var(--app-bg) 100%);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Canvas ring styling */
.progress-ring-container {
  position: relative;
  width: 80px;
  height: 80px;
}
.progress-ring-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

/* SECTION HEADINGS */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ASSIGNED ROUTINE EXERCISE LIST */
.routine-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}
.exercise-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition-smooth);
}
.exercise-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.exercise-card-title {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}
.exercise-card-badge {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 12px;
  color: var(--app-text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.exercise-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}
.exercise-card-hold {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--app-blue);
  font-weight: 600;
}

/* ACTIVE WORKOUT PLAYER VIEW */
.workout-player-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 24px;
}
.workout-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.workout-player-set-badge {
  padding: 6px 12px;
  background: rgba(20, 184, 166, 0.12);
  border-radius: 10px;
  color: var(--app-teal);
  font-weight: bold;
  font-size: 13px;
}
.workout-player-exercise-card {
  padding: 20px;
  background: var(--app-bg-secondary);
  border: 1px solid var(--app-border);
  border-radius: 20px;
}

/* Countdown Timer layout */
.workout-timer-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  gap: 20px;
}
.timer-circle-wrap {
  position: relative;
  width: 160px;
  height: 160px;
}
.timer-seconds-display {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timer-seconds-num {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.timer-seconds-lbl {
  font-size: 10px;
  color: var(--app-text-muted);
  font-weight: bold;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.timer-controls-row {
  display: flex;
  gap: 16px;
}
.control-icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--app-bg-secondary);
  border: 1px solid var(--app-border);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.control-icon-btn:hover {
  background: rgba(255,255,255,0.05);
}

.workout-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}
.btn-workout-prev {
  background: var(--app-bg-secondary);
  border: 1px solid var(--app-border);
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}
.btn-workout-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-workout-next {
  background: var(--app-teal);
  border: none;
  color: var(--app-bg);
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

/* SESSION LOGGING FEEDBACK FORM */
.feedback-box {
  background: var(--app-bg-secondary);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.feedback-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.slider-custom {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  outline: none;
  border-radius: 3px;
  accent-color: var(--app-teal);
  cursor: pointer;
  margin: 10px 0;
}
.difficulty-options-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 10px 0;
}
.diff-option-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid transparent;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
}
.diff-option-btn.selected {
  background: var(--app-teal);
  color: var(--app-bg);
  box-shadow: 0 0 10px rgba(20,184,166,0.3);
}
.textarea-custom {
  width: 100%;
  padding: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  color: #fff;
  font-family: var(--app-font);
  font-size: 13px;
  resize: none;
  outline: none;
  transition: var(--transition-smooth);
  margin-top: 10px;
}
.textarea-custom:focus {
  border-color: var(--app-teal);
}

/* HISTORICAL LOG CARDS */
.log-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.log-card {
  background: var(--app-bg-secondary);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 16px;
}
.log-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--app-text-muted);
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.log-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.log-card-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.log-card-title {
  font-size: 15px;
  font-weight: bold;
  color: #fff;
}
.log-card-stats {
  font-size: 12px;
  color: var(--app-text-muted);
}
.log-card-pain {
  font-size: 12px;
  color: var(--app-warning);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* CLINICIAN INFO PROFILE */
.profile-card {
  background: var(--app-bg-secondary);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}
.avatar-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 3px solid var(--app-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--app-teal);
  margin-bottom: 14px;
  box-shadow: 0 0 15px var(--app-teal-glow);
}
.clinician-card {
  background: var(--app-bg-secondary);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  padding: 20px;
  width: 100%;
}

/* BOTTOM NAVIGATION BAR */
.bottom-nav {
  height: 56px;
  border-top: 1px solid var(--app-border);
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  z-index: 100;
}
.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--app-text-muted);
  cursor: pointer;
  gap: 4px;
  transition: var(--transition-smooth);
}
.nav-tab i {
  font-size: 18px;
}
.nav-tab span {
  font-size: 10px;
  font-weight: 500;
}
.nav-tab.active {
  color: var(--app-teal);
}

/* DEMO CALLOUT */
.demo-callout-box {
  margin-top: 16px; 
  padding: 12px; 
  border-radius: 10px; 
  background: rgba(20, 184, 166, 0.06); 
  border: 1px solid rgba(20, 184, 166, 0.15); 
  font-size: 11px; 
  color: var(--app-text-muted); 
  text-align: center; 
  line-height: 1.5;
}
.demo-callout-box strong {
  color: #fff;
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}
.demo-callout-box code {
  color: var(--app-teal);
  font-family: monospace;
  font-weight: bold;
}
