* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #f8f8f8; color: #333; }

header {
  background: #fff;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.logo {
  font-weight: bold;
  white-space: nowrap;
  font-size: 1.4rem;
  font-weight: bold;
  background: linear-gradient(to right, orange, red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-bar {
  flex: 1;
  position: relative;
}

.search-bar svg {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: #888;
  fill: none;
}

.search-bar input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: none;
  border-radius: 30px;
  background: #f1f1f1;
  font-size: 0.95rem;
}

.search-bar input:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px red;
}
.news-list {
  padding: 1rem;
}

.news-item {
  display: flex;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: relative;
}

.news-thumb-container {
  position: relative;
  width: 100px;
  height: 100px;
}

.news-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-top-left-radius: 8px;
}

.bookmark-icon {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bookmark-icon svg {
  width: 18px;
  height: 18px;
  stroke: #555;
  fill: none;
  cursor: pointer;
}

.news-content {
  padding: 0.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.news-date {
  font-size: 0.85rem;
  color: #888;
}

nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0.3rem;
  border-top: 1px solid #eee;
}

nav.bottom-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #666;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

nav.bottom-nav a svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}

.breaking-wrapper {
  margin: 0 0 0 1rem;
  overflow: hidden;
  position: relative;
}

.breaking-title {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1rem;
  margin: 1rem 0;
  color: #222;
}

.icon-toa {
  width: 24px;
  height: 24px;
  stroke: black;
  fill: none;
  flex-shrink: 0;
}


.breaking-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 1rem; /* Jarak antar slide */
  padding: 0 1rem; /* Padding samping */
}

.slide {
  flex: 0 0 90%;
  scroll-snap-align: start;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: #fff;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.1));
  z-index: 1;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 0.8rem 0.6rem;
  color: #fff;
  z-index: 2; /* supaya berada di atas overlay */
}

.slide-title {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.slide-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #ddd;
}

.slide-date {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.slide-comments {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-comment {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  flex-shrink: 0;
}

.count {
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}




.slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px 12px 0 0;
}



.dots {
  text-align: center;
  margin-top: 0.5rem;
}

.dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  margin: 0 4px;
  cursor: pointer;
}

.dots span.active {
  background: red;
}

.news-meta {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.3rem;
}

.news-comments {
  display: flex;
  align-items: center;
  gap: 4px;
}
    
.tab-bar {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 999;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid #eee;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.tab-bar::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.tab{
  background: none;
  border: none;
  font-size: 0.95rem;
  padding: 6px 10px;
  cursor: pointer;
  color: #555;
  font-weight: bold;
  white-space: nowrap;
  position: relative;
}
.tab.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 4px;
  background: linear-gradient(to right, orange, red);
  border-radius: 4px;
  transition: all 0.3s ease-in-out;
}

.news-detail-page {
  font-family: sans-serif;
}

.comment-input-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding-left: 3rem; /* beri ruang untuk ikon */
  z-index: 999;
  background: #fff;
  border-top: 1px solid #eee;
}

.comment-count-float {
  position: absolute;
  left: 1rem;
  bottom: 0.9rem;
  background: orange;
  color: #fff;
  padding: 6px 8px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.icon-comment {
  width: 16px;
  height: 16px;
  stroke: #fff;
}

.comment-input-bar {
  display: flex;
  padding: 0.5rem 1rem 0.7rem;
  gap: 0.5rem;
}

.comment-input {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 999px;
  font-size: 1rem;
}

.comment-send {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(to right, orange, red);
  border: none;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  border-radius: 999px; 
  cursor: pointer;
  transition: background 0.3s ease;
}


.iframe-container {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

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

.comment-badge-wrapper {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  width: 24px;
  height: 24px;
}

.icon-comment {
  width: 24px;
  height: 24px;
  stroke: #fff;
}

.comment-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: red;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 999px;
  font-weight: bold;
  line-height: 1;
  min-width: 18px;
  text-align: center;
}

.popup-komentar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  background: #fff;
  height: 60vh;
  z-index: 9999;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  transition: bottom 0.3s ease;
  display: flex;
  flex-direction: column;
}

.popup-komentar.active {
  bottom: 0;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  font-weight: bold;
  border-bottom: 1px solid #eee;
  font-size: 1rem;
}

