body {
  margin: 0;
  font-family: Arial;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: url('../image/bag/main.jpg');
  background-size: cover;
  background-position: center;
}

/* PHONE */
.phone-case {
  width: 390px;
  height: 780px;
  border-radius: 40px;
  overflow: hidden;
  background: url('../image/bag/gfbag.jpg') center/cover no-repeat;
  position: relative;
}

.phone {
  width: 100%;
  height: 100%;
  position: relative;
  color: white;
}

/* SAVE BUTTON */

/* BACK BUTTON TOP LEFT */
.phoneBackBtn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.20);
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* HOME */
#homeScreen {
  width: 100%;
  height: 100%;
  position: relative;
}

/* DAY BADGE on home screen */
#homeDayBadge {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 6px 20px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}

.app-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
}

#app { display:none; height:100%; }

#home {
  display:none;
  padding-top:70px;
  height:100%;
  overflow-y:auto;
}

.contact {
  display:flex;
  align-items:center;
  height:72px;
  margin:8px;
  cursor:pointer;
}

.contact-box {
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:10px;
  border:1px solid rgba(255,255,255,0.3);
  border-radius:14px;
}

.contact-box img {
  width:45px;
  height:45px;
  border-radius:50%;
}

/* CHAT */
.chat {
  display:none;
  flex-direction:column;
  height:100%;
}

.top {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  background:rgba(0,0,0,0.35);
}

.top img {
  width:40px;
  height:40px;
  border-radius:50%;
}

.backBtn {
  width:40px;
  height:40px;
  border:none;
  background:transparent;
  color:white;
  font-size:22px;
}

.messages {
  flex:1;
  overflow-y:auto;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.msgRow {
  display:flex;
  align-items:flex-end;
  gap:8px;
}

.left { justify-content:flex-start; }
.right { justify-content:flex-end; }

.msg {
  padding:10px;
  border-radius:14px;
  max-width:70%;
}

.me { background:rgba(255,77,109,0.85); }
.them {background: rgba(0,0,0,0.4); }

.avatar {
  width:28px;
  height:28px;
  border-radius:50%;
}

.input-bar {
  display:flex;
  padding:10px;
  gap:10px;
  background:rgba(0,0,0,0.4);
}

.input-bar input {
  flex:1;
  padding:12px;
  border-radius:20px;
  border:none;
  background:rgba(255,255,255,0.18);
  color:white;
}

.input-bar button {
  padding:12px 16px;
  border:none;
  border-radius:20px;
  background:rgba(255,77,109,0.85);
  color:white;
}

/* APP GRID — wraps to 2 rows if 4 icons */
.app-grid {
  position:absolute;
  bottom:40px;
  width:100%;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:16px;
  padding:0 20px;
  box-sizing:border-box;
}

/* SAVE */


.slot {
  border:1px solid white;
  margin:10px;
  padding:10px;
  color:white;
}

/* ===================== GALLERY — UPGRADED ===================== */

#galleryMenu {
  display:none;
  position:absolute;
  top:0; left:0;
  width:100%; height:100%;
  background:#0d0d0d;
  z-index:99999;
  overflow:hidden;
  flex-direction:column;
}

#galleryTopBar {
  display:flex;
  align-items:center;
  padding:12px 14px;
  background:rgba(0,0,0,0.6);
  backdrop-filter:blur(6px);
  gap:10px;
  flex-shrink:0;
}

#galleryTopBar .galBackBtn {
  width:36px; height:36px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,0.15);
  color:white;
  font-size:18px;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}

#galleryTopBar h3 {
  margin:0;
  font-size:16px;
  font-weight:600;
  color:white;
  flex:1;
}

#galleryCount {
  font-size:12px;
  color:rgba(255,255,255,0.5);
}

#galleryScroll {
  flex:1;
  overflow-y:auto;
  padding:10px;
  scrollbar-width:none;
}
#galleryScroll::-webkit-scrollbar { display:none; }

#galleryBox {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:4px;
}

.galThumb {
  aspect-ratio:1/1;
  border-radius:6px;
  overflow:hidden;
  cursor:pointer;
  position:relative;
  background:#1a1a1a;
}

.galThumb img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform 0.2s;
}

.galThumb:active img { transform:scale(0.95); }

#galleryEmpty {
  display:none;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  height:300px;
  color:rgba(255,255,255,0.3);
  font-size:14px;
  gap:10px;
}
#galleryEmpty span { font-size:40px; }

#galPreview {
  display:none;
  position:absolute;
  top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.95);
  z-index:100000;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

#galPreviewClose {
  position:absolute;
  top:14px; right:14px;
  width:36px; height:36px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,0.15);
  color:white;
  font-size:18px;
  cursor:pointer;
}

