/* ===== CLEAN BLACK & WHITE - NO ROUNDED - PREMIUM LOOK ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: background 0.2s, color 0.2s;
  overflow: hidden;
  letter-spacing: 0.3px;
}

body.dark-mode {
  background: #000000;
  color: #ffffff;
}

body.light-mode {
  background: #ffffff;
  color: #000000;
}

/* ===== APP CONTAINER ===== */
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
  position: relative;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 50;
  transform: translateX(-100%);
  transition: transform 0.2s ease-in-out;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-dark {
  background: #000000;
  border-right: 1px solid #ffffff;
}

.sidebar-light {
  background: #ffffff;
  border-right: 1px solid #000000;
}

@media (min-width: 768px) {
  .sidebar {
    position: relative;
    transform: translateX(0);
  }
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px;
}

.sidebar-content::-webkit-scrollbar {
  width: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: currentColor;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .sidebar-logo {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.logo-square {
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0 0 10px;
  opacity: 0.4;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-group {
  width: 100%;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item i {
  font-size: 16px;
}

.menu-item-dark:hover {
  border: 1px solid #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.menu-item-light:hover {
  border: 1px solid #000000;
  background: rgba(0, 0, 0, 0.05);
}

.sub-item {
  font-size: 11px;
  padding-left: 24px;
  opacity: 0.8;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

body.light-mode .sub-item {
  border-left: 1px solid rgba(0, 0, 0, 0.2);
}

.dropdown-content {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-left: 8px;
  margin-top: 4px;
}

.sidebar-footer {
  padding: 16px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  opacity: 0.4;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 2px;
}

body.light-mode .sidebar-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  z-index: 40;
  flex-shrink: 0;
}

.header-dark {
  background: #000000;
  border-bottom: 1px solid #ffffff;
}

.header-light {
  background: #ffffff;
  border-bottom: 1px solid #000000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  background: none;
  border: 1px solid currentColor;
  width: 34px;
  height: 34px;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.header-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background: transparent;
  border: 1px solid currentColor;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: inherit;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.main-content::-webkit-scrollbar {
  width: 2px;
}

.main-content::-webkit-scrollbar-thumb {
  background: currentColor;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 20px;
  border: 1px solid currentColor;
  background: transparent;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  opacity: 0.5;
}

.stat-icon {
  font-size: 20px;
  opacity: 0.4;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 6px;
  height: 6px;
  background: currentColor;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 32px 0;
}

body.light-mode .divider {
  background: rgba(0, 0, 0, 0.1);
}

/* ===== DEVELOPER PROFILE CARD (SOLVED BERANTAKAN) ===== */
.section-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.6;
}

.owner-section {
  width: 100%;
}

.owner-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 500px;
}

.dev-profile-card {
  border: 1px solid currentColor;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dev-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dev-avatar-box {
  width: 54px;
  height: 54px;
  border: 1px solid currentColor;
  overflow: hidden;
}

.dev-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dev-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dev-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dev-role {
  font-size: 9px;
  opacity: 0.5;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dev-bio {
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.8;
}

.dev-networks {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.light-mode .dev-networks {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.network-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.4;
}

.network-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.network-links a {
  font-size: 12px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.network-links a.portfolio-link {
  color: #10b981;
}

body.light-mode .network-links a.portfolio-link {
  color: #059669;
}

/* ===== SEARCH MODAL STYLING ===== */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  transition: all 0.2s ease;
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-container {
  width: 100%;
  max-width: 550px;
  border: 1px solid currentColor;
}

.search-container-dark { background: #000000; }
.search-container-light { background: #ffffff; }

.search-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: inherit;
  text-transform: uppercase;
}

.search-close {
  background: currentColor;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.endpoint-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}

.endpoint-item:hover {
  border: 1px solid currentColor;
}
