
  :root {
  /* --- DAKING.SITE.JE — PURPLE / GOLD / PINK SYSTEM --- */
  
  /* Backgrounds */
  --wa-bg-app: #16082F;
  --wa-bg-main: #220D46;
  --wa-bg-header: #351566;
  --wa-bg-search: #402078;
  --wa-bg-hover: #4A2184;
  --wa-bg-card: #321C42;
  
  /* Message / Bubble backgrounds */
  --wa-bg-bubble-in: #351A5D;
  --wa-bg-bubble-out: #54208F;
  
  /* Main brand colors */
  --wa-green: #25D366;
  --wa-green-hover: #20C75D;
  --wa-green-light: #25D366;
  
  /* DAKING accent colors */
  --accent-purple: #5B20A8;
  --accent-purple-light: #7B3FD1;
  --accent-gold: #F7CE76;
  --accent-gold-light: #FFD98A;
  --accent-pink: #FF1681;
  --accent-pink-light: #FF4B9B;
  
  /* Text */
  --wa-text-primary: #FFFFFF;
  --wa-text-muted: #D0C4E4;
  --wa-text-secondary: #B9A9D2;
  
  /* Borders */
  --wa-border: #6B438F;
  --wa-border-gold: #F7CE76;
  
  /* WhatsApp-style blue ticks */
  --wa-blue-ticks: #53BDEB;
  
  /* Inputs */
  --wa-input-bg: #402078;
  
  /* Effects */
  --accent-glow: rgba(247, 206, 118, 0.45);
  --purple-glow: rgba(123, 63, 209, 0.45);
  --pink-glow: rgba(255, 22, 129, 0.40);
  
  /* Font */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Plus Jakarta Sans", sans-serif;
}

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: var(--font-main);
      -webkit-tap-highlight-color: transparent;
    }

    html, body {
      width: 100%;
      height: 100%;
      height: 100dvh;
      overflow: hidden;
      background-color: var(--wa-bg-app);
      color: var(--wa-text-primary);
    }

    ::-webkit-scrollbar { display: none; }
    * { scrollbar-width: none; -ms-overflow-style: none; }

    /* APP CONTAINER - FULL SCREEN WHATSAPP INBOX */
    .app-viewport {
      display: flex;
      flex-direction: column;
      width: 100vw;
      height: 100%;
      height: 100dvh;
      position: relative;
      background-color: var(--wa-bg-main);
    }

    /* HEADER */
    header {
      background: var(--wa-bg-header);
      position: relative;
      z-index: 100;
      border-bottom: 1px solid var(--wa-border);
      flex-shrink: 0;
    }

    .nav-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 16px;
      width: 100%;
      height: 60px;
    }

    .logo-container {
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      text-decoration: none;
    }

    .daking-avatar-ring {
      position: relative;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .daking-avatar-ring img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
    }

    .online-dot {
      position: absolute;
      bottom: 1px;
      right: 1px;
      width: 11px;
      height: 11px;
      background-color: var(--wa-green-light);
      border: 2px solid var(--wa-bg-header);
      border-radius: 50%;
    }

    .brand-title {
      font-size: 1.35rem;
      font-weight: 700;
      letter-spacing: -0.3px;
      color: var(--wa-green);
    }

    .live-status-pill {
      font-size: 0.72rem;
      color: var(--wa-green-light);
      font-weight: 600;
      background: rgba(0, 168, 132, 0.12);
      border: 1px solid rgba(0, 168, 132, 0.3);
      padding: 4px 10px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .live-indicator {
      width: 7px;
      height: 7px;
      background-color: var(--wa-green-light);
      border-radius: 50%;
      animation: pulse 1.8s infinite;
    }

    @keyframes pulse {
      0% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(1.2); }
      100% { opacity: 1; transform: scale(1); }
    }

    /* MODALS */
    .security-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(11, 20, 26, 0.85);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 5000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      animation: fadeIn 0.2s ease-out;
    }

    .security-card {
      background: var(--wa-bg-card);
      border: 1px solid var(--wa-border);
      width: 100%;
      max-width: 400px;
      border-radius: 18px;
      padding: 24px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
      text-align: center;
    }

    .security-title {
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--wa-text-primary);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .search-input {
      width: 100%;
      background: var(--wa-input-bg);
      border: 1px solid transparent;
      padding: 10px 16px;
      border-radius: 8px;
      color: var(--wa-text-primary);
      font-size: 0.9rem;
      outline: none;
      transition: border 0.2s;
    }

    .search-input:focus {
      border-color: var(--wa-green);
    }

    .btn-action-watch {
      background: var(--wa-green);
      color: #111b21;
      border: none;
      padding: 12px 20px;
      border-radius: 24px;
      font-weight: 700;
      font-size: 0.9rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: background 0.15s ease, transform 0.1s ease;
    }

    .btn-action-watch:hover {
      background: var(--wa-green-hover);
    }

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

    /* MAIN CONTENT STREAM */
    main.messenger-container {
      flex: 1;
      display: flex;
      flex-direction: column;
      width: 100%;
      min-height: 0;
      position: relative;
      overflow: hidden;
      background-color: var(--wa-bg-main);
    }

    /* INBOX VIEW */
    #messengerInboxView {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: 100%;
      min-height: 0;
      background-color: var(--wa-bg-main);
    }

    /* INBOX SEARCH & FILTER TABS */
    .inbox-search-box {
      padding: 8px 12px;
      flex-shrink: 0;
      background: var(--wa-bg-main);
    }

    .inbox-search-inner {
      position: relative;
      width: 100%;
      background: var(--wa-bg-search);
      border-radius: 8px;
      display: flex;
      align-items: center;
    }

    .inbox-search-inner i {
      position: absolute;
      left: 14px;
      color: var(--wa-text-muted);
      font-size: 0.85rem;
    }

    .inbox-search-inner input {
      width: 100%;
      background: transparent;
      border: none;
      padding: 9px 12px 9px 40px;
      color: var(--wa-text-primary);
      font-size: 0.88rem;
      outline: none;
    }

    .filter-tabs-row {
      display: flex;
      gap: 8px;
      padding: 6px 12px 10px 12px;
      overflow-x: auto;
      flex-shrink: 0;
      background: var(--wa-bg-main);
    }

    .filter-pill {
      background: var(--wa-bg-search);
      border: 1px solid var(--wa-border);
      color: var(--wa-text-muted);
      font-size: 0.78rem;
      font-weight: 600;
      padding: 6px 14px;
      border-radius: 18px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
    }

    .filter-pill.active {
      background: rgba(0, 168, 132, 0.2);
      color: var(--wa-green);
      border-color: var(--wa-green);
    }

    .inbox-threads-list {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 0;
      overflow-y: auto;
    }

    .inbox-thread-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      cursor: pointer;
      transition: background 0.15s;
      position: relative;
      border-bottom: 1px solid var(--wa-border);
      background-color: var(--wa-bg-main);
    }

    .inbox-thread-item.is-chatted {
      border-left: 3px solid var(--wa-green);
    }

    .inbox-thread-item:hover, .inbox-thread-item:active {
      background-color: var(--wa-bg-hover);
    }

    .inbox-avatar-frame {
      position: relative;
      width: 48px;
      height: 48px;
      flex-shrink: 0;
    }

    .inbox-avatar-frame img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      background: var(--wa-bg-card);
    }

    .inbox-thread-details {
      flex-grow: 1;
      min-width: 0;
    }

    .inbox-thread-header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 3px;
    }

    .inbox-thread-user {
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--wa-text-primary);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .chatted-badge {
      font-size: 0.6rem;
      font-weight: 700;
      background: rgba(0, 168, 132, 0.15);
      color: var(--wa-green);
      padding: 2px 6px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      gap: 3px;
    }

    .inbox-thread-time {
      font-size: 0.72rem;
      color: var(--wa-text-muted);
      font-weight: 400;
    }

    .inbox-thread-snippet {
      font-size: 0.82rem;
      color: var(--wa-text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .inbox-unread-badge {
      width: 10px;
      height: 10px;
      background-color: var(--wa-green-light);
      border-radius: 50%;
      flex-shrink: 0;
      position: absolute;
      right: 16px;
    }

    /* FULL-SCREEN ACTIVE CHAT VIEW */
    #messengerChatView {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: 100%;
      min-height: 0;
      background-color: var(--wa-bg-app);
    }

    .chat-view-header {
      padding: 8px 12px;
      border-bottom: 1px solid var(--wa-border);
      background: var(--wa-bg-header);
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
      height: 60px;
    }

    .chat-header-actions {
      display: flex;
      align-items: center;
      gap: 18px;
      color: var(--wa-text-muted);
      font-size: 1.05rem;
    }

    .chat-header-actions i {
      cursor: pointer;
      transition: color 0.15s ease;
    }

    .chat-header-actions i:hover {
      color: var(--wa-text-primary);
    }

    /* WHATSAPP DARK CHAT WALLPAPER PATTERN */
    .chat-messages-box {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      padding: 16px 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      background-color: #0b141a;
      background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
      background-size: 24px 24px;
    }

    .msg-bubble {
      max-width: 80%;
      padding: 8px 12px 6px 12px;
      border-radius: 8px;
      font-size: 0.88rem;
      line-height: 1.4;
      position: relative;
      word-wrap: break-word;
      animation: fadeIn 0.15s ease-out;
      box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.3);
    }

    .msg-bubble.incoming {
      background: var(--wa-bg-bubble-in);
      align-self: flex-start;
      border-top-left-radius: 2px;
      color: var(--wa-text-primary);
    }

    .msg-bubble.outgoing {
      background: var(--wa-bg-bubble-out);
      color: var(--wa-text-primary);
      align-self: flex-end;
      border-top-right-radius: 2px;
    }

    .msg-meta {
      font-size: 0.65rem;
      color: var(--wa-text-muted);
      margin-top: 4px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 4px;
      float: right;
      margin-left: 12px;
    }

    .read-ticks {
      color: var(--wa-blue-ticks);
      font-size: 0.75rem;
    }

    /* MEDIA EMBEDS */
    .msg-media-content {
      max-width: 100%;
      max-height: 250px;
      border-radius: 6px;
      margin-top: 4px;
      display: block;
      object-fit: cover;
    }

    .iframe-container {
      position: relative;
      width: 100%;
      height: 200px;
      margin-top: 6px;
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid var(--wa-border);
      background: #000;
    }

    .iframe-container iframe {
      width: 100%;
      height: 100%;
      border: none;
    }

    /* EMOJI BAR & INPUT */
    .emoji-quick-bar {
      display: flex;
      gap: 8px;
      padding: 6px 12px;
      background: var(--wa-bg-header);
      border-top: 1px solid var(--wa-border);
      overflow-x: auto;
      flex-shrink: 0;
    }

    .emoji-pill {
      background: var(--wa-bg-search);
      border-radius: 14px;
      padding: 4px 10px;
      font-size: 0.95rem;
      cursor: pointer;
      user-select: none;
      transition: transform 0.1s ease;
    }

    .emoji-pill:active {
      transform: scale(1.2);
    }

    .chat-input-bar {
      display: flex;
      gap: 8px;
      padding: 8px 10px;
      background: var(--wa-bg-header);
      border-top: 1px solid var(--wa-border);
      align-items: center;
      flex-shrink: 0;
    }

    .chat-input-field {
      flex-grow: 1;
      background: var(--wa-input-bg);
      border: 1px solid transparent;
      padding: 10px 14px;
      border-radius: 20px;
      color: var(--wa-text-primary);
      font-size: 0.9rem;
      outline: none;
    }

    .chat-input-field:focus {
      border-color: var(--wa-border);
    }

    .chat-media-btn {
      background: transparent;
      color: var(--wa-text-muted);
      border: none;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.15rem;
      cursor: pointer;
      flex-shrink: 0;
      transition: color 0.15s ease;
    }

    .chat-media-btn:hover {
      color: var(--wa-green);
    }

    .chat-send-btn {
      background: var(--wa-green);
      color: #111b21;
      border: none;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      cursor: pointer;
      flex-shrink: 0;
      transition: background 0.15s ease;
    }

    .chat-send-btn:hover {
      background: var(--wa-green-hover);
    }

    /* BOTTOM NAV DOCK - WHATSAPP TAB STYLE */
    .bottom-nav {
      height: 60px;
      width: 100%;
      background: var(--wa-bg-header);
      border-top: 1px solid var(--wa-border);
      display: flex;
      justify-content: space-around;
      align-items: center;
      z-index: 99;
      flex-shrink: 0;
    }

    .bottom-nav i { font-size: 1.2rem; }

    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      color: var(--wa-text-muted);
      text-decoration: none;
      font-size: 0.68rem;
      font-weight: 600;
      gap: 3px;
      cursor: pointer;
      position: relative;
      transition: color 0.15s;
    }

    .nav-item.active { color: var(--wa-green); }

    .nav-badge-counter {
      position: absolute;
      top: -3px;
      right: -8px;
      background-color: var(--wa-green-light);
      color: #111b21;
      font-size: 0.58rem;
      font-weight: 800;
      padding: 2px 6px;
      border-radius: 10px;
    }

    .hidden { display: none !important; }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }
  