/* Mobile Devices (Phones) */
@media (max-width: 1050px) {
  .dh1-dynamic-island-wrapper {
      display: none !important;
  }
}
.dh1-dynamic-island-wrapper {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    display: flex;
    justify-content: center;
}

.dh1-dynamic-island {
    background: #000000;
    border-radius: 40px;
    min-height: 54px; 
    max-height: 54px; 
    display: flex;
    flex-direction: column;
    padding: 0 18px;
    
    /* -- ANIMASI SPRING KHAS APPLE -- */
    transition: max-height 0.6s cubic-bezier(0.34, 1.15, 0.64, 1), 
                width 0.6s cubic-bezier(0.34, 1.15, 0.64, 1), 
                border-radius 0.6s cubic-bezier(0.34, 1.15, 0.64, 1), 
                background-color 0.5s ease;
    will-change: width, max-height, border-radius; /* GPU Acceleration */
    
    overflow: hidden;
    width: 54px; 
    opacity: 0;
    transform: translateY(-20px);
    animation: dropDown 0.6s cubic-bezier(0.34, 1.15, 0.64, 1) forwards 0.5s;
    cursor: pointer;
    position: relative;
}

@keyframes dropDown { to { opacity: 1; transform: translateY(0); } }

.dh1-dynamic-island.dh1-expanded { width: 480px; }

.dh1-dynamic-island.dh1-expanded-full {
    width: 540px;
    max-height: 500px; 
    border-radius: 32px;
    background: #0a0a0a;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255,255,255,0.1);
    cursor: default; /* Kursor berubah normal saat terbuka */
}

/* ================= TOP BAR ================= */
.dh1-di-top-bar {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 54px;
    height: 54px;
    flex-shrink: 0;
    position: relative;
}

.dh1-di-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.15, 0.64, 1);
}

.dh1-expanded .dh1-di-icon { opacity: 1; transform: scale(1); }
.dh1-expanded-full .dh1-di-icon { opacity: 0; transform: scale(0.8); transition: opacity 0.2s ease, transform 0.2s ease; }

.dh1-di-content {
    flex-grow: 1;
    margin: 0 14px;
    overflow: hidden;
    white-space: nowrap;
    
    /* Transisi fade in untuk teks berjalan */
    opacity: 0;
    transform: scale(0.98);
    filter: blur(4px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s cubic-bezier(0.34, 1.15, 0.64, 1) 0.2s, filter 0.4s ease 0.2s;
    
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    display: flex;
    align-items: center;
}

.dh1-expanded .dh1-di-content { 
    opacity: 1; transform: scale(1); filter: blur(0); pointer-events: auto; 
}

.dh1-expanded-full .dh1-di-content { 
    /* Transisi fade out super cepat saat diklik */
    opacity: 0; transform: scale(0.96); filter: blur(2px); pointer-events: none; 
    transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease; 
} 

.dh1-marquee-text {
    display: inline-flex;
    align-items: center;
    font-size: 14px; 
    font-weight: 500;
    letter-spacing: 0.2px;
    color: #f8fafc;
    padding-left: 100%; 
    animation: scrollText 22s linear infinite; 
}
.dh1-marquee-text i { margin-right: 8px; }
@keyframes scrollText { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* Judul Tengah (Saat Expand Full) */
.dh1-di-center-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -20%) scale(0.95);
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dh1-expanded-full .dh1-di-center-title { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1); 
    transition: opacity 0.4s ease 0.2s, transform 0.5s cubic-bezier(0.34, 1.15, 0.64, 1) 0.15s; 
}

/* ================= PREMIUM BADGE UI ================= */
.dh1-di-status-badge {
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.5) translateX(10px);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.15, 0.64, 1);
    transform-origin: right center;
}

.dh1-expanded .dh1-di-status-badge { opacity: 1; transform: scale(1) translateX(0); }
.dh1-expanded-full .dh1-di-status-badge { 
    opacity: 0; transform: scale(0.7) translateX(15px); pointer-events: none; 
    transition: opacity 0.2s ease, transform 0.3s ease; 
}

.dh1-premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--badge-color);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid color-mix(in srgb, var(--badge-color) 30%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--badge-color) 25%, transparent), inset 0 1px 0 rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.dh1-premium-countdown {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 1px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
    font-weight: 700;
    color: #fff;
    margin: 0 4px;
}

.dh1-urgency-high .dh1-di-icon { color: #ff3b30; }
.dh1-urgency-medium .dh1-di-icon { color: #ff9500; }
.dh1-urgency-low .dh1-di-icon { color: #0a84ff; }
.dh1-urgency-safe .dh1-di-icon { color: #30d158; }

/* ================= FULL CONTENT (IMPROVED UI) ================= */
.dh1-di-full-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px 20px 10px;
    
    /* Animasi Fade & Scale dari Bawah */
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
    
    width: 100%;
    max-height: 420px; 
    overflow-y: auto;
    will-change: transform, opacity;
}

/* Custom Scrollbar Premium */
.dh1-di-full-content::-webkit-scrollbar { width: 4px; }
.dh1-di-full-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.dh1-expanded-full .dh1-di-full-content { 
    opacity: 1; 
    pointer-events: auto;
    transform: translateY(0) scale(1);
    /* Delay sedikit agar box membesar duluan baru konten masuk (smoothness) */
    transition: opacity 0.4s ease 0.25s, transform 0.6s cubic-bezier(0.34, 1.15, 0.64, 1) 0.2s; 
}

/* Card Style untuk setiap Item */
.dh1-full-message-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 0;
}

.dh1-fm-icon { font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.dh1-fm-text { font-size: 13px; line-height: 1.6; color: #cbd5e1; font-weight: 400; flex-grow: 1; }

.dh1-dummy-content { margin-top: 150px; text-align: center; color: #475569; font-weight: 300; }
.dh1-dummy-content h1 { font-size: 24px; margin-bottom: 10px; color: #cbd5e1; }
.dh1-dummy-content p { font-size: 14px; }