* {
  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;
}

#navbar 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;
  user-select: none;
}

#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;
}
#nav_settings.open {
  display: flex;
  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;
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.3);
  user-select: none;
  overflow: hidden;
}

#nav_settings p,
#nav_settings a{
  padding: 12px 8px;
  font-weight: 600;
  cursor: default;
  text-decoration: none;
  text-align: center;
}
#nav_settings p:hover,
#nav_settings a:hover{
  background-color: #404040;
}




#marketplace{
  top: 10px;
  position: absolute;
  background-color: #1C1C1C;
  color: #A3A3A3;
  border: 1px solid #424242;
  border-radius: 15px;
  min-height: 30px;
  
  font-family: 'Inter';
  margin-right: 150px;
  right: 0;
}

#marketplace_title{
  display: flex;
  height: 30px;
  align-items: center;
  padding: 0 10px;
  user-select: none;
}
#marketplace_title:hover{
  cursor: pointer;
}

#marketplace_title svg{
  margin-left: 4px;
  transform-origin: 50% 30%;
  transition: transform 250ms ease;
  transform: rotate(0deg);
}

#marketplace_content{
  display: none;
}

#marketplace_content.open{
  display: block;
  padding: 4px 0;
  border-top: 1px solid #424242;
  margin: 0 4px;
  user-select: none;
}
#marketplace:has(#marketplace_content.open) #marketplace_title svg{
  transform: rotate(180deg);
}

#marketplace_content p {
  padding: 8px 0;
  width: 100%;
  border-radius: 8px;
  text-align: center;
  cursor: default;
}
#marketplace_content 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;
  user-select: none;
}

#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_card.dragging{
  cursor: grab;
  opacity: 0.3;
}

.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 0;
  align-items: center;
  color: #adadad;
}

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






#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;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

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

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

#timeframe_p{
  font-size: 15px;
}

#timeframe-box {
  display: none;
}
#timeframe-box.open{
  display: flex;
  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;
  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, #indicators-btn:hover, #chart-style-btn:hover, #snapshot-btn:hover{
  background-color: #2D2D2D;
}
#indicators-btn{
  user-select: none;
}

#timeframe-box li:hover, .chart-style-menu-card:hover {
  background-color: #2D2D2D;
}



#search-box{
  display: none;
}
#search-box.open{
  display: flex;
  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: 20px;
  width: 20px;
  border: 1px solid #424242;
  border-radius: 4px;
  color: #a3a3a386;
  background-color: #1C1C1C;
}
.chart-toggle:hover{
  background-color: #2D2D2D;
}
.chart-toggle.active{
  background-color: #58a5d1;
  color: #1C1C1C;
  border: 1px solid #6cc9ff00;
  font-weight: 600;
}
.chart-toggle.active:hover{
  background-color: #5198c2;
}

#chart-style-menu{
  display: none;
}

#chart-style-menu.open{
  display: flex;
  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: fit-content;
  overflow: hidden;
  border-radius: 4px;
  top: 100%;
  right: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chart-style-menu-card{
  display: flex;
  padding: 12px 16px;
  align-items: center;
  user-select: none;
}

.chart-style-menu-card p{
  height: fit-content;
  margin-left: 6px;
}

.chart-style-menu-card svg {
  flex-shrink: 0;
}









#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;
}
#currency-box.open{
  display: flex;
  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;
}

.ci.pos { 
  color: #26A69A; 
}
.ci.neg { 
  color: #EF5350; 
}
.card.neg{
  background-color: #ef53593e;
  border-color: #EF5350;
}

#chart-message{
  display: none;
  justify-content: center;
  align-items: center;
  height: 100%;
}




.wl_card.dragging {
  opacity: 0.5;
}
.wl_ctx_menu {
  position: absolute;
  min-width: 180px;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 4px 0;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.wl_ctx_item {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  text-align: left;
  color: #eee;
  font-size: 14px;
  cursor: pointer;
}
.wl_ctx_item:hover {
  background: #333;
}


#phone_nav_background{
  display: block;
}

#hamburger_menu{
  display: none;
  margin-left: 18px;
  padding: 0 12px;
  height: fit-content;
  user-select: none;
}

.info_text{
  margin-bottom: 8px;
}

#wl-info{
  display: none;
  color: #a3a3a386;
  text-align: center;
  width: 100%;
  margin-top: 8px;
  cursor: default;
}

#remove{
  position: fixed;
  display: none;
  align-items: center;
  height: 30px;
  width: 80px;
  border: 1px solid #424242;
  cursor: pointer;
  justify-content: center;
  box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  z-index: 100;
  background-color: #1C1C1C;
}

#remove:hover{
  background-color: #424242;
}




#attribution-text{
  display: none;
  color: #A3A3A3;
  margin-top: 40px;
}

.attribution-link{
  text-decoration: none;
  color: #bebebe;
}




@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: flex;
    flex-direction: column;
    position: absolute;
    top: 50px;
    height: calc(100vh - 50px - 25px -57px);
  }

  #watchlist,
  #info{
    display: none;
  }

  #watchlist.open,
  #info.open{
    display: block;
    z-index: 15;
    border-radius: 8px;
    width: calc(100vw - 64px);
    margin: 4px;
  }
  #info.open{
    position: absolute;
    top: 60px;
    height: calc(100dvh - 50px - 25px - 57px - 48px - 64px - 12px);
  }
  #watchlist.open{
    height: calc(100dvh - 50px - 25px - 57px - 48px);
  }

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

  #legal{
    position: fixed;
    border-radius: 0px;
    height: 25px;
    width: 100vw;
    bottom: 0;
  }

  #lol-bar{
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    height: 56px;
    width: 100%;
    border-bottom: 1px solid #404040;
    border-radius: 8px 8px 0 0;
  }

  #lol-bar div{
    display: flex;
    width: 50vw;
    text-align: center;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
  }
  #lol-bar div:hover{
    color: #dcdcdc;
  }
  #lol-bar div.open{
    border-bottom: 2px solid #6CB3FF;
    color: #dcdcdc;
    margin-top: 2px;
  }


  .text{
    font-size: 16px;
  }

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

  #search-button .chevron{
    margin-left: 0;
  }

  #search-box.open{
    margin-left: 0px;
  }

  #phone_nav_background{
    display: none;
  }
  #phone_nav_background.open{
    display: flex;
    position: absolute;
    top: 50px;
    background-color: #212121;
    height: fit-content;
    width: 100vw;
    padding: 30px 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  }

  #navbar ul{
    flex-direction: column;
  }

  #navbar ul li{
    margin: 12px 0;
  }

  .nav{
    margin-left: 30px;
  }

  #hamburger_menu{
    display: flex;
    width: 23px;
    height: 100%;
    align-items: center;
    justify-content: center;
  }

  #hamburger_menu svg{
    display: none;
  }
  #hamburger_menu svg.open{
    display: block;
  }

}

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

}