/* Oasis Phone — dark DayZ phone theme */
:root {
  --bg: #06090f;
  --bg2: #0b1018;
  --card: #121826;
  --border: #1e2635;
  --text: #eef2f7;
  --muted: #7d8aa0;
  --accent: #3b9ddd;
  --green: #2ecc71;
  --red: #e74c3c;
  --amber: #f1c40f;
  --radius: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: #000; color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.45;
  overscroll-behavior-y: none;
}
#phone {
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, #0d1420 0%, var(--bg) 60%);
}

/* status bar */
#statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px 8px; font-size: 13px; font-weight: 600; color: var(--text);
  position: sticky; top: 0; z-index: 10;
  background: rgba(6, 9, 15, 0.85); backdrop-filter: blur(12px);
}
#statusbar .sb-right { display: flex; gap: 8px; align-items: center; color: var(--muted); }

/* header */
#appheader {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px 14px; border-bottom: 1px solid var(--border);
  position: sticky; top: 41px; z-index: 9;
  background: rgba(6, 9, 15, 0.85); backdrop-filter: blur(12px);
}
#appheader h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -0.3px; }
#backbtn {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 8px 14px; font-size: 15px; cursor: pointer; font-weight: 600;
}
#backbtn.hidden { visibility: hidden; }

/* main */
#screen { flex: 1; padding: 20px; padding-bottom: 40px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* home grid */
.appgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 12px; padding-top: 16px; }
.appicon { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; border: none; background: none; color: var(--text); padding: 0; }
.appicon .tile {
  width: 68px; height: 68px; border-radius: 20px;
  background: linear-gradient(145deg, #1a2233, #0e141f);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  transition: transform 0.12s ease;
}
.appicon:active .tile { transform: scale(0.92); }
.appicon .label { font-size: 12px; font-weight: 600; color: var(--text); text-align: center; letter-spacing: -0.2px; }
.appicon .soon-tag { font-size: 10px; color: var(--muted); font-weight: 500; margin-top: -6px; }
.appicon.soon .tile { opacity: 0.3; filter: grayscale(0.8); }
.appicon.soon .label { color: var(--muted); }
.appicon.soon .soonbadge { font-size: 10px; color: var(--muted); }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.card h2, .card h3 { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mt { margin-top: 12px; }

/* buttons */
.btn {
  display: block; width: 100%;
  background: var(--accent); color: #fff; border: none;
  border-radius: 12px; padding: 15px; font-size: 17px; font-weight: 600;
  cursor: pointer; margin-top: 12px;
}
.btn:active { transform: scale(0.98); opacity: 0.9; }
.btn.secondary { background: var(--bg2); border: 1px solid var(--border); color: var(--text); }
.btn.danger { background: var(--red); }
.btn.success { background: var(--green); }
.btn:disabled { opacity: 0.5; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { margin-top: 0; }
.thumbbtn { font-size: 34px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 22px; cursor: pointer; }
.thumbbtn:active { transform: scale(0.94); }

/* inputs */
.input, .select {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); border-radius: 12px; padding: 14px; font-size: 16px; margin-top: 8px;
}
.input:focus { outline: none; border-color: var(--accent); }
label.flabel { display: block; font-size: 13px; color: var(--muted); margin-top: 14px; }
.code-input {
  font-size: 32px; letter-spacing: 12px; text-align: center;
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); border-radius: 12px; padding: 16px 8px; margin-top: 12px;
  font-family: monospace;
}

/* fare display */
.farebox { text-align: center; padding: 18px 0 6px; }
.farebox .fare { font-size: 44px; font-weight: 700; color: var(--green); }
.farebox .dist { color: var(--muted); font-size: 14px; }

/* ride status */
.status-pill {
  display: inline-block; padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600; margin-bottom: 10px;
}
.status-pill.open { background: #3a2f0b; color: var(--amber); }
.status-pill.accepted { background: #0b2f3a; color: var(--accent); }
.status-pill.picked_up { background: #0b3a1e; color: var(--green); }

.spinner {
  width: 44px; height: 44px; margin: 24px auto;
  border: 4px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.poilist { margin-top: 8px; max-height: 220px; overflow-y: auto; }
.poi {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; margin-bottom: 8px; cursor: pointer; width: 100%; color: var(--text);
  font-size: 15px; text-align: left;
}
.poi:active { border-color: var(--accent); }
.poi .kind { font-size: 12px; color: var(--muted); }

.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.center { text-align: center; }
.bigemoji { font-size: 56px; }

/* ---------- Oasisgram ---------- */
.ig-card {
  background: #11161f;
  border: 1px solid #1c2433;
  border-radius: 16px;
  margin-bottom: 18px;
  overflow: hidden;
}
.ig-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
}
.ig-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(145deg, #2a1f3d, #1a2233);
  border: 1px solid #2a3448;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #c9a0ff;
  overflow: hidden; flex-shrink: 0;
}
.ig-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ig-who { min-width: 0; }
.ig-user { font-weight: 700; font-size: 15px; }
.ig-time { font-size: 12px; }
.ig-photo {
  position: relative;
  background: #0a0e14;
  min-height: 120px;
  cursor: pointer;
}
.ig-photo img {
  width: 100%; height: auto; display: block;
}
.ig-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.ig-ph::after {
  content: '';
  width: 36px; height: 36px;
  border: 4px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
.ig-burst {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 90px; pointer-events: none;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}
.ig-burst.play { animation: igburst 0.8s ease-out forwards; }
@keyframes igburst {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  25% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  45% { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.1) translateY(-14px); opacity: 0; }
}
.ig-actions {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 0;
}
.ig-like {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; color: var(--text);
  font-size: 22px; cursor: pointer;
  min-width: 44px; min-height: 44px; padding: 8px 10px;
  border-radius: 12px;
}
.ig-like:active { transform: scale(0.9); }
.ig-like .ig-count { font-size: 15px; font-weight: 600; color: var(--muted); }
.ig-like.liked .ig-count { color: #ff6b8a; }
.ig-caption {
  padding: 4px 14px 14px;
  font-size: 15px; line-height: 1.45;
  word-wrap: break-word;
}
.ig-fab {
  position: fixed;
  bottom: 24px;
  right: max(20px, calc((100vw - 480px) / 2 + 20px));
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(145deg, #e1306c, #833ab4);
  border: none; font-size: 28px; cursor: pointer; z-index: 50;
  box-shadow: 0 6px 20px rgba(225, 48, 108, 0.4);
  display: flex; align-items: center; justify-content: center;
}
.ig-fab:active { transform: scale(0.92); }
.ig-compose-preview {
  width: 100%; border-radius: 12px; margin-bottom: 8px;
  max-height: 320px; object-fit: cover;
}

/* ---- Phone app ---- */
.hidden { display: none !important; }
.chargepill {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px;
  padding: 8px 14px; font-size: 15px; font-weight: 700; white-space: nowrap;
}
.tabbar { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: 1; background: var(--bg2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 12px; padding: 13px 4px; font-size: 14px; font-weight: 600; cursor: pointer;
  min-height: 48px;
}
.tab.active { background: var(--card); color: var(--text); border-color: var(--accent); }
.contactrow { display: flex; align-items: center; gap: 10px; }
.iconbtn {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  font-size: 22px; padding: 10px 13px; cursor: pointer; min-width: 48px; min-height: 48px;
  color: var(--text);
}
.iconbtn:active { transform: scale(0.94); }
.badge {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700;
  min-width: 24px; height: 24px; border-radius: 12px; padding: 0 7px; flex-shrink: 0;
}
.appicon .tile { position: relative; }
.appicon .badge { position: absolute; top: -6px; right: -6px; }
.threadrow { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.threadrow:active { border-color: var(--accent); }

/* dialer */
.dialdisplay {
  font-size: 30px; font-weight: 600; letter-spacing: 2px;
  min-height: 52px; margin-bottom: 12px; font-family: monospace;
}
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.numkey {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  border-radius: 50%; width: 72px; height: 72px; font-size: 26px; font-weight: 600;
  cursor: pointer; justify-self: center;
}
.numkey:active { background: var(--card); transform: scale(0.95); }

/* texts conversation */
.thread { max-height: 50vh; overflow-y: auto; margin-bottom: 10px; }
.bubblerow { display: flex; margin-bottom: 8px; }
.bubblerow.me { justify-content: flex-end; }
.bubblerow.them { justify-content: flex-start; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: 16px; overflow-wrap: anywhere; }
.bubble.me { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bubble.them { background: var(--bg2); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.bubtime { font-size: 11px; opacity: 0.7; margin-top: 4px; }
.msgimg { max-width: 100%; border-radius: 12px; margin-top: 6px; cursor: pointer; display: block; }
.imgthumb { max-width: 160px; border-radius: 12px; display: block; }
.compose { display: flex; gap: 8px; align-items: center; }

/* incoming call overlay */
.call-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 6, 10, 0.96); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.call-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  padding: 36px 28px; text-align: center; width: 100%; max-width: 380px;
  animation: ringpulse 1.6s ease-in-out infinite;
}
.call-card h2 { margin: 8px 0; }
.bignum { font-size: 24px; font-weight: 700; letter-spacing: 1px; margin: 8px 0; }
@keyframes ringpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 157, 221, 0.25); }
  50% { box-shadow: 0 0 0 18px rgba(59, 157, 221, 0); }
}
