.dash_container {
  display: flex;
  gap: 1rem;
  margin: 0 auto;
  flex-wrap: wrap;
  /* max-width: var(--max-width); */
  margin: auto;
}

.paddler{
  padding: 2rem; background-color: var(--bg-dark);
}

.card {
  background: var(--bg);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-muted);
  flex: 1 1 auto;
}

.title {
  grid-area: title;
}

.stats-box {
  grid-area: stats;
}

.stats-box card p {
  font-size: 2rem;
}

.popular-codes {
  grid-area: popular;
}

.insights {
  grid-area: insights;
  min-height: 200px;
}

.search-and-manage {
  grid-area: search;
}

.search-and-manage card {
  background: var(--bg-light);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-muted);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.account-options {
  grid-area: account;
}

.broadcast {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.ranking {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.rank-entry {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-muted);
  flex: 1;
}

.creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.rank-num {
  font-weight: bold;
  font-size: 1.1rem;
}

.search-results {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  overflow-y: scroll;
  max-height: 450px;
  display: grid;
  gap:1rem;

    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gradient);
    border-top: 1px solid var(--highlight);
    border-radius: 1rem;
    flex-direction: column;
}
.search-results::-webkit-scrollbar{
  display: none;
}

.search-results{
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#main-bottom{
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
}

/*Graphs*/
.insights-container {
  padding: 2rem;
  max-width: 900px;
  margin: auto;
}

.chart-selector {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.chart-canvas {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 1rem;
  width: 100%;
  max-height: 400px;
}

#container {
  border: var(--border-card);
  padding: 1rem;
  border-radius: 10px;
  background-color: var(--bg-light);
  display: flex;
  gap:1rem;
  border: 1px solid var(--border-muted);
}

.code, .creator, .user, .moderator{
  writing-mode: sideways-lr;
  text-orientation: mixed;
  color:#000;
  padding:10px;
  border-radius: 10px;
  margin: 0;
  align-self:center;
  font-weight: bolder;
}
.code{
  background-color:rgb(131, 255, 131);
}
.creator{
  background-color:rgb(255, 127, 255);
}
.user{
  background-color: rgb(123, 123, 255);
}
.moderator{
  background-color: rgb(253, 255, 135);
}

#youtuber {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

#youtuber img {
  border-radius: 50%;
}

#right{
  display: flex;
  flex-direction: column;
  gap: calc(1rem/4);
}

/* ------------------ */
/* 🔽 Responsive Adjustments */
/* ------------------ */

/* Tablets and below (≤ 768px) */
@media (max-width: 768px) {

  .card,
  .search-and-manage card,
  .rank-entry {
    padding: 0.75rem;
  }

  .stats-box card p {
    font-size: 1.5rem;
  }

  .rank-num {
    font-size: 1rem;
  }

  .search-results {
    font-size: 0.9rem;
  }
}

/* Mobile phones (≤ 480px) */
@media (max-width: 480px) {
  .card,
  .search-and-manage card,
  .rank-entry {
    padding: 0.5rem;
  }

  .stats-box card p {
    font-size: 1.2rem;
  }

  .rank-num {
    font-size: 0.95rem;
  }

  .search-results {
    font-size: 0.85rem;
  }
}

@media (max-width: 650px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: grid;
    background-color: var(--bg-light);
    grid-template-rows: auto;
  }

  thead {
    display: none;
  }

  tr{
    display: block;
  }

  td {
    padding: 0.5rem;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-muted);
  }
  .paddler{
    padding: 0.75rem;
  }
  #container{
    flex-direction: column;
    padding:0.75rem;
  }
  .search-results{
    padding:0.75rem;
  }
  a, h3{
    font-size: 0.9rem;
  }
  .code,.creator,.user,.moderator{
    writing-mode: inherit;
    text-orientation: inherit;
    width:100%;
    text-align: center;
  }
  #main-bottom form button{
    flex:1 1;
  }
}
