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

html, body {
  height: 100%;
  background: #0d0d0d;
  color: #fff;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  overflow: hidden;
}

body { display: flex; flex-direction: column; }

#toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: linear-gradient(90deg, #0f0f23, #1a1a3e);
  border-bottom: 1px solid #2a2a4a;
  flex-shrink: 0;
}

#logo { height: 28px; filter: drop-shadow(0 0 8px #6c63ff); }

.nav-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  border: none; border-radius: 8px;
  background: #252545; color: #ccc;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.nav-btn:hover { background: #3a3a6a; color: #fff; }

#url-bar {
  flex: 1; min-width: 80px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid #2a2a4a;
  background: #161628; color: #fff;
  font-size: 13px; outline: none;
  direction: ltr;
}
#url-bar:focus { border-color: #6c63ff; }

#video-bar {
  display: none; align-items: center; gap: 10px;
  padding: 5px 14px;
  background: #12122a; border-bottom: 1px solid #2a2a4a;
  font-size: 13px; color: #ccc; flex-shrink: 0;
}
#video-bar.show { display: flex; }
#video-url-preview { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #888; direction: ltr; }
#dl-btn { background: #6c63ff; border: none; color: #fff; padding: 4px 14px; border-radius: 20px; cursor: pointer; font-size: 12px; }
#dl-status { font-size: 11px; color: #aaa; white-space: nowrap; }

#home-screen {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 40px;
  background: radial-gradient(ellipse at center, #12122e 0%, #0d0d0d 70%);
}
#brand { text-align: center; }
#brand img { height: 120px; filter: drop-shadow(0 0 20px #6c63ff88); }
#brand p { color: #666; font-size: 13px; margin-top: 6px; }

#home-search { display: flex; gap: 8px; width: 580px; max-width: 90vw; }
#home-search input {
  flex: 1; padding: 12px 20px; border-radius: 25px;
  border: 2px solid #2a2a4a; background: #161628; color: #fff;
  font-size: 15px; outline: none; direction: ltr;
}
#home-search input:focus { border-color: #6c63ff; }
#home-search button {
  background: #6c63ff; border: none; color: #fff;
  padding: 12px 22px; border-radius: 25px; cursor: pointer; font-size: 15px;
}

#quick-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; max-width: 700px; }
.ql-card {
  background: #161628; border: 1px solid #2a2a4a; border-radius: 16px;
  padding: 18px 24px; text-align: center; cursor: pointer; min-width: 100px;
  transition: transform .15s, background .15s, border-color .15s;
}
.ql-card:hover { background: #1e1e3a; border-color: #6c63ff; transform: translateY(-2px); }
.ql-icon { font-size: 28px; margin-bottom: 8px; }
.ql-name { font-size: 12px; color: #aaa; }

#screen-wrap { flex: 1; min-height: 0; display: none; background: #000; overflow: hidden; position: relative; }
#screen-wrap.show { display: block; }
#proxy-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
#proxy-frame[hidden] { display: none; }

#status {
  position: fixed; bottom: 14px; right: 16px; z-index: 1000;
  background: rgba(18,18,42,.95); border: 1px solid #3a3a6a;
  padding: 8px 14px; border-radius: 10px; font-size: 12px; color: #ccc;
  display: none;
}
#status.show { display: block; }

#transfer-panel {
  position: fixed; bottom: 70px; left: 20px; z-index: 999;
  background: #12122a; border: 1px solid #3a3a6a; border-radius: 16px;
  padding: 18px; min-width: 280px; max-width: 340px; display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
#transfer-panel.show { display: block; }
#transfer-panel h3 { font-size: 14px; margin-bottom: 12px; color: #a78bfa; }
#transfer-files-list { font-size: 12px; color: #ccc; margin-bottom: 12px; max-height: 140px; overflow-y: auto; }
#transfer-files-list a { color: #60a5fa; display: block; padding: 2px 0; direction: ltr; }
.t-btn { background: #252545; border: none; color: #fff; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; margin-left: 6px; }
#transfer-fab {
  position: fixed; bottom: 20px; left: 20px; z-index: 998;
  background: linear-gradient(135deg, #6c63ff, #a78bfa); border: none; color: #fff;
  padding: 10px 18px; border-radius: 25px; cursor: pointer; font-size: 13px;
  box-shadow: 0 4px 16px rgba(108,99,255,.4);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d0d0d; }
::-webkit-scrollbar-thumb { background: #2a2a4a; border-radius: 3px; }
