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

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  background-color: rgb(67, 66, 76);
  background-image: url(images/bg.svg);
  color: white;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

/* Header */
.header,
.header-container {
  background: rgb(25, 25, 25);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  height: 90px;
}
.header {
  justify-content: center;
  width: 100%;
}
.header-container {
  width: 1280px;
}

.header-left {
  display: flex;
  align-items: center;
  padding: 0;
}

.logo {
  height: 100%;
  display: flex;
  align-items: center;
}

.logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}
.header-container {
  max-width: 1280px;
}

.header-center > div:first-child {
  display: flex;
  align-items: center;
  justify-content: end;
  padding-right: 40px;
  gap: 16px;
}

.account-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.username {
  font-weight: 600;
  color: white;
}

.balance {
  color: rgba(255, 255, 255, 0.9);
}

.separator {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

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

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-dot svg {
  width: 15px;
  height: 15px;
}

.status-dot.dark {
  background: #374151;
}
.status-dot.red {
  background: #ef4444;
}
.status-dot.blue {
  background: #3b82f6;
}

.home-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s;
}

.home-link:hover {
  color: white;
}

.account-btn {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  font-size: 14px;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  box-sizing: border-box;
  background-color: transparent;
  text-decoration: none;
  color: rgb(254, 254, 254);
  padding: 8px 36px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  margin-right: 24px;
  background-image: linear-gradient(
    90deg,
    rgb(69, 103, 195),
    rgb(10, 159, 231)
  );
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.account-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.header-right {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
}

.menu-toggle img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Navigation inside header */
.navigation {
  display: flex;
  justify-content: end;
  padding-right: 80px;
  align-items: center;
  gap: 0;
  height: 34px;
}

.nav-item {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 8px 20px;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #60a5fa;
  font-weight: 600;
}

/* Main Container */
.main-container {
  display: flex;
  width: 1280px;
  min-height: calc(100vh - 120px);
  padding-top: 16px;
}

/* Sidebar */
.sidebar {
  box-sizing: border-box;
  color: rgb(254, 254, 254);
  display: block;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 16.1px;
  margin-right: 10px;
  min-width: 300px;
  opacity: 1;
  text-align: center;
  text-size-adjust: 100%;
  transition: all 0.2s ease-in-out;
  border-radius: 16px;
  width: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.lottery-results {
  border-radius: 0 0 8px 8px;
  position: relative;
  overflow: hidden;
  z-index: 0;
  background-color: rgb(92, 104, 202);
}

.lottery-results::before {
  content: "";
  border-radius: 50%;
  height: 300px;
  width: 300px;
  position: absolute;
  top: 50px;
  left: 0px;
  transform: translateX(-50%);
  z-index: -1;
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.05),
    rgb(92, 104, 202)
  );
}

.lottery-results::after {
  content: "";
  border-radius: 50%;
  height: 250px;
  width: 250px;
  position: absolute;
  top: 50px;
  right: 0px;
  transform: translateX(20%) translateY(20%);
  z-index: -1;
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgb(92, 104, 202)
  );
}

