/* === RESET === */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: #0a1a2f;
  color: #f5f5dc;
  overflow-x: hidden;
  height: 100vh;
  font-family: Arial, sans-serif;
}

.container-fluid {
  display: flex;
  flex-direction: row;
  height: 100vh;
}

.row {
  display: flex;
  flex-direction: row;
  flex: 1;
  height: 100%;
}

/* === SIDEBAR === */
.sidebar-nav {
  background: #091525;
  color: #f5f5dc;
  width: 20%;      /* ? Lebarkan sidebar desktop */
  min-width: 200px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.brand-logo {
  width: 32px;
  height: auto;
  margin-right: 0.5rem;
}

.sidebar-brand h3 {
  margin: 0;
  color: #f1c40f;
  font-size: 1.2rem;
}

#userInfo {
  margin: 1rem 0;
}

#userInfo div {
  font-weight: bold; /* ? Username & Balance ditebalkan */
}

/* === NAV LINK AS BUTTON === */
.sidebar-nav .nav-link {
  display: block;
  margin: 0.1rem 0;
  color: #0a1a2f;
  background: #f1c40f; /* ? Tombol style */
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s;
}

.sidebar-nav .nav-link:hover {
  background: #f39c12;
  color: #fff;
}

.social-links {
  margin-top: auto;
}

.social-links a {
  display: inline-block;
  margin-right: 0.5rem;
}

.social-icon {
  width: 24px;
  height: 24px;
}

/* === MAIN CONTENT === */
.main-content {
  flex-grow: 1;
  min-width: 0;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.connect-btn {
  align-self: flex-start;
  background: #f1c40f;
  color: #0a1a2f;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 1rem;
}

.connect-btn:disabled {
  background: #4682b4;
  color: #f5f5dc;
}

#chatMessages, #chatMessagesPanel {
  flex-grow: 1;
  overflow-y: auto;
  margin-top: 1rem;
}

.chat-message {
  padding: 0.5rem;
  border-bottom: 1px solid #2c3e50;
}

.chat-message:last-child {
  border-bottom: none;
}

.chat-input-container {
  margin-top: 1rem;
}

#chatInput, #chatSubmit,
#chatInputPanel, #chatSubmitPanel {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
  border: 1px solid #f1c40f;
  border-radius: 4px;
}

#chatSubmit, #chatSubmitPanel {
  background: #f1c40f;
  color: #0a1a2f;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

#chatSubmit:disabled, #chatSubmitPanel:disabled {
  background: #4682b4;
  color: #f5f5dc;
}

/* === DEFAULT VISIBILITY === */
#chatMessages, #chatInput, #chatSubmit { display: none; }
#chatMessagesPanel, #chatInputPanel, #chatSubmitPanel { display: block; }

/* === CHAT ROOM === */
.chat-room {
  background: #091525;
  border-left: 2px solid #f1c40f;
  width: 25%;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem 0;
}

.chat-room h5 {
  margin: 0 0 1rem;
  padding-left: 1rem;
}

/* === HEADER BURGER === */
.mobile-header { display: none; }

.burger-icon {
  width: 32px;
  height: auto;
}

/* === MOBILE === */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #091525;
    padding: 1rem;
    position: relative;
    z-index: 1000;
  }

  #burgerMenu {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    cursor: pointer;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
  }

  .mobile-brand .brand-logo {
    width: 32px;
    height: auto;
    margin-right: 0.5rem;
  }

  .mobile-brand h3 {
    margin: 0;
    color: #f1c40f;
    font-size: 1.2rem;
  }

  .sidebar-brand {
    display: none; /* ? Sembunyikan logo + teks sidebar di mobile */
  }

  .sidebar-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    background: #091525;
    width: 220px; /* ? Sidebar mobile dilebarkan */
    padding: 1rem;
    z-index: 999;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
  }

  .sidebar-nav.active { display: block; }

  .container-fluid, .row {
    flex-direction: column;
    height: auto;
  }

  .chat-room { display: none; }

  #chatMessages, #chatInput, #chatSubmit { display: block; }
  #chatMessagesPanel, #chatInputPanel, #chatSubmitPanel { display: none; }

  #chatMessages {
    max-height: 50vh;
    overflow-y: auto;
  }

  #chatInput, #chatSubmit {
    width: 100%;
    min-height: 44px;
  }
}

.price-info {
  margin: 1rem 0;
  font-weight: bold;
  color: #f1c40f; /* gold-yellow to match brand */
  font-size: 0.95rem;
}
