* {
  padding: 0;
  margin: 0;
}

html {
  font-family: 'Inter', sans-serif;
}

body.charts{
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #2D2D2D;
}

body{
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.text{
  font-family: 'Inter';
  color: #A3A3A3;
  font-size: 14px;
}

.container{
  background-color: #1C1C1C;
  border-radius: 8px;
  padding: 0px;
}

nav{
  position: sticky;
  top: 0;
  width: 100%;
  background-color: #1C1C1C;
  height: 50px;
  display: flex;
  align-items: center;
  z-index: 100;
}

li{
  list-style-type: none;

}

.nav{
  text-decoration: none;
  margin-left: 60px;
}

.nav:hover{
  color: white;
}

.active{
  color: white;
}

ul{
  display: flex;
  margin: 0px;
  flex-grow: 1;
}

.nav_login{
  display: none;
  justify-content: center;
  align-items: center;
  height: 30px;
  border-radius: 8px;
  margin: 0 24px 0 auto;
  padding: 0 10px;
  text-decoration: none;
  background-color: #6cb3ffed;
  color: #212121;
  font-size: 15px;
  font-weight: 800;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.nav_login:hover{
  background-color: #6cc9ff;
  box-shadow: 0 0 30px #6cb3ff1a;
}

.nav_account_wrapper{
  display: none;
  flex-direction: column;
  width: fit-content;
  height: fit-content;
  margin: 0 24px 0 auto;
  position: relative;
}

.nav_account{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 30px;
  min-width: 50px;
  max-width: 100px;
  border-radius: 8px;
  padding: 0 12px;
  border: 1px solid #424242;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}
.nav_account:hover{
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.3);
}

.nav_account p{
  color: #A3A3A3;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.nav_settings{
  display: none;
  flex-direction: column;
  position: absolute;
  width: 100%;
  border: 1px solid #424242;
  border-top: none;
  border-radius: 8px;
  top: 100%;
  height: fit-content;
  background-color: #1C1C1C;
  padding: 8px 0;
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.3);
}

.nav_settings p{
  padding: 6px 8px;
  font-weight: 600;
  cursor: default;
}
.nav_settings p:hover{
  background-color: #404040;
}

#main-container {
  flex: 1;
  display: grid;
  /* minmax(0, …) sorgt dafür, dass die Spalten wirklich schrumpfen dürfen */
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  min-height: 0;
}

#left-container {
  display: flex;
  flex-direction: column;
  margin: 4px 0 4px 4px;
  gap: 4px;
  min-height: 0; /* damit der Chart innerhalb schrumpfen darf */
  min-width: 0;
}

#searchbar {
  position: relative;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

#chart {
  position: relative;
  flex: 1;      /* nimmt den ganzen restlichen Platz */
  min-height: 0;
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

#right-container{
  display: grid;
  margin: 4px 0 0 4px;
  gap: 4px;
  min-width: 0;
  min-height: 0; /* optional, aber oft hilfreich */
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) 25px;
}

#watchlist{
  margin-right: 4px;
  min-height: 0;
  padding: 20px 28px;
  overflow-y: hidden;
}

#wl_t{
  color: #A3A3A3;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 16px;
  width: 100%;
  text-align: center;
}

#wl_h{
  display: flex;
  border-bottom: 1px solid #424242;
  padding: 4px;
  justify-content: flex-end;
}

#wl_b{
  height: calc(100% - 72px);
  margin-top: 8px;
  overflow-y: auto;
}

.wl_ut{
  color: #A3A3A3;
  white-space: nowrap;
  font-size: 14px;
  cursor: default;
  width: 48px;
}

.wl_lt{
  margin-right: auto;
}

.wl_rt{
  text-align: right;
  padding-left: 12px;
  overflow: hidden;
}

.wl_rl{
  box-shadow: -8px 0 8px 0 #1C1C1C;
  min-width: max-content;
}

.wl_card{
  display: flex;
  padding: 8px 4px;
  justify-content: right;
}

.wl_uti{
  color: #adadad;
  overflow: hidden;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
  min-width: 48px;
}

#wl_add_item{
  display: none;
  justify-content: center;
  width: 100%;
  padding: 8px 4px;
  align-items: center;
  color: #adadad;
}

#wl_add_item.wl_limit {
  opacity: 0.6;
  cursor: default;
}

