@import url('https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@200;300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --ios-bg: linear-gradient(160deg, #1c1c3a 0%, #1a2744 25%, #0f3460 55%, #3b2667 100%);
  --ios-glass: rgba(255,255,255,0.1);
  --ios-glass-border: rgba(255,255,255,0.15);
  --ios-glass-strong: rgba(255,255,255,0.14);
  --ios-text: #ffffff;
  --ios-text-secondary: rgba(255,255,255,0.65);
  --ios-blue: #0A84FF;
  --ios-green: #30D158;
  --ios-red: #FF453A;
  --ios-orange: #FF9F0A;
  --ios-pink: #FF375F;
  --ios-purple: #BF5AF2;
  --ios-teal: #64D2FF;
  --ios-indigo: #5E5CE6;
  --ios-radius: 22px;
  --ios-radius-sm: 14px;
  --font-sf: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
}

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

body {
  font-family: var(--font-sf);
  background: var(--ios-bg);
  background-attachment: fixed;
  color: var(--ios-text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.popup-active { overflow: hidden; }

/* Container */
.ios-container {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Status Bar */
.ios-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ios-text);
  position: relative;
  z-index: 10;
  letter-spacing: 0.2px;
}

.ios-statusbar-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Dynamic Island */
.dynamic-island {
  width: 126px;
  height: 36px;
  background: #000;
  border-radius: 22px;
  margin: 0 auto 16px;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.dynamic-island::after {
  content: '';
  width: 10px;
  height: 10px;
  background: #0a0a1a;
  border-radius: 50%;
  border: 2px solid #1a1a2e;
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
}

/* ===== LOCK SCREEN ===== */
#introOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ios-bg);
  display: flex;
  flex-direction: column;
  transition: opacity 0.6s ease, transform 0.6s ease;
  overflow: hidden;
}

#introOverlay.open-anim {
  opacity: 0;
  transform: scale(1.08);
}

.lock-wallpaper {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65);
  z-index: 0;
}

.lock-time {
  font-size: 5rem;
  font-weight: 200;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.lock-date {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0;
  letter-spacing: 0.3px;
}

/* Lock screen notification card */
.lock-notif-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 20px 24px;
  margin: 0 24px 20px;
  width: calc(100% - 48px);
  text-align: center;
}

.lock-notif-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.lock-notif-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}

.lock-notif-names {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.lock-notif-date {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  margin-bottom: 4px;
}

.lock-notif-guest {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-unlock {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: var(--font-sf);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 14px 44px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.btn-unlock:hover, .btn-unlock:active {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.swipe-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 5px;
  background: rgba(255,255,255,0.4);
  border-radius: 3px;
  z-index: 3;
  animation: pulseHint 2s ease infinite;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* ===== MAIN APP ===== */
#mainApp {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  padding-bottom: 100px;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--ios-glass);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius);
  padding: 20px;
  margin: 14px 16px;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.25) 50%, transparent 90%);
}

/* Widget Card */
.widget-card {
  background: var(--ios-glass-strong);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius);
  padding: 18px;
  margin: 14px 16px;
  overflow: hidden;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.widget-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ios-text-secondary);
}

.widget-title i {
  margin-right: 4px;
  font-size: 0.85rem;
  vertical-align: -1px;
}

/* ===== NOTIFICATION CARD ===== */
.notif-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 18px;
  padding: 14px 16px;
  margin: 8px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideInNotif 0.5s ease;
}

@keyframes slideInNotif {
  from { transform: translateY(-15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.notif-body { flex: 1; min-width: 0; }
.notif-app { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--ios-text-secondary); margin-bottom: 2px; }
.notif-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 4px; }
.notif-text { font-size: 0.78rem; color: var(--ios-text-secondary); line-height: 1.5; }
.notif-time { font-size: 0.62rem; color: var(--ios-text-secondary); flex-shrink: 0; font-weight: 500; }

/* ===== COUNTDOWN ===== */
.ios-countdown {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 16px 0 4px;
}

.ios-cd-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 14px 6px;
  min-width: 68px;
  text-align: center;
}

.ios-cd-val {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--ios-blue), var(--ios-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ios-cd-label {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ios-text-secondary);
}

/* ===== PROFILE / MEMPELAI ===== */
.profile-card {
  text-align: center;
  padding: 16px 10px;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  margin-bottom: 14px;
}