#galPreviewImg {
  max-width:92%;
  max-height:72%;
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 8px 32px rgba(0,0,0,0.8);
}

#galSetBgBtn {
  margin-top:18px;
  padding:13px 30px;
  border:none;
  border-radius:24px;
  background:linear-gradient(135deg,#ff4d6d,#c9184a);
  color:white;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 4px 16px rgba(255,77,109,0.45);
  transition:transform 0.15s, box-shadow 0.15s;
  letter-spacing:0.5px;
}
#galSetBgBtn:active {
  transform:scale(0.96);
  box-shadow:0 2px 8px rgba(255,77,109,0.3);
}

#galToast {
  position:absolute;
  bottom:70px;
  left:50%;
  transform:translateX(-50%) translateY(20px);
  background:rgba(255,77,109,0.92);
  color:white;
  padding:9px 20px;
  border-radius:20px;
  font-size:13px;
  opacity:0;
  transition:opacity 0.3s, transform 0.3s;
  white-space:nowrap;
  pointer-events:none;
}
#galToast.show {
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

/* ===================== THIK G REEL APP ===================== */

#thikgMenu {
  display:none;
  position:absolute;
  top:0; left:0;
  width:100%; height:100%;
  background:#000;
  z-index:99999;
  overflow:hidden;
}

#thikgTopBar {
  position:absolute;
  top:0; left:0;
  width:100%;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px 0 8px;
  background:linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
  pointer-events:none;
}

#thikgTopBar span {
  font-size:18px;
  font-weight:bold;
  color:white;
  letter-spacing:1px;
}

#reelContainer {
  width:100%;
  height:100%;
  overflow-y:scroll;
  scroll-snap-type:y mandatory;
  scrollbar-width:none;
}
#reelContainer::-webkit-scrollbar { display:none; }

.reelSlide {
  width:100%;
  height:780px;
  scroll-snap-align:start;
  position:relative;
  background:#111;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.reelSlide video {
  width:100%;
  height:100%;
  object-fit:cover;
}

.reelActions {
  position:absolute;
  right:12px;
  bottom:80px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
  z-index:5;
}

.reelLikeBtn {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  background:none;
  border:none;
  color:white;
  cursor:pointer;
  font-size:28px;
  transition:transform 0.15s;
}

.reelLikeBtn:active { transform:scale(1.3); }
.reelLikeBtn.liked { color:#ff4d6d; }

.reelLikeCount {
  font-size:12px;
  color:white;
}

.reelLabel {
  position:absolute;
  bottom:20px;
  left:12px;
  right:60px;
  color:white;
  font-size:13px;
  text-shadow:0 1px 4px rgba(0,0,0,0.8);
}

#thikgBackBtn {
  position:absolute;
  top:12px; left:12px;
  width:42px; height:42px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,0.20);
  color:white;
  font-size:20px;
  cursor:pointer;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:center;
}

.app-icon-wrap {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
  cursor:pointer;
}

.app-icon-label {
  font-size:10px;
  color:white;
  text-align:center;
}

/* ===================== DAY MENU ===================== */

#dayMenu {
  display:none;
  position:absolute;
  top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.93);
  z-index:99999;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0;
}

/* big day number */
#dayMenuNumber {
  font-size:90px;
  font-weight:900;
  line-height:1;
  background:linear-gradient(135deg,#ff4d6d,#ff914d);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

#dayMenuLabel {
  font-size:14px;
  color:rgba(255,255,255,0.45);
  letter-spacing:3px;
  text-transform:uppercase;
  margin-bottom:40px;
}

/* what's in this day */
#dayMenuChars {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  max-width:300px;
  margin-bottom:36px;
}

.dayCharPill {
  background:rgba(255,255,255,0.1);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:20px;
  padding:5px 12px;
  font-size:12px;
  color:white;
}

/* advance button */
#dayAdvanceBtn {
  padding:16px 40px;
  border:none;
  border-radius:30px;
  background:linear-gradient(135deg,#ff4d6d,#c9184a);
  color:white;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 6px 24px rgba(255,77,109,0.45);
  transition:transform 0.15s;
  letter-spacing:0.5px;
}
#dayAdvanceBtn:active { transform:scale(0.96); }
#dayAdvanceBtn:disabled {
  background:rgba(255,255,255,0.1);
  color:rgba(255,255,255,0.3);
  box-shadow:none;
  cursor:default;
}

#dayMaxNote {
  margin-top:12px;
  font-size:12px;
  color:rgba(255,255,255,0.3);
}

