/* ========================== GLOBAL ========================== */
html, body { height: 100%; margin: 0; }
body { font-family: 'Segoe UI', sans-serif; color: white; position: relative; background: #1a0000; }

/* ========================== LOGIN PAGE ========================== */
#loginPage {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #1a0000;
  display: grid; place-items: center;
  z-index: 9999;
}
.container { width: 320px; }
.form-box {
  background: rgba(255, 0, 0, 0.1);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}
.form-box input {
  width: 90%;
  padding: 8px;
  margin: 10px 0;
  border-radius: 6px;
  border: none;
}
.form-box button {
  width: 95%;
  padding: 10px;
  margin-top: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #ff3333;
  color: white;
  font-weight: bold;
}
.switch { color: #ff6666; cursor: pointer; }

/* ========================== POPUP ========================== */
.popup {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #ff4d4d;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ========================== BACKGROUND VIDEO ========================== */
.bg-video {
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  z-index:-2;
  overflow:hidden;
}
.bg-video video {
  min-width:100%;
  min-height:100%;
  object-fit:cover;
}

/* ========================== TOPBAR ========================== */
.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: rgba(60,0,0,0.95);
  padding:14px 20px;
  color:white;
  position: relative;
  z-index:2;
}
.menu-btn {
  font-size:28px;
  background:none;
  border:none;
  color:white;
  cursor:pointer;
}
.logo-kanan { height:50px; margin-right:0px; }
.topbar-title {
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  font-weight:bold;
  font-size:30px;
  letter-spacing:1px;
  pointer-events:none;
  color:white;
}

/* ========================== SIDEBAR ========================== */
.sidebar {
  height:100%;
  width:0;
  position:fixed;
  top:0; left:0;
  background: rgba(60,0,0,0.95);
  backdrop-filter: blur(12px);
  overflow-x:hidden;
  transition: all 0.4s ease;
  padding-top:70px;
  box-shadow:3px 0 20px rgba(0,0,0,0.6);
  opacity:0;
  z-index:999;
}
.sidebar.open { width:260px; opacity:1; }
.sidebar-header {
  position:absolute;
  top:0; left:0;
  width:100%; height:65px;
  display:flex;
  align-items:center;
  padding:0 20px;
  border-bottom:1px solid rgba(255,255,255,0.1);
}
.sidebar-header img { width:38px; height:38px; border-radius:8px; margin-right:10px; }
.sidebar-header h3 { font-size:16px; font-weight:600; color:#fff; }
.sidebar a {
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 20px;
  color:#f8fafc;
  font-size:15px;
  text-decoration:none;
  transition: all 0.2s ease;
  margin:4px 8px;
  border-radius:6px;
}
.sidebar a i { font-size:16px; opacity:0.85; }
.sidebar a:hover {
  background: linear-gradient(135deg, rgba(255,80,80,0.25), rgba(200,0,0,0.25));
  transform: translateX(4px);
}
.close-btn {
  position:absolute;
  top:18px; right:18px;
  font-size:24px;
  background:none;
  border:none;
  cursor:pointer;
  color:#f8fafc;
  transition:0.2s;
}
.close-btn:hover { transform:rotate(90deg); color:#ff4d4d; }

/* ========================== CONTENT ========================== */
.content { padding:20px; position:relative; z-index:1; }
.web-list {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin-top:10px;
}
.web-item {
  background: rgba(255,255,255,0.08);
  padding:12px;
  border-radius:10px;
  text-align:center;
  font-size:13px;
  word-break:break-word;
  transition: all 0.2s ease;
}
.web-item:hover {
  transform:translateY(-4px);
  background: rgba(255,255,255,0.15);
}
.web-item img { width:48px; height:48px; border-radius:8px; margin-bottom:6px; }
.web-item a { color:white; text-decoration:none; display:block; }
.hapus-item {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background: rgba(255,255,255,0.05);
  padding:10px;
  margin:5px 0;
  border-radius:8px;
}
.hapus-item button {
  background-color:red;
  color:white;
  border:none;
  padding:5px 10px;
  cursor:pointer;
  border-radius:5px;
}

/* ========================== MODALS ========================== */
.modal {
  display:none;
  position:fixed;
  z-index:1000;
  left:0; top:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.7);
  justify-content:center;
  align-items:center;
}
.modal-content {
  background:#2d0000;
  padding:20px;
  border-radius:12px;
  width:300px;
  text-align:center;
}
.modal-content p { margin-bottom:10px; font-weight:bold; }
.modal-content input {
  width:90%;
  padding:8px;
  margin:6px 0;
  border:none;
  border-radius:6px;
}
.modal-buttons {
  margin-top:12px;
  display:flex;
  justify-content:space-between;
}
.modal-buttons button {
  flex:1;
  margin:0 5px;
  padding:8px;
  border:none;
  border-radius:6px;
  cursor:pointer;
  font-weight:bold;
}
#addWebOk, #changeNameOk, #changePassOk, #hapusWebOk { background:#ff3333; color:white; }
#addWebCancel, #changeNameCancel, #changePassCancel, #hapusWebCancel { background:#555; color:white; }

/* ========================== ACCOUNT ========================== */
.account-info input {
  width:90%;
  padding:8px;
  margin:8px 0;
  border-radius:6px;
  border:none;
}
.account-info button {
  width:95%;
  padding:10px;
  margin-top:6px;
  border-radius:6px;
  border:none;
  background:#ff3333;
  color:white;
  font-weight:bold;
  cursor:pointer;
}

/* ========================== OVERLAY MUSIC ========================== */
.overlay {
  display:none;
  position:fixed;
  top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.95);
  z-index:10000;
}
.overlay iframe {
  width:100%;
  height:100%;
  border:none;
}
.overlay button {
  position:absolute;
  top:10px;
  right:10px;
  background:red;
  color:white;
  border:none;
  font-size:24px;
  cursor:pointer;
  padding:5px 12px;
  border-radius:5px;
}