:root {
  --bg-dark: #0680f3;
  --bg-card: rgba(12, 12, 12, 0.993);
  --border-color: rgb(247, 244, 244);
  --primary-green: #f7b707;
  --accent-blue: #f5ad12;
  --accent-blue-hover: #06a1f5;
  --text-main: #f3bd0e;
  --text-muted: #f7f4f4;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* BACKGROUND VIDEO STYLING YANG PAS & BISA DIKLIK */
#bgVideo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -2;
  object-fit: cover;
  pointer-events: none; /* Biar klik tembus ke tombol di depannya */
  filter: brightness(1.0) contrast(1.0); /* Atur terang/gelap video di sini */
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(4, 13, 8, 0.4); /* Lapisan transparan tipis agar kontras */
  z-index: -1;
  pointer-events: none;
}

/* INTRO VIDEO OVERLAY */
.video-intro-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #020b06;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.video-intro-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skip-video-btn {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: rgba(2, 132, 199, 0.85);
  color: white;
  border: 1px solid #38bdf8;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  backdrop-filter: blur(5px);
  transition: 0.2s;
}

.skip-video-btn:hover {
  background: var(--accent-blue);
}

/* MAIN WRAPPER */
.main-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

/* HEADER */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 18px 24px;
  border-radius: 16px;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.crest-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-blue), var(--primary-green));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.brand-group h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-group h1 span {
  color: var(--primary-green);
}

.subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #38bdf8;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary-green);
}

.clock-group {
  display: flex;
  gap: 12px;
}

.clock-box {
  background: rgba(5, 20, 12, 0.7);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 10px;
  text-align: center;
}

.clock-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
}

.clock-label .icon {
  font-size: 14px;
}

.clock-time {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
}

.clock-date {
  font-size: 0.65rem;
  color: #cbd5e1;
}

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.card.full-width {
  grid-column: span 2;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(2, 132, 199, 0.08);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
}

.card-title .icon {
  color: var(--primary-green);
}

.card-body {
  padding: 20px;
  flex: 1;
}

/* BUTTONS & SHORTCUTS */
.add-btn {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  transition: 0.2s;
}

.add-btn:hover {
  background: var(--accent-blue-hover);
}

.add-btn.style-alt {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
}

.add-btn.style-alt:hover {
  background: var(--primary-green);
  color: white;
}

.btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.shortcut-item {
  background: rgba(11, 43, 26, 0.9);
  border: 1px solid var(--border-color);
  padding: 12px 8px;
  border-radius: 10px;
  text-align: center;
  color: white;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
  position: relative;
}

.shortcut-item:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  background: rgba(2, 132, 199, 0.15);
}

.shortcut-item .material-symbols-outlined {
  font-size: 20px;
  color: var(--primary-green);
}

/* FILE HUB LIST */
.file-hub-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-btn-modern {
  background: rgba(5, 20, 12, 0.6);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: white;
  transition: 0.2s;
}

.file-btn-modern:hover {
  border-color: var(--accent-blue);
  background: rgba(2, 132, 199, 0.15);
  transform: translateX(4px);
}

.btn-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  background: rgba(34, 197, 94, 0.15);
  color: var(--primary-green);
  padding: 8px;
  border-radius: 8px;
  font-size: 20px;
}

.btn-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.arrow {
  color: var(--text-muted);
  font-size: 18px;
}

/* WORKPAD / NOTES MANAGER */
.notes-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  height: 380px;
}

.notes-sidebar-container {
  border-right: 1px solid var(--border-color);
  padding-right: 12px;
  overflow-y: auto;
}

.notes-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-sidebar-item {
  background: rgba(5, 20, 12, 0.6);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.note-sidebar-item:hover, .note-sidebar-item.active {
  background: rgba(2, 132, 199, 0.2);
  border-color: var(--accent-blue);
}

.note-sidebar-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-sidebar-snippet {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-editor input {
  background: rgba(5, 20, 12, 0.6);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
}

.note-editor input:focus {
  border-color: var(--accent-blue);
}

.note-editor textarea {
  background: rgba(5, 20, 12, 0.6);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  resize: none;
  flex: 1;
  outline: none;
}

.note-editor textarea:focus {
  border-color: var(--accent-blue);
}

.note-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-count {
  font-size: 0.75rem;
  color: var(--primary-green);
}

.delete-note-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.delete-note-btn:hover {
  background: var(--danger);
  color: white;
}

/* YOUTUBE PLAYER */
.yt-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.yt-input-group input {
  flex: 1;
  background: rgba(5, 20, 12, 0.6);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  color: white;
  font-size: 0.85rem;
  outline: none;
}

.yt-input-group input:focus {
  border-color: var(--accent-blue);
}

.yt-frame-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: black;
}

.yt-frame-wrapper iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

/* CALCULATOR */
.calculator-box {
  background: rgba(5, 20, 12, 0.6);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 12px;
}

#calcDisplay {
  width: 100%;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: right;
  margin-bottom: 12px;
  outline: none;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-btn {
  background: rgba(11, 43, 26, 0.9);
  border: 1px solid var(--border-color);
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.calc-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--primary-green);
}

.calc-btn.btn-action {
  background: rgba(2, 132, 199, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.calc-btn.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

.calc-btn.btn-equal {
  background: var(--primary-green);
  border-color: #16a34a;
  color: #020b06;
}

.calc-btn.btn-equal:hover {
  background: #16a34a;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-box.modal-large {
  max-width: 650px;
  max-height: 80vh;
}

.modal-box h3 {
  font-size: 1.1rem;
  color: white;
}

.modal-box input {
  background: rgba(5, 20, 12, 0.6);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  outline: none;
}

.modal-box input:focus {
  border-color: var(--accent-blue);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.cancel-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.save-btn {
  background: var(--accent-blue);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.archive-list {
  overflow-y: auto;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-item {
  background: rgba(5, 20, 12, 0.6);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.archive-info h4 {
  font-size: 0.9rem;
  color: white;
}

.archive-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* FOOTER */
.footer {
  text-align: center;
  margin-top: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-bottom: 20px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .card.full-width {
    grid-column: span 1;
  }
  .top-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .header-right-group {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}