.results-header {
  display: flex;
  background-color: rgb(0, 161, 236);
  align-items: center;
  gap: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.results-header svg {
  width: 21px;
  height: 18px;
}

.results-header span {
  color: #fefefe;
  font-size: 14px;
  font-weight: 500;
}

.date-selector {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 16px;
  position: relative;
}

.date-icon svg {
  width: 18px;
  height: 14px;
  color: #f9be18;
}

.select-date {
  color: #fefefe;
  font-size: 14px;
  cursor: pointer;
}

.auto-update-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.auto-update-btn svg {
  width: 17px;
  height: 17px;
}

.winning-numbers {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.winning-numbers .number {
  align-items: center;
  background-image: linear-gradient(rgb(250, 187, 23), rgb(254, 134, 2));
  border-radius: 50%;
  box-sizing: border-box;
  color: rgb(92, 104, 202);
  display: inline-flex;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 19.88px;
  font-weight: 700;
  height: 37.7969px;
  justify-content: center;
  line-height: 22.862px;
  margin: 8px 2px;
  position: relative;
  text-align: center;
  text-size-adjust: 100%;
  width: 37.7969px;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

.winning-numbers .number::before {
  bottom: 4px;
  color: rgb(92, 104, 202);
  content: "...";
  display: block;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 11.9px;
  font-weight: 700;
  height: 13.6875px;
  left: 18.8906px;
  line-height: 13.685px;
  position: absolute;
  text-align: center;
  text-size-adjust: 100%;
  transform: matrix(1, 0, 0, 1, -5.10156, 0);
  width: 10.2031px;
}

.prize-table {
  margin: 0 16px;
  padding: 12px;
  width: calc(100% - 32px);
  border-collapse: collapse;
  table-layout: fixed;
}

.prize-table td {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  text-align: center;
}

.prize-label {
  color: rgba(255, 255, 255, 0.9);
  width: 65px;
  min-width: 65px;
  text-align: center !important;
  font-weight: 500;
  font-size: 11px;
  padding: 8px !important;
}

.prize-number {
  font-weight: 500;
  font-size: 13px;
  text-align: center;
  padding: 8px !important;
}

.special-prize {
  display: flex;
  justify-content: center;
  gap: 2px;
}

.special-prize .first-part {
  color: #f9be18;
}

.special-prize .last-part {
  color: #f9be18;
  font-weight: 700;
}

.prize-numbers {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.prize-numbers span {
  color: #f9be18;
  font-weight: 600;
  font-size: 13px;
  min-width: 45px;
  text-align: right;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-primary {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  flex: 1;
  font-weight: 600;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  flex: 1;
}

.statistics {
  margin: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
}

.statistics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.statistics-table td {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

.statistics-table .no-border-right {
  border-right: none;
}

.statistics-table tr:first-child td {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
}

.statistics-table .second-row td {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
}

.statistics-table .date {
  text-align: left;
  color: rgba(255, 255, 255, 0.9);
}

.statistics-table .total {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
}

.statistics-table .total td:first-child {
  text-align: left;
}

/* Main Content */
.main-content {
  flex: 1;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  color: rgb(204, 204, 204);
  margin-bottom: 12px;
  box-shadow: 0px 0px 10px -5px;
  background-color: rgb(58, 58, 68);
  padding: 20px;
  overflow-y: auto;
}

.game-nav {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 32px;
}

.game-content {
  border-radius: 8px;
  padding: 16px;
  min-height: 600px;
  background-color: rgb(69, 68, 79);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  padding: 12px;
  border-radius: 50%;
  background-color: rgb(69, 68, 79);
  color: rgb(85, 85, 96);
  text-decoration: none;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  text-align: center;
  line-height: 16.1px;
  cursor: pointer;
  position: relative;
  text-transform: capitalize;
  box-sizing: border-box;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

.nav-link.active {
  background-image: linear-gradient(rgb(130, 168, 249), rgb(69, 68, 195));
  color: rgb(255, 255, 255);
  text-shadow: rgb(69, 68, 195) 2px 2px 0px;
  border: 4px solid white;
}

.lottery-options {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: center;
}

.option-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.option-circle.active {
  background: #3b82f6;
  color: white;
  border: 3px solid white;
}

.option-circle:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.time-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.time-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
}

/* Label styles for time descriptions */
.time-info .label {
  box-sizing: border-box;
  color: rgb(204, 204, 204);
  display: block;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 9.8px;
  height: 11.2656px;
  line-height: 11.27px;
  padding-right: 7px;
  text-align: right;
  text-size-adjust: 100%;
  unicode-bidi: isolate;
  width: 120.3906px;
}

/* Time value styles */
.time-info .time {
  box-sizing: border-box;
  color: rgb(204, 204, 204);
  display: block;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 18.2px;
  font-weight: 700;
  height: 20.9219px;
  letter-spacing: 4px;
  line-height: 20.93px;
  text-align: right;
  text-size-adjust: 100%;
  unicode-bidi: isolate;
  width: 109.766px;
}

.game-rules {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgb(204, 204, 204);
}

.game-rules .rate {
  color: rgb(242, 242, 242);
  font-weight: 500;
}

.game-rules .rules-icon {
  cursor: pointer;
  margin-left: 8px;
}

.rules-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.rules-info strong {
  color: white;
}

.rules-btn {
  background: transparent;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.rules-btn i {
  color: rgba(255, 255, 255, 0.7);
}

.game-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(79, 79, 90);
  color: rgb(204, 204, 204);
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-style: italic;
  cursor: pointer;
  min-width: 118px;
  width: 118px;
  height: 36.0938px;
  margin-right: 15px;
  line-height: 16.1px;
  text-decoration: none;
  text-size-adjust: 100%;
}

.tab-btn.active {
  background-image: linear-gradient(
    90deg,
    rgb(130, 168, 249),
    rgb(69, 68, 195)
  );
  color: rgb(242, 242, 242);
  text-shadow: rgb(69, 68, 195) 2px 2px 0px;
}

.game-info {
  margin-bottom: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.rate {
  color: #ef4444;
  font-weight: 600;
}
.betting-table {
  margin-bottom: 20px;
}

.table-row {
  display: grid;
  grid-template-columns: 80px repeat(10, 1fr) repeat(5, 1fr) 40px;
  gap: 4px;
  margin-bottom: 8px;
  align-items: center;
}

.table-row.header {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.table-row span {
  padding: 8px 4px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 12px;
}

.table-row span:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lottery-section {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.lottery-table {
  flex: none;
  min-width: 290px;
  max-width: 290px;
}

.lottery-info {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.info-column {
  flex: 1;
}

.info-column h4 {
  font-size: 13px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 2px;
}

.info-item.highlighted {
  background: #f59e0b;
  color: white;
}

.info-item .label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.quick-select {
  margin-top: 12px;
}

.select-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f59e0b;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.notification {
  background: #ef4444;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.number-grid {
  flex: 2;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.fast-bet-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.fast-bet-wrapper {
  position: relative;
  display: inline-block;
}

.fast-bet-button {
  appearance: button;
  background-color: rgb(79, 79, 90);
  background-image: linear-gradient(rgb(250, 187, 23), rgb(254, 134, 2));
  border: none;
  border-radius: 3px;
  box-sizing: border-box;
  color: rgb(88, 88, 88);
  cursor: pointer;
  display: block;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  height: 28px;
  line-height: 16.1px;
  margin-bottom: 6px;
  min-width: 58px;
  padding: 0 2px;
  position: relative;
  text-align: center;
  width: 58px;
  transition: all 0.2s;
}

.fast-bet-button:hover {
  opacity: 0.9;
}

.fast-bet-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #f44336;
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 0 6px;
  box-sizing: border-box;
}

.grid-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  /* shrink to content so it doesn't stick to the right and center it */
  flex: 0 0 auto;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
}

.grid-row {
  display: flex;
  gap: 10px;
  align-items: center;
  /* center each row for a balanced grid */
  justify-content: center;
}

.grid-corner,
.row-btn,
.column-btn {
  width: 34px;
  height: 30px;
  min-width: 34px;
  background-color: rgb(79, 79, 90);
  border: none;
  border-radius: 5px;
  color: rgb(204, 204, 204);
  font-size: 12px;
  font-weight: 400;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
  text-align: center;
  line-height: 16.1px;
  padding: 0;
  margin: 0;
}

.grid-corner:hover,
.row-btn:hover,
.column-btn:hover {
  opacity: 0.9;
}

.grid-corner.active,
.row-btn.active,
.column-btn.active {
  background-color: rgb(79, 79, 90);
  background-image: linear-gradient(rgb(250, 187, 23), rgb(254, 134, 2));
  border: 2px solid rgb(250, 198, 26);
  color: rgb(250, 198, 26);
  opacity: 0.8;
}

.number-cell {
  width: 34px;
  height: 30px;
  min-width: 34px;
  background-color: rgb(79, 79, 90);
  border: none;
  border-radius: 5px;
  color: rgb(204, 204, 204);
  font-size: 12px;
  font-weight: 400;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
  text-align: center;
  line-height: 16.1px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-cell:hover {
  opacity: 0.9;
}

.number-cell.selected {
  background-color: rgb(79, 79, 90);
  background-image: linear-gradient(rgb(250, 187, 23), rgb(254, 134, 2));
  border: 2px solid rgb(250, 198, 26);
  color: rgb(255, 255, 255);
  opacity: 0.8;
}

.grid-numbers {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.grid-numbers span {
  padding: 8px 4px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.grid-numbers span:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.grid-numbers span.selected {
  background: #f59e0b;
  color: white;
  font-weight: 600;
}

.settings-link {
  text-align: right;
}

.settings-link a {
  color: #60a5fa;
  text-decoration: none;
  font-size: 12px;
}

.betting-controls {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.download-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 16px;
  font-size: 12px;
}

.betting-input {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  font-size: 12px;
}

.input-group label {
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.bet-count {
  color: white;
  font-weight: 600;
}

.bet-amount,
.multiplier {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 8px;
  border-radius: 4px;
  width: 60px;
  text-align: center;
  font-size: 12px;
}

.btn-add,
.btn-remove {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.total-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.action-buttons-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-settings,
.btn-quick {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-quick {
  background: #f59e0b;
}

/* Responsive */
@media (max-width: 1200px) {
  .sidebar {
    width: 280px;
  }

  .lottery-section {
    flex-direction: column;
  }

  .betting-input {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-height: 400px;
  }

  .header-center {
    display: none;
  }

  .lottery-options {
    flex-wrap: wrap;
    gap: 8px;
  }

  .option-circle {
    width: 60px;
    height: 60px;
    font-size: 10px;
  }

  .table-row {
    grid-template-columns: 60px repeat(10, 1fr);
    font-size: 10px;
  }

  .table-row span:nth-child(n + 12) {
    display: none;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.trend-button-wrapper {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 8px;
}

.trend-button {
  cursor: pointer;
  display: flex;
  font-size: 0.9em;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 78px;
  border-radius: 8px;
  margin: 11px 2px;
  padding: 8px;
  position: relative;
  transition: 200ms ease-in-out;
  white-space: pre-wrap;
  background-color: rgb(112, 124, 210);
  color: rgba(255, 255, 255, 0.9);
}

.trend-button:hover {
  opacity: 0.9;
}

.trend-button.active {
  background-image: linear-gradient(rgb(250, 187, 23), rgb(254, 134, 2));
  color: rgb(56, 56, 56);
}

.trend-button span {
  font-weight: 500;
}

.betting-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 24px 0;
}

.betting-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.grid-label {
  box-sizing: border-box;
  color: rgb(204, 204, 204);
  display: table-cell;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  height: 40.0938px;
  line-height: 16.1px;
  text-size-adjust: 100%;
  display: flex;
  align-items: center;
  width: 72px;
}

.number-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.button-circle {
  align-items: center;
  background-color: rgb(79, 79, 90);
  border: none;
  border-radius: 50%;
  box-sizing: border-box;
  color: rgb(204, 204, 204);
  cursor: pointer;
  display: flex;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  height: 32px;
  justify-content: center;
  line-height: 16.1px;
  margin-right: 6px;
  min-width: 32px;
  padding: 1px 6px;
  position: relative;
  text-align: center;
  text-size-adjust: 100%;
  width: 32px;
}

.button-circle:hover {
  background-color: rgb(89, 89, 100);
}

.button-circle.selected {
  background-image: linear-gradient(rgb(250, 187, 23), rgb(254, 134, 2));
  color: rgb(255, 255, 255);
  font-weight: 600;
  border: 2px solid rgb(250, 198, 26);
}

.action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.action-btn {
  background-color: rgb(79, 79, 90);
  border: none;
  border-radius: 999px;
  color: rgb(204, 204, 204);
  cursor: pointer;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  padding: 6px 12px;
  text-align: center;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Updated table body styles */
.lottery-tables tbody {
  border-color: rgb(79, 79, 90);
  border-collapse: collapse;
  box-sizing: border-box;
  color: rgb(204, 204, 204);
  display: table-row-group;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  height: 263.125px;
  line-height: 16.1px;
  text-indent: 0px;
  text-size-adjust: 100%;
  unicode-bidi: isolate;
  vertical-align: middle;
  width: 133px;
}

/* Updated upload button styles */
.csv-upload-btn {
  align-items: center;
  background-image: linear-gradient(
    90deg,
    rgb(130, 168, 249),
    rgb(69, 68, 195)
  );
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
  color: rgb(254, 254, 254);
  cursor: pointer;
  display: inline-flex;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  height: 32.0938px;
  justify-content: center;
  line-height: 16.1px;
  outline: none;
  padding: 8px 24px;
  text-align: center;
  text-size-adjust: 100%;
  width: 151.594px;
}

/* Lottery table container - styled like prize table */
.lottery-table-container {
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border-collapse: collapse;
  table-layout: fixed;
  width: 140px;
  max-width: 140px;
}
.game-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.rate-value {
  color: rgb(228, 72, 73);
  font-weight: 800;
}

/* Lottery table cells - styled like prize table cells */
.lottery-table-container td {
  padding: 1px;
  border: 1px solid rgb(79, 79, 90);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  text-align: center;
  font-size: 12px;
}

/* Style for the frequency value */
.frequency-value {
  color: rgb(254, 254, 254);
  font-weight: 500;
  font-size: 12px;
}

/* Style for subtitle cells */
.lottery-table-container .subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 500;
}

/* Container for the tables */
.lottery-tables-wrapper {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

/* Text input styles */
.number-input-textarea {
  width: 100%;
  background-color: rgb(69, 68, 79);
  border: 1px solid rgb(79, 79, 90);
  border-radius: 4px;
  color: rgb(204, 204, 204);
  padding: 6px;
  font-family: inherit;
  resize: vertical;
  font-size: 14px;
}

/* Upload button container */
.upload-container {
  margin-top: 8px;
}

/* Upload button style */
.csv-upload-btn {
  align-items: center;
  background-image: linear-gradient(
    90deg,
    rgb(130, 168, 249),
    rgb(69, 68, 195)
  );
  border: none;
  border-radius: 4px;
  color: rgb(254, 254, 254);
  cursor: pointer;
  display: inline-flex;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  height: 32.0938px;
  justify-content: center;
  line-height: 16.1px;
  padding: 8px 24px;
  text-align: center;
  width: auto;
}

/* Hide file input */
.transparent {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

/* Lottery section container */
.lottery-section-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Number input section */
.number-input-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Input validation messages */
.input-validation {
  color: #ef4444;
  font-size: 12px;
  min-height: 16px;
}

/* Quick select button */
.quick-select-btn {
  align-items: center;
  appearance: button;
  background-color: rgb(79, 79, 90);
  background-image: none;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
  color: rgb(204, 204, 204);
  cursor: pointer;
  display: inline-flex;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  height: 32.0938px;
  justify-content: center;
  line-height: 16.1px;
  margin: 0;
  opacity: 1;
  outline: none;
  overflow: visible;
  padding: 8px 24px;
  text-align: center;
  text-size-adjust: 100%;
  text-transform: none;
  width: 130px;
  transition: all 0.2s;
}

.quick-select-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Lottery table rows highlight when selected */
.lottery-table-container tr.highlighted {
  background-image: linear-gradient(rgb(250, 187, 23), rgb(254, 134, 2));
  border-bottom-color: rgb(79, 79, 90);
  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-collapse: collapse;
  border-left-color: rgb(79, 79, 90);
  border-right-color: rgb(79, 79, 90);
  border-top-color: rgb(79, 79, 90);
  box-sizing: border-box;
  color: rgb(255, 255, 255);
  display: table-row;
  font-family: Roboto, "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  height: 19.0938px;
  line-height: 16.1px;
  text-indent: 0px;
  text-size-adjust: 100%;
  unicode-bidi: isolate;
  vertical-align: middle;
  width: 133px;
}

.lottery-table-container tr.highlighted td {
  color: rgb(255, 255, 255);
  font-weight: 600;
}

.lottery-table-container tr.highlighted .frequency-value {
  color: rgb(255, 255, 255);
  font-weight: 600;
}

/* Hover effect for clickable lottery table rows */
.lottery-table-container tr[data-number]:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.lottery-table-container tr[data-number]:hover td {
  color: rgb(255, 255, 255);
}

.lottery-table-container tr[data-number].highlighted:hover {
  background-image: linear-gradient(rgb(255, 200, 50), rgb(255, 150, 20));
}

/* ========================================= */
/* MOBILE RESPONSIVE DESIGN - STARTS HERE   */
/* ========================================= */

/* Mobile placeholder content */
.mobile-content {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 90px);
  padding: 20px;
  text-align: center;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin: 20px;
}

.mobile-content h1 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #f59e0b;
  font-weight: 600;
}

.mobile-content p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.mobile-content .icon {
  font-size: 48px;
  margin-bottom: 20px;
  color: #3b82f6;
}

.modal-header {
  background: linear-gradient(135deg, rgb(130, 168, 249), rgb(69, 68, 195));
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.close {
  color: rgba(255, 255, 255, 0.8);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 5px;
  border-radius: 4px;
}

.close:hover,
.close:focus {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.modal-body {
  padding: 25px;
  max-height: 60vh;
  overflow-y: auto;
  color: rgb(204, 204, 204);
  line-height: 1.6;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Tablet styles (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .main-container {
    width: 100%;
    max-width: none;
    padding: 8px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 16px;
  }

  .sidebar {
    width: 280px;
    min-width: 280px;
  }

  .lottery-section {
    flex-direction: column;
    gap: 12px;
  }

  .number-grid {
    flex-direction: column;
    gap: 12px;
  }

  .grid-container {
    overflow-x: auto;
  }

  .betting-input {
    flex-direction: column;
    gap: 12px;
  }
}

/* Mobile styles (below 768px) */
@media (max-width: 767px) {
  /* Hide desktop content on mobile */
  .main-container,
  .header-center,
  .header-right .menu-toggle {
    display: none !important;
  }

  /* Show mobile content */
  .mobile-content {
    display: flex !important;
  }

  /* Mobile header adjustments */
  .header {
    height: 70px;
  }

  .header-container {
    width: 100%;
    max-width: none;
    padding: 0 16px;
    justify-content: center;
  }

  .header-left {
    width: 100%;
    justify-content: center;
  }

  .logo {
    height: 60px;
  }

  .logo img {
    height: 50px;
    max-width: 200px;
  }

  /* Body adjustments for mobile */
  body {
    font-size: 14px;
    padding: 0;
  }

  /* Hide gradient bar on mobile */
  .header + div[style*="background-image: linear-gradient"] {
    display: none;
  }
}

/* Very small mobile (below 480px) */
@media (max-width: 479px) {
  .mobile-content {
    margin: 10px;
    padding: 16px;
  }

  .mobile-content h1 {
    font-size: 20px;
  }

  .mobile-content p {
    font-size: 14px;
  }

  .mobile-content .icon {
    font-size: 36px;
  }

  .header {
    height: 60px;
  }

  .logo {
    height: 50px;
  }

  .logo img {
    height: 40px;
    max-width: 150px;
  }
}

/* Additional mobile optimizations */
@media (max-width: 767px) {
  /* Ensure proper touch targets */
  button,
  .nav-link,
  .nav-item {
    min-height: 44px;
    min-width: 44px;
  }

  /* Improve text readability */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Prevent horizontal scroll */
  body,
  html {
    overflow-x: hidden;
    width: 100%;
  }

  /* Better scrolling on iOS */
  * {
    -webkit-overflow-scrolling: touch;
  }
}

/* Landscape mobile adjustments */
@media (max-width: 767px) and (orientation: landscape) {
  .mobile-content {
    min-height: calc(100vh - 60px);
    padding: 16px;
  }

  .mobile-content h1 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .mobile-content p {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .mobile-content .icon {
    font-size: 32px;
    margin-bottom: 16px;
  }
}

/* High DPI mobile screens */
@media (max-width: 767px) and (-webkit-min-device-pixel-ratio: 2) {
  .mobile-content {
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .logo img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark mode improvements for mobile */
@media (max-width: 767px) and (prefers-color-scheme: dark) {
  .mobile-content {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ========================================= */
/* MODAL STYLES - DESKTOP VERSION           */
/* ========================================= */

/* Modal overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

/* Modal content container */
.modal-content {
  background: linear-gradient(135deg, rgb(58, 58, 68), rgb(69, 68, 79));
  margin: 2% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal animation */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal header */
.modal-header {
  background: linear-gradient(135deg, rgb(130, 168, 249), rgb(69, 68, 195));
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Close button */
.close {
  color: rgba(255, 255, 255, 0.8);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 5px;
  border-radius: 4px;
}

.close:hover,
.close:focus {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

/* Modal body */
.modal-body {
  padding: 25px;
  max-height: 60vh;
  overflow-y: auto;
  color: rgb(204, 204, 204);
  line-height: 1.6;
}

/* Modal body scrollbar */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Rules sections */
.rules-section h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 700;
}

.rule-item {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 4px solid rgb(130, 168, 249);
}

.rule-item p {
  margin: 0 0 10px 0;
  font-size: 14px;
}

.rule-item ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

.rule-item li {
  margin-bottom: 8px;
  font-size: 14px;
}

/* Schedule table */
.schedule-table {
  margin: 20px 0;
  overflow-x: auto;
}

.schedule-table table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.schedule-table th,
.schedule-table td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.schedule-table th {
  background: rgba(130, 168, 249, 0.2);
  color: white;
  font-weight: 600;
}

.schedule-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

/* Modal footer */
.modal-footer {
  padding: 20px 25px;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

/* Close button in footer */
.btn-close {
  background: linear-gradient(135deg, rgb(130, 168, 249), rgb(69, 68, 195));
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(69, 68, 195, 0.3);
}

.btn-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(69, 68, 195, 0.4);
}

/* Rate highlighting */
.rate {
  color: #f59e0b;
  font-weight: 700;
}

/* Modal responsive styles for desktop */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
    max-height: 85vh;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-body {
    padding: 20px;
    max-height: 50vh;
  }

  .modal-footer {
    padding: 15px 20px;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .rule-item {
    padding: 12px;
  }

  .rule-item p,
  .rule-item li {
    font-size: 13px;
  }
}