.profile-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.profile-desc {
  font-size: 0.78rem;
  color: var(--ios-text-secondary);
  margin-bottom: 8px;
  font-style: italic;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-parents {
  font-size: 0.75rem;
  color: var(--ios-text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.profile-divider {
  font-size: 2.2rem;
  font-weight: 200;
  color: var(--ios-pink);
  margin: 10px 0;
  text-align: center;
  line-height: 1;
}

/* ===== BUTTONS ===== */
.btn-ios {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ios-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 20px;
  font-family: var(--font-sf);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.2px;
}

.btn-ios:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-ios:active { transform: scale(0.97); }
.btn-ios-outline { background: transparent; border: 1.5px solid var(--ios-blue); color: var(--ios-blue); }
.btn-ios-sm { padding: 8px 14px; font-size: 0.72rem; border-radius: 10px; }
.btn-ios-green { background: var(--ios-green); }
.btn-ios-pink { background: var(--ios-pink); }
.btn-ios-orange { background: var(--ios-orange); }

/* ===== FORM INPUTS ===== */
.ios-input, .ios-textarea, .ios-select {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-sf);
  font-size: 0.85rem;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  letter-spacing: 0.1px;
}

.ios-input:focus, .ios-textarea:focus, .ios-select:focus {
  border-color: var(--ios-blue);
  background: rgba(255,255,255,0.1);
}

.ios-input::placeholder, .ios-textarea::placeholder {
  color: rgba(255,255,255,0.3);
}

.ios-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ios-text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ios-select option { background: #1a1a2e; color: #fff; }

/* ===== SLIDER ===== */
.ios-slider {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 16px;
}

.ios-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.ios-slide.active { opacity: 1; z-index: 2; }
.ios-slide img { width: 100%; height: 100%; object-fit: cover; }

/* ===== GALLERY ===== */
.ios-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.ios-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: opacity 0.3s;
}

.ios-gallery img:hover { opacity: 0.8; }

/* ===== MESSAGES / UCAPAN ===== */
.msg-bubble {
  background: rgba(255,255,255,0.07);
  border-radius: 18px 18px 18px 6px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.msg-bubble-name { font-size: 0.75rem; font-weight: 700; color: var(--ios-blue); margin-bottom: 4px; }
.msg-bubble-text { font-size: 0.8rem; color: var(--ios-text-secondary); line-height: 1.5; }

.msg-bubble-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.msg-bubble-time { font-size: 0.62rem; color: rgba(255,255,255,0.35); font-weight: 500; }

.msg-bubble-badge {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ===== BANK CARD ===== */
.ios-bank-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
}

/* ===== EVENT ===== */
.ios-event {
  background: rgba(255,255,255,0.05);
  border-left: 3px solid var(--ios-blue);
  border-radius: 0 14px 14px 0;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.ios-event-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; color: var(--ios-blue); }
.ios-event-detail { font-size: 0.78rem; color: var(--ios-text-secondary); line-height: 1.7; }
.ios-event-detail i { color: rgba(255,255,255,0.4); margin-right: 4px; font-size: 0.85rem; vertical-align: -1px; }

/* ===== CAROUSEL ===== */
.ios-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  margin: 0 -20px;
  padding: 4px 20px 16px 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ios-carousel::-webkit-scrollbar {
  display: none;
}
.ios-carousel-card {
  flex: 0 0 85%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  scroll-snap-align: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.dark-mode .ios-carousel-card {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}
.ios-story-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.dark-mode .ios-story-img {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ios-story-content {
  padding: 16px;
}
.ios-story-date {
  font-size: 0.75rem;
  color: var(--ios-blue);
  font-weight: 600;
  margin-bottom: 4px;
}
.ios-story-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ios-text);
}
.ios-story-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ios-text-secondary);
}

/* ===== DOCK ===== */
.ios-dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: rgba(20,20,35,0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-around;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  z-index: 1000;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: rgba(255,255,255,0.45);
  font-size: 0.58rem;
  font-weight: 600;
  transition: color 0.2s;
  letter-spacing: 0.3px;
}

.dock-item.active, .dock-item:hover { color: var(--ios-blue); }
.dock-item i { font-size: 1.4rem; }

/* ===== AUDIO BUTTON ===== */
.ios-audio-btn {
  position: fixed;
  bottom: 85px; right: 16px;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  transition: all 0.2s;
}

.ios-audio-btn:hover { background: rgba(255,255,255,0.22); }

/* ===== FOOTER ===== */
.ios-footer {
  text-align: center;
  padding: 30px 24px 40px;
  color: var(--ios-text-secondary);
  font-size: 0.75rem;
  line-height: 1.6;
}

/* ===== AOS ===== */
[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}