/* day advance toast */
#dayToast {
  position:absolute;
  bottom:80px;
  left:50%;
  transform:translateX(-50%) translateY(20px);
  background:linear-gradient(135deg,#ff4d6d,#c9184a);
  color:white;
  padding:10px 22px;
  border-radius:20px;
  font-size:13px;
  font-weight:600;
  opacity:0;
  transition:opacity 0.3s, transform 0.3s;
  white-space:nowrap;
  pointer-events:none;
  z-index:999999;
}
#dayToast.show {
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

/* Profile tab active state */
.profTab { transition: color 0.2s, border-color 0.2s; }

/* Profile image grid items */
.profImgThumb {
  aspect-ratio:9/16;
  overflow:hidden;
  background:#1a1a1a;
  cursor:pointer;
}
.profImgThumb img {
  width:100%; height:100%; object-fit:cover;
  display:block; transition:transform 0.2s;
}
.profImgThumb:active img { transform:scale(0.95); }

/* Private card */
.privateCard {
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.14);
  border-radius:14px;
  overflow:hidden;
  margin-bottom:14px;
}
.privateBlur {
  filter:blur(14px);
  pointer-events:none;
  width:100%;
  aspect-ratio:9/16;
  object-fit:cover;
  display:block;
}
.unlockBtn {
  width:100%; padding:14px;
  border:none; cursor:pointer;
  background:linear-gradient(135deg,#ff4d6d,#c9184a);
  color:white; font-size:14px; font-weight:700;
  letter-spacing:0.5px;
}
.unlockBtn:disabled {
  background:rgba(255,255,255,0.1);
  color:rgba(255,255,255,0.3);
  cursor:default;
}


#dayMenuClose {
  position:absolute;
  top:14px; right:14px;
  width:36px; height:36px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,0.12);
  color:white;
  font-size:18px;
  cursor:pointer;
}



/* ── REEL ACTION BAR ── */
.reelActions {
  position: absolute;
  right: 0;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 5;
  padding: 8px 10px;
}

.reelActionBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 6px;
}

.reelActionIcon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.15s, background 0.2s;
  border: 1.5px solid rgba(255,255,255,0.2);
}

.reelActionBtn:active .reelActionIcon {
  transform: scale(0.88);
}

.reelActionBtn.liked .reelActionIcon {
  background: rgba(255,77,109,0.45);
  border-color: #ff4d6d;
}

.reelActionLabel {
  color: white;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}


/* INTRO FADE TRANSITIONS */
#introVideo, #introImage, #introText, #introTapHint {
  transition: opacity 0.6s ease;
}

.intro-fade-out { opacity: 0 !important; }
.intro-fade-in  { opacity: 1 !important; }

@keyframes introTextIn {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0);    }
}

#introTextInner {
  animation: introTextIn 0.5s ease forwards;
  background: rgba(0,0,0,0.55);
  padding: 12px 16px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.08);
  line-height: 1.7;
}

/* OF POST CARD */
.ofPostCard {
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:14px;
  overflow:hidden;
}

.ofPostCard img,
.ofPostCard video {
  width:100%;
  aspect-ratio:9/16;
  object-fit:cover;
  display:block;
}

.ofPostCaption {
  padding:10px 12px;
  color:rgba(255,255,255,0.75);
  font-size:13px;
  line-height:1.6;
}

.ofPostHeader {
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  cursor:pointer;
}

.ofPostHeader img {
  width:34px !important;
  height:34px !important;
  aspect-ratio:1/1 !important;
  border-radius:50%;
  object-fit:cover;
}

/* OF PROFILE BUBBLE */
.ofProfileBubble {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
  cursor:pointer;
  flex-shrink:0;
  min-width:65px;
  max-width:65px;
}

.ofProfileBubble img {
  width:58px; height:58px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid #ff4d6d;
}

