/* Reset + Layout */
html, body {
  height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0d0d0d;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
}

@font-face {
  font-family: 'Square721ExtendedBold';
  font-style: normal;
  font-weight: normal;
  src: local('Square 721 Extended Bold'), url('fonts/Square-721-Extended-Bold.otf') format('opentype');
}

@font-face {
  font-family: 'Shentox-Regular';
  font-style: normal;
  font-weight: normal;
  src: local('Shentox Regular'), url('fonts/Shentox-Regular.ttf') format('trueType');
}

@font-face {
  font-family: 'Shentox-Medium';
  font-style: normal;
  font-weight: normal;
  src: local('Shentox Medium'), url('fonts/Shentox-Medium.ttf') format('trueType');
}

header, footer {
  background: #111;
  color: #ccc;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Shentox-Regular", sans-serif !important;
}

header { 
  border-bottom: 2px solid #222; 
}

header .app-title a { 
  font-family: "Shentox-Regular", sans-serif !important;
  font-size: 1.5rem; 
  color: #fff; 
  text-decoration: none; 
}
header .app-title a:hover { color: #fff; }

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 30px;
  min-height: 0; /* ensures scrollable lists work properly */
  font-family: "Shentox-Regular", sans-serif !important;
}

nav {
  flex: 1;
  text-align: center;
}

nav a {
  color: #aaa;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
}

nav a.active, nav a:hover {
  color: #fff;
  border-bottom: 2px solid #fff;
  padding-bottom: 2px;
}

a {
  color: #aaa;
  text-decoration: none;
  font-weight: bold;
}

a.active, a:hover {
  color: #fff;
  border-bottom: 2px solid #fff;
  padding-bottom: 2px;
}

#onlineCounter { font-size: 0.9rem; color: rgb(72,72,71); }

#searchBtn {
  background: #222;
  color: #eee;
  border: 1px solid #333;
  padding: 6px 12px;
  margin-left: 6px;
  font-family: "Shentox-Regular", sans-serif;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
  font-family: "Shentox-Regular", sans-serif !important;
}

#searchBtn:hover {
  background: #333;
  color: #fff;
  border: 1px solid #555;
}

#searchBtn:active {
  background: #111;
  border: 1px solid #666;
}

/* Market Container Layout */
.market-container {
  display: flex;
  flex: 1;
  background: #111;
  color: #ddd;
  font-family: "Shentox-Regular", sans-serif !important;
}

/* Sidebar */
.market-sidebar {
  width: 220px;
  background: #1a1a1a;
  padding: 20px;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  position: relative;
}

.market-sidebar input,
.market-sidebar select,
.market-sidebar button {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 8px;
  border: none;
  border-radius: 5px;
  background: #2a2a2a;
  color: #ddd;
}

.market-sidebar button {
  background: #3a3a3a;
  cursor: pointer;
  font-weight: bold;
}
.market-sidebar button:hover { background: #555; }

/* Main content */
.market-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Item header */
.item-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.item-header img {
  width: 64px;
  height: 64px;
  display: none;
}
.item-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: bold;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid #444;
  margin-bottom: 10px;
}
.tab-btn {
  padding: 10px 15px;
  cursor: pointer;
  background: #2a2a2a;
  border: none;
  color: #ccc;
  transition: background 0.2s, color 0.2s;
}
.tab-btn.active {
  background: #3a3a3a;
  font-weight: bold;
  color: #fff;
}
.tab-btn:hover { background: #444; }

/* Tab content */
.tab-content { display: none; margin-top: 15px; }
.tab-content.active { display: block; }

/* Tables */
/* Tables */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.orders-table th,
.orders-table td {
  font-size: 13px;
  padding: 6px 8px;
  border-bottom: 1px solid #333;
  text-align: left;
}

.orders-table th {
  background: #222;
  color: #eee;
}

.orders-table tr:nth-child(even) {
  background: #1a1a1a;
}

/* Scrollable wrappers */
.table-wrapper {
  max-height: 250px;   /* controls visible rows */
  overflow-y: auto;
  border: 1px solid #333;
  border-radius: 4px;
}

/* Dark scrollbars */
.table-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #555 #1a1a1a;
}

.table-wrapper::-webkit-scrollbar {
  width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
}

/* Suggestions below search box */
.suggestions {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  font-family: "Shentox-Regular", sans-serif !important;
}

.suggestions div {
  padding: 6px 8px;
  cursor: pointer;
}
.suggestions div:hover { background: #333; }

/* Footer */
footer {
  border-top: 2px solid #222;
  flex-shrink: 0;
  flex-grow: 0;
  text-align: center;
  flex-direction: column;
  display: flex;
  justify-content: center;
  padding: 15px 20px;
  background: #111;
  margin-top: auto;
  font-family: "Shentox-Regular", sans-serif !important;
}

footer p { margin: 5px 0; }

footer a { color: #888; text-decoration: none; font-weight: normal;}

footer a:hover { color: #fff; }

#onlineCounter {
  margin-top: 6px;
  padding-right: 20px;
  font-family: "Shentox-Medium", sans-serif !important;
}

#eveTime {
  margin-top: 6px;
  font-size: 0.9em;
  color: #ccc;
}