.wl_card:hover .white{
  color: #C1C1C1;
}
.wl_card:hover{
  cursor: pointer;
}
#wl_add_item:hover{
  color: #C1C1C1;
  cursor: pointer;
}
#wl_add_item.wl_limit:hover{
  color: #adadad;
  cursor: default;
}
.negative{
  color: #EF5350;
}
.positive{
  color: #26A69A;
}

.wl_context_menu {
  position: absolute;
  display: none;
  background: #181818;
  border: 1px solid #393939;
  border-radius: 4px;
  padding: 4px 0;
  z-index: 9999;
  min-width: 160px;
}

.wl_context_menu button {
  width: 100%;
  padding: 6px 10px;
  background: none;
  border: none;
  color: #f5f5f5;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.wl_context_menu button:hover {
  background: #323232;
}

.wl_card.dragging {
  opacity: 0.6;
}







#info{
  margin-right: 4px;
  padding: 28px;
}

#info_scroll{
  height: 100%;
  overflow-y: auto;
  min-height: 0;
}

/* Scrollbars verstecken */
#watchlist,
#info_scroll,
#wl_b {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#watchlist::-webkit-scrollbar,
#info_scroll::-webkit-scrollbar,
#wl_b::-webkit-scrollbar {
  display: none;
}

.searchbar-item{
  background: none;
  border: none;
  border-radius: 6px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 60px;
}

#search-button{
  gap: 4px;
  margin: 0 auto;
  color: #C1C1C1;
  padding: 0 8px;
}

#search-button:hover{
  cursor: pointer;
}

#item-name {
  text-align: center;
  font-size: 20px;
  font-weight: 500;
}

#search-button .chevron {
  margin-top: 6px;
  margin-left: 2px;
  transform-origin: 50% 30%;
  transition: transform 250ms ease;
  transform: rotate(0deg);
}

#search-button.open .chevron {
  transform: rotate(180deg);
}

#timeframe_p{
  font-size: 15px;
}

#timeframe-box {
  position: absolute;       /* damit sie über anderen Elementen liegt */
  background-color: #1C1C1C;
  flex-direction: column;   /* nur relevant, wenn du display:flex nutzt */
  z-index: 20;
  width: 110px;
  overflow: hidden;
  border-radius: 4px;
  display: none;
  top: 100%;
  left: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#timeframe-box li {
  list-style-type: none;
  cursor: default;
  color: #A3A3A3;
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  user-select: none;
}

#timeframe:hover{
  background-color: #2D2D2D;
}

#timeframe-box li:hover {
  background-color: #2D2D2D;
}




#search-box{
  display: none;
  flex-direction: column;
  position: absolute;
  z-index: 20;
  top: 100%;
  min-height: 47px;
  width: 600px;
  height: fit-content;
  border: 1px solid #424242;
  border-radius: 16px;
  background-color: #1C1C1C;
  margin: 18px 0 0 52px;
  max-width: calc(100vw - 24px);
  box-shadow: 0 0 23px 8px rgba(0, 0, 0, 0.3);
}

#search-top-c{
  display: flex;
  align-items: center;
  height: 47px;
}

#search-input{
  font-family: 'Inter';
  width: calc(100% - 68px);
  border: none;
  background-color: #1C1C1C;
  padding-left: 5px;
  outline: none;
  color: #A3A3A3;
  height: 30px;
  font-size: 15px;
}
input::placeholder {
  color: rgba(163, 163, 163, 0.5);
}

#lupe{
  margin: 0 2px 0 8px;
}

#search-results{
  display: none;
  flex-direction: column;
  padding: 18px 39px;
  border-top: 1px solid #424242;
  max-height: 270px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#search-results li{
  cursor: default;
  color: #A3A3A3;
  padding: 18px 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 18px;
}

#search-results li:hover {
  color: #D5D5D5;
}

#search-input::-webkit-search-decoration,
#search-input::-webkit-search-cancel-button,
#search-input::-webkit-search-results-button,
#search-input::-webkit-search-results-decoration {
  display: none;
}

#search-results::-webkit-scrollbar {
  display: none;
}









#chart-toggle-container{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  position: absolute;
  bottom: 0;
  right: 0;
  padding-bottom: 30px;
  padding-right: 4px;
  z-index: 3;
  width: 48px;
  cursor: default;
}