.ofProfileBubble span {
  color:rgba(255,255,255,0.7);
  font-size:10px;
  text-align:center;
  max-width:60px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* OF LOCKED CONTENT */
.ofLockedBox {
  position:relative;
  aspect-ratio:9/16;
  background:#111;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px;
}

.ofLockedBox img {
  width:100% !important;
  height:100% !important;
  aspect-ratio:9/16 !important;
  object-fit:cover;
  filter:blur(18px);
  position:absolute;
  top:0; left:0;
}

.ofLockIcon {
  font-size:32px;
  z-index:2;
}

.ofSubBtn {
  z-index:2;
  padding:10px 24px;
  border:none;
  border-radius:24px;
  background:linear-gradient(135deg,#ff4d6d,#c9184a);
  color:white;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}

.ofSubBtn:disabled {
  background:rgba(255,255,255,0.1);
  color:rgba(255,255,255,0.3);
  cursor:default;
}

/* OF GRID THUMB */
.ofGridThumb {
  aspect-ratio:1/1;
  overflow:hidden;
  background:#1a1a1a;
  cursor:pointer;
  position:relative;
}

.ofGridThumb img,
.ofGridThumb video {
  width:100% !important;
  height:100% !important;
  aspect-ratio:1/1 !important;
  object-fit:cover;
  display:block;
}

.ofGridLock {
  position:absolute;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  font-size:20px;
  background:rgba(0,0,0,0.5);
  width:36px; height:36px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* SAVE SLOT CARD */
.saveSlot {
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:14px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:12px;
}

.saveSlot.hasData {
  border-color:rgba(255,77,109,0.3);
  background:rgba(255,77,109,0.05);
}

.saveSlotIcon {
  width:44px; height:44px;
  border-radius:12px;
  background:rgba(255,255,255,0.08);
  display:flex; align-items:center;
  justify-content:center;
  font-size:20px; flex-shrink:0;
}

.saveSlotInfo {
  flex:1;
}

.saveSlotTitle {
  color:white;
  font-size:13px;
  font-weight:700;
}

.saveSlotSub {
  color:rgba(255,255,255,0.35);
  font-size:11px;
  margin-top:3px;
}

.saveSlotBtns {
  display:flex;
  flex-direction:column;
  gap:5px;
}

.saveBtnSave {
  padding:7px 12px;
  border:none; border-radius:8px;
  background:linear-gradient(135deg,#ff4d6d,#c9184a);
  color:white; font-size:11px;
  font-weight:700; cursor:pointer;
  white-space:nowrap;
}

.saveBtnLoad {
  padding:7px 12px;
  border:1px solid rgba(255,255,255,0.2);
  border-radius:8px;
  background:rgba(255,255,255,0.08);
  color:white; font-size:11px;
  font-weight:700; cursor:pointer;
  white-space:nowrap;
}

.saveBtnLoad:disabled {
  opacity:0.3; cursor:default;
}

.saveBtnDelete {
  padding:7px 12px;
  border:1px solid rgba(255,77,77,0.3);
  border-radius:8px;
  background:rgba(255,77,77,0.08);
  color:#ff6b6b; font-size:11px;
  font-weight:700; cursor:pointer;
  white-space:nowrap;
}

.saveBtnDelete:disabled {
  opacity:0.3; cursor:default;
}

/* NOTES APP */
.noteCard {
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  padding:14px;
  cursor:pointer;
  transition:background 0.2s;
  display:flex;
  align-items:center;
  gap:12px;
}

.noteCard:active {
  background:rgba(255,255,255,0.08);
}

.noteCardIcon {
  width:46px; height:46px;
  border-radius:12px;
  display:flex; align-items:center;
  justify-content:center;
  font-size:22px;
  flex-shrink:0;
}

.noteCardInfo { flex:1; }

.noteCardTitle {
  color:white;
  font-size:14px;
  font-weight:700;
}

.noteCardPreview {
  color:rgba(255,255,255,0.4);
  font-size:12px;
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:220px;
}

.noteCardArrow {
  color:rgba(255,255,255,0.3);
  font-size:18px;
}

/* CATEGORY PILL */
.noteCatPill {
  padding:6px 14px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.15);
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.6);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  flex-shrink:0;
  transition:all 0.2s;
}

.noteCatPill.active {
  background:rgba(255,77,109,0.25);
  border-color:rgba(255,77,109,0.6);
  color:#ff4d6d;
}

/* NOTE DETAIL SECTIONS */
.noteSection {
  margin-bottom:20px;
}

.noteSectionTitle {
  color:#ff4d6d;
  font-size:13px;
  font-weight:700;
  letter-spacing:1px;
  text-transform:uppercase;
  margin-bottom:8px;
  padding-bottom:6px;
  border-bottom:1px solid rgba(255,77,109,0.2);
}

.noteSectionBody {
  color:rgba(255,255,255,0.75);
  font-size:13px;
  line-height:1.8;
}

.noteTip {
  background:rgba(255,77,109,0.08);
  border:1px solid rgba(255,77,109,0.2);
  border-radius:10px;
  padding:10px 12px;
  color:rgba(255,255,255,0.7);
  font-size:12px;
  line-height:1.7;
  margin-top:8px;
}

.noteHighlight {
  background:rgba(255,200,0,0.1);
  border:1px solid rgba(255,200,0,0.2);
  border-radius:10px;
  padding:10px 12px;
  color:#f9c74f;
  font-size:12px;
  line-height:1.7;
  margin-top:8px;
}

/* SEARCH HIGHLIGHT */
.searchMatch { color:white; }