.popup-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.comment-item {
  background: #f8f8f8;
  padding: 0.7rem;
  border-radius: 6px;
  margin-bottom: 0.7rem;
}

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: #f8f8f8;
  padding: 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: #555;
}

.comment-meta strong {
  color: #000;
}

.comment-time {
  font-size: 0.75rem;
  color: #888;
}
.close-popup {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.icon-close {
  width: 24px;
  height: 24px;
  stroke: #333;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.profile-page {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem 1rem 2rem; /* space for fixed bottom nav */
  text-align: center;
  font-family: sans-serif;
  background: #fff;
}

.profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid red;
  margin-bottom: 1rem;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.profile-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.8rem;
  background: #ddd;
  color: #333;
}

.profile-status.premium {
  background: red;
  color: #fff;
}
.tab-bar {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #fff;
  z-index: 999;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid #eee;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.tab-bar::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.tab {
  background: none;
  border: none;
  font-size: 0.95rem;
  padding: 6px 10px;
  cursor: pointer;
  color: #555;
  white-space: nowrap;
  position: relative;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 4px;
  background: linear-gradient(to right, orange, red);
  border-radius: 4px;
  transition: all 0.3s ease-in-out;
}
.toast,.post-new-pop{position:fixed;left:50%;bottom:-140px;transform:translateX(-50%);background:#2187e7;color:#fff;padding:12px 18px;border-radius:8px;box-shadow:0 4px 14px rgba(0,0,0,0.18);opacity:0;transition:all .4s ease;z-index:1200;font-size:0.95rem;} 
.post-new-pop{
    background: transparent;
    border-radius: 0px;
    padding:0 0 0 0;
    width: 90%;
}
.toast.show,.post-new-pop.show{bottom:80px;opacity:1;}

.nav-plus {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(205deg,orange,red);
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow: 0 8px 24px rgba(242,140,40,0.22);
    cursor:pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.nav-plus svg { pointer-events: none; }

            .post-menu {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
}
.dots-btn {
  width:26px;height:36px;border-radius:8px;border:0;background:transparent;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  color:#374151;
}
.dots-btn:hover { background: rgba(55,65,81,0.04); }
.dots-menu {
  position: absolute;
  top: 46px;
  right: 0;
  min-width:128px;
  background:#fff;
  border-radius:8px;
  box-shadow: 0 8px 24px rgba(2,6,23,0.08);
  border: 1px solid rgba(15,23,42,0.06);
  display: none;
  flex-direction: column;
  padding:6px 6px;
  transform-origin: top right;
  z-index: 9999;
}
.dots-menu.open { display:flex; animation:pop .12s ease; }
.dots-action {
  background: transparent;
  border: 0;
  text-align: left;
  padding:8px 10px;
  font-size:14px;
  color:#111827;
  cursor:pointer;
  border-radius:6px;
}
.dots-action:hover { background: rgba(15,23,42,0.04); color: #d04444; }
.dots-action.delete-action { color:#b91c1c; }
.dots-action.edit-action { color:#0f172a; }
@keyframes pop {
  from { opacity:0; transform: scale(.98) translateY(-4px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.ui-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3,7,18,0.5);
  z-index: 20000;
  padding: 18px;
}
.ui-modal-overlay.open { display:flex; }

.ui-modal {
  width:100%;
  max-width:520px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 20px 60px rgba(2,6,23,0.35);
  overflow:hidden;
  transform-origin:center;
  animation: modalIn .12s ease;
  outline: none;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ui-modal-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid rgba(15,23,42,0.04);
}
.ui-modal-header h3 { margin:0; font-size:18px; color:#0f172a; }
.ui-modal-close {
  background:transparent;border:0;font-size:22px;line-height:1;color:#374151;cursor:pointer;padding:6px;border-radius:6px;
}
.ui-modal-body { padding:16px 18px; color:#111827; font-size:15px; line-height:1.5; }
.ui-modal-footer {
  display:flex;
  gap:10px;
  padding:12px 18px;
  justify-content:flex-end;
  border-top:1px solid rgba(15,23,42,0.04);
}
.ui-modal-footer .btn {
  padding:8px 14px;border-radius:8px;border:0;cursor:pointer;font-weight:600;font-size:14px;
}
.btn.secondary { background:transparent;border:1px solid rgba(15,23,42,0.06); color:#0f172a; }
.btn.primary { background:linear-gradient(180deg,#ff9a2a,#f28c28); color:#fff; box-shadow:0 8px 18px rgba(242,140,40,0.16); }

@media (max-width:520px){
  .ui-modal { max-width: 94vw; }
  .ui-modal-body { padding:12px; }
  .ui-modal-footer { padding:10px; }
}
.compose-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3,7,18,0.5);
  z-index: 12000;
  padding: 20px;
}
.compose-overlay.open { display: flex; }

.compose-modal {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(2,6,23,0.35);
  overflow: hidden;
  transform-origin: center;
}

.compose-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid rgba(15,23,42,0.04);
}
.compose-header h2{margin:0;font-size:18px;color:#111827}
.compose-close{
  background:transparent;border:0;font-size:26px;line-height:1;color:#374151;cursor:pointer;padding:6px;border-radius:6px;
}
.compose-close:focus{outline:3px solid rgba(242,140,40,0.18)}

.compose-form{padding:16px 18px;display:flex;flex-direction:column;gap:12px}
.field{display:flex;flex-direction:column;gap:8px}
.label-text{font-size:13px;color:#374151;font-weight:600}
input[type="file"]{font-size:13px}
.img-preview{
  width:100%;
  max-height:220px;
  background:#f3f4f6;
  border-radius:8px;
  display:none;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid #e6e9ef;
}
.img-preview img{width:auto;max-height:80px;display:block;object-fit:cover}

textarea{
  width:100%;
  min-height:180px;
  padding:12px;
  border-radius:10px;
  border:1px solid #e6e9ef;
  resize:vertical;
  font-size:14px;
  color:#111827;
  box-shadow:none;
}

.meta-row{display:flex;justify-content:space-between;align-items:center}
.char-count{color:#6b7280;font-size:13px}

.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}
.btn{
  padding:10px 14px;border-radius:10px;border:0;cursor:pointer;font-weight:600;font-size:14px;
}
.btn.ghost{background:transparent;border:1px solid rgba(15,23,42,0.06);color:#111827}
.btn.primary{background:linear-gradient(180deg,#ff9a2a,#f28c28);color:#fff;box-shadow:0 8px 22px rgba(242,140,40,0.18)}

.form-msg{margin-top:8px;color:#ef4444;font-size:13px;min-height:18px}
.upload-progress{width:100%;height:8px;border-radius:6px;background:#f3f4f6}
@media (max-width:520px){
  .compose-modal{max-width:92vw}
  .compose-header{padding:12px}
  .compose-form{padding:12px}
}
.side-menu-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.35);display:none;z-index:999999} 
.side-menu-overlay.show{display:block} 
.side-menu{position:fixed;right:-320px;top:0;width:300px;height:100%;background:#fff;box-shadow:-8px 0 24px rgba(2,6,23,0.12);transition:right .28s ease;border-top-left-radius:10px;border-bottom-left-radius:10px;z-index:99999999;padding:18px;display:flex;flex-direction:column;gap:12px} 
.side-menu.open{right:0} 
.side-menu h3{margin:0 0 6px;font-size:1.05rem} 
.side-menu a{display:block;padding:10px 12px;border-radius:8px;text-decoration:none;color:#0b2740;font-weight:600} 
.side-menu a:hover{background:#f1f6ff} 
.menu-toggle{color:#000;border:none;background:transparent;margin:0;padding:0;cursor:pointer;z-index:1001;font-size:24px;} 
.menu-close{background:transparent;border:none;font-size:1.1rem;padding:6px;cursor:pointer;align-self:flex-end}

.follow-btn{
        background: linear-gradient(to right, orange, red);color:#fff;padding:8px 16px;border-radius:20px;font-weight:bold;display:inline-block;margin-left:6px;font-size:0.85rem;border:1px solid #d1d5db;
        float: right;
}

.follow-btn.unfollow{
        background:#ffffff;
        color:#000;
        border:1px solid #d1d5db;
}
#load-more-btn{
    padding: 10px 0 10px 0; border: 1px solid #ddd; background: #fff; color: #333; border-radius: 6px; font-weight: bold; cursor: pointer;text-decoration:none;font-size:12px;width: 100%;text-align: center;display: block;
}
#load-more-gif{
    text-align: center;
    padding: 10px 0 10px 0;
    font-size: 12px;
    font-weight: bold;
    color:#333;
}