.chart-toggle{
  display: flex;
  justify-content: center;
  align-items: center;
  height: 22px;
  width: 20px;
  border: 1px solid #424242;
  border-radius: 4px;
  color: #a3a3a386;
  background-color: #1C1C1C;

  user-select: none;
  -webkit-user-select: none; /* Safari/ältere Browser */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* ältere IE/Edge */
}
.chart-toggle:hover{
  background-color: #2D2D2D;
}
.chart-toggle.active{
  background-color: #4d8db2;
  color: #1C1C1C;
  border: 1px solid #6cc9ff00;
  font-weight: 600;
}
.chart-toggle.active:hover{
  background-color: #4884a8;
}

#currency-button{
  display: flex;
  position: absolute;
  background-color: #1C1C1C;
  color: #A3A3A3;
  height: 20px;
  width: 48px;
  border: 1px solid #424242;
  z-index: 4;
  margin: 0 4px 4px 0;
  border-radius: 4px;
  right: 0px;
  bottom: 0px;
  align-items: center;
  justify-content: center;
  user-select: none;
}

#currency-button:hover{
  cursor: default;
  background-color: #2D2D2D;
}

#currency-box{
  display: none;
  position: absolute;
  z-index: 5;
  flex-direction: column;
  background-color: #1C1C1C;
  width: 48px;
  margin-bottom: 1px;
  bottom: 25px;
  right: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border: 1px solid #424242;
  border-bottom: none;
}

#currency-box li{
  padding: 6px 0;
  width: 100%;
  text-align: center;
  cursor: default;
  user-select: none;
}

#currency-box li:hover{
  background-color: #2D2D2D;
  border-radius: 4px;
}

#legal{
  display: flex;
  background-color: #1C1C1C;
  border-radius: 8px 0 0 0;
  align-items: center;
}

#legal-header{
  margin-left: 28px;
  cursor: default;
}

#legal-links{
  margin-left: auto;
  padding-right: 20px;
}

#legal a{
  margin-right: 16px;
  text-decoration: none;
  padding: 0;
}

#lol-bar{
  display: none;
}


/* info box design */

#row{
  display: flex;
  flex-direction: row;
  align-items: baseline;
  margin-bottom: 12px;
}

#price{
  color: #A3A3A3;
  font-size: 24px;
  font-weight: 500;
}
#cny{
  color: #A3A3A3;
  font-size: 13px;
  font-weight: 400;
  padding-left: 4px;
}

#cards_a{
  margin-top: 40px;
  border: 1px solid #424242;
  padding: 20px;
  height: fit-content;
}

#cards_h{
  margin: 0 auto;
  padding-bottom: 8px;
  width: 140px;
  text-align: center;
  font-size: 16px;
  border-bottom: 1px solid #424242;
}

#cards {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  align-content: space-evenly;
  gap: 16px;
  margin-top: 16px;
}

.card {
  background-color: #26a6993e;
  border: 1px solid #26A69A;
  text-align: center;
  width: 100px;
  height: 50px;
  border-radius: 6px;
}

.ch{
  color: #1C1C1C;
  font-weight: 700;
  margin-top: 4px;
  font-size: 13px;
}

.ci{
  display: flex;
  color: #26A69A;
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
  justify-content: center;
}









@media (max-width: 1023px) {

  /* Speziell für die Charts-Seite: volle Breite, automatische Höhe */
  body.charts {
    width: 100%;
    height: auto;
    font-size: 16px;
  }

  /* Haupt-Container: Grid weg, einfach normaler Block */
  #main-container {
    display: block;
    min-height: auto;
  }

  /* Linke und rechte Spalte einfach untereinander */
  #left-container,
  #right-container {
    display: block;
    margin: 0;
    min-width: 0;
    min-height: auto;
  }

  /* Damit du wenigstens einen Chart siehst und nicht 0px Höhe hast */
  #chart {
  height: calc(100dvh - 200px);
  }

  /* Rechts kein Grid mehr auf Mobile */
  #right-container {
    display: block;
  }

  #watchlist,
  #info{
    display: none;
    height: 20px;
    margin: 0 4px 4px 4px;
    overflow-y: auto;
  }

  #searchbar{
    margin: 4px;
  }
  #chart{
    margin: 0 4px 4px 4px;
  }

  #legal{
    border-radius: 0px;
    height: 25px;
  }

  #lol-bar{
    display: block;
    height: 56px;
    width: 100%;
    border-bottom: 1px solid #404040;
    border-radius: 8px 8px 0 0;
  }

  .text{
    font-size: 16px;
  }

  #item-name {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    padding: 0 8px; 
    margin: 0 auto;
  }

  #search-box{
    margin-left: 0;
  }

}

@media (max-width: 750px){
  #search-box{
    margin: 12px 0 0 0;
  }

}