* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, Arial, sans-serif;
  color: #fff;
  background: #0a0a0f;
}

.custom-modal {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  z-index: 9999;
  background-color: #3a3a3a;
  border: 2px solid #5dade2;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(93,173,226,0.6);
  font-family: Arial, sans-serif;
  transition: top 0.5s ease;
}
.custom-modal img {
  width: 80%;
  height: 90%;
  display: block;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.custom-modal .modal-content {
  padding: 20px;
  text-align: center;
  font-size: 16px;
}
.custom-modal.info .modal-content { background-color: #353535; color: #ffffff; }
.custom-modal.error .modal-content { background-color: #353535; color: rgb(255, 0, 0); }
.custom-modal.success .modal-content { background-color: #353535; color: rgb(0, 255, 0); }
.custom-modal input {
  width: 80%;
  padding: 8px;
  margin-top: 10px;
  border: 1px solid #003e68;
  border-radius: 5px;
}
.custom-modal button {
  margin-top: 15px;
  padding: 8px 15px;
  background-color: #1c71aa;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.custom-modal .close-btn {
  position: absolute;
  top: 5px;
  right: 8px;
  font-size: 20px;
  font-weight: bold;
  color: #ff0000;
  cursor: pointer;
}

h3 {
  display: block;
  font-size: 1.5vh;
  margin-left: 56%;
}

.block{
  display: block;
}

.hidden {
  display: none;
}

.icon-red {
  color: red;
}

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: #272727;
  padding: 10px 16px;
  height: 72px;
  position: relative;
  white-space: nowrap;
  z-index: 100;
}

.left {
  justify-self: start;
  min-width: 0;
}

.center {
  justify-self: center;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.right {
  justify-self: end;
  min-width: 0;
  display: flex;
  align-items: center;
  position: relative;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

#User-Icon {
  width: clamp(28px, 4vw, 40px);
  border-radius: 50%;
  flex-shrink: 0;
  transition: 0.2s;
}

#username {
  font-weight: 500;
  white-space: nowrap;
  transition: 0.2s;
}

.user-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  background: #272727;
  padding: 6px;
  border-radius: 4px;
  min-width: 100px;
  gap: 4px;
  z-index: 100;
}

.user-dropdown img {
  width: 28px;
  cursor: pointer;
}

.user-dropdown span {
  font-weight: 500;
}

.user-menu.open .user-dropdown {
  display: flex;
}

#icontexte {
  height: clamp(28px, 6vw, 48px);
  max-width: min(50vw, 360px);
  width: auto;
  object-fit: contain;
  transition: 0.2s;
}

.right-items {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  transition: 0.2s;
}

.right-items img,
#sound-button {
  height: clamp(28px, 4.5vw, 40px);
  width: auto;
  cursor: pointer;
  display: block;
  transition: 0.2s;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 6px 8px;
  transition: 0.2s;
}

@media (max-width: 900px), (orientation: portrait) {
  .right-items {
    display: none;
    position: absolute;
    top: 100%;
    right: 8px;
    background: #272727;
    padding: 8px;
    border-radius: 6px;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    z-index: 60;
  }
  .hamburger {
    display: inline-block;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  #icontexte {
    height: clamp(24px, 8vw, 34px);
    max-width: 40vw;
  }
  #username {
    display: none;
  }
  #User-Icon {
    width: 28px;
  }
  .user-dropdown img {
    width: 24px;
  }
  .right-items img,
  #sound-button {
    height: 28px;
  }
}

.right.open .right-items {
  display: flex;
}

a:focus,
button:focus,
img:focus {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.side-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 49;
}

.side-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.side-bar {
  position: fixed;
  left: 0;
  top: 72px;
  height: calc(100% - 72px);
  width: 280px;
  background: #272727;
  color: #fff;
  box-shadow: 2px 0 18px rgba(0, 0, 0, 0.12);
  transform: translateX(0);
  transition: transform 0.22s ease;
  z-index: 50;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #555 #272727;
}

.side-bar::-webkit-scrollbar {
  width: 8px;
}

.side-bar::-webkit-scrollbar-track {
  background: #272727;
  border-radius: 4px;
}

.side-bar::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
  border: 2px solid #272727;
}

.side-bar::-webkit-scrollbar-thumb:hover {
  background-color: #777;
}

@media (max-width: 900px), (orientation: portrait) {
  .side-bar {
    transform: translateX(-100%);
    width: 80vw;
    max-width: 320px;
  }
  .side-bar.open {
    transform: translateX(0);
  }
}

.side-bar ul {
  list-style: none;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.side-bar li {
  cursor: default;
}

.side-bar li:hover a {
  background: rgba(255, 255, 255, 0.08);
}

.side-bar a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.side-bar a i {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.side-bar a span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-bar li.active a span,
.side-bar li.active a i {
  color: #FFD966;
  font-weight: 600;
  font-size: 1.05em;
}

button {
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  font-size: 1vw;
  color: white;
  background-color: rgba(99, 99, 99, 0.788);
  padding: 3vh 10vw;
  border-radius: 25px;
  margin: 3vh auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30vw;
  height: 10vh;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 2;
  cursor: pointer;
}

button:hover {
  opacity: 0.95;
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}


@media (max-width: 520px) and (orientation: portrait) {
  button {
    width: 70%;
    height: auto;
    padding: 6px 0;
    font-size: 0.75rem;
    margin: 2vh auto;
  }

  #file-manager {
      max-height: 80vh;
      overflow-y: auto;
      padding: 5vh 10px;
      margin-bottom: 5vh;
      scrollbar-color: rgba(255, 0, 0, 0);
  }
  #file-manager {
      max-height: 80vh;
      overflow-y: scroll;
      scrollbar-width: none;       
      -ms-overflow-style: none;     
    }
  #file-manager::-webkit-scrollbar {
      display: none;                
  }

  #file-manager2 {
      max-height: 60vh;
      overflow-y: auto;
      padding: 10vh;
      scrollbar-color: rgba(255, 0, 0, 0);
  }
  #file-manager2 {
      max-height: 60vh;
      overflow-y: scroll;
      scrollbar-width: none;       
      -ms-overflow-style: none;     
  }

  #file-manager2::-webkit-scrollbar {
      display: none;                
  }


}

.download-button,
.delete-button {
    background-color: rgba(0, 148, 12, 0.87);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1em;
    height: 1vh;
    line-height: 1vh;
}

.delete-button {
    background-color: rgb(155, 0, 0);
}

.download-button:hover,
.delete-button:hover {
    background-color: darkgreen;
}

#file-manager {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10vh;
    scrollbar-color: rgba(255, 0, 0, 0);
}
#file-manager {
    max-height: 60vh;
    overflow-y: scroll;
    scrollbar-width: none;       
    -ms-overflow-style: none;     
  }
#file-manager::-webkit-scrollbar {
    display: none;                
}

#file-manager2 {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10vh;
    scrollbar-color: rgba(255, 0, 0, 0);
}
#file-manager2 {
    max-height: 60vh;
    overflow-y: scroll;
    scrollbar-width: none;       
    -ms-overflow-style: none;     
}

#file-manager2::-webkit-scrollbar {
    display: none;                
}

#progress-container {
width: 25vw; 
height: 20px;
background-color: white;
border: 1px solid #ccc;
border-radius: 10px;
overflow: hidden;
margin: 20px auto; 
display: none;
}

#progress-bar {
height: 100%;
width: 0%;
background-color: green;
transition: width 0.2s ease;
}

.progress-bar {
width: 100%;
height: 15px;
background-color: white;
border-radius: 8px;
overflow: hidden;
margin-top: 5px;
}

.progress-fill {
height: 100%;
width: 0%;
background-color: green;
transition: width 0.5s ease, background-color 0.5s ease;
}

.search-bar {
    margin-top: 2vh;
    display: flex;
    justify-content: center;
}


#search-bar2 {
    margin-top: 2vh;
    display: flex;
    justify-content: center;
    align-items: center;
}


.search-bar input {
    width: 50vw; 
    padding: 2vh;
    border: 2px solid #86869e; 
    border-radius: 20px; 
    font-size: 2vw; 
    outline: none; 
    transition: border 0.3s ease; 
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.search-bar input:focus {
    border-color: #004a99d3; 
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.search-bar input::placeholder {
    color: #888; 
    font-style: italic; 
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.red-button{
    background-color: rgba(170, 0, 0, 0.822);
}

.blue-button{
    background-color: rgba(0, 136, 170, 0.822);
}

.file-box2 {
    background-color: #333;
    color: white;
    padding: 3vh 3vw;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 60vw;
    margin-left: 20.4%;
    height: 30vw;
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 5%
}   


#file-list {
    list-style-type: none;
    padding: 0;
    text-align: left;
    font-size: 2.4vh;
}

#file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8vh 0;
    border-bottom: 1px solid #555;
    font-size: 2vh;
}

.file-icon {
    width: 4vw;
    height: 4vw;
    margin-right: 2vw;
}

@media (max-width: 900px) and (orientation: portrait) {
  .search-bar {
    justify-content: center;
    width: 50%;
  }

  #search-bar2 {
      margin-top: 2vh;
      justify-content: center;
      width: 50%;
  }

  h3 {
    text-align: center;
    width: 100%;
    margin: 2vh 0;
  }

  .search-bar input {
    width: 85vw;
    font-size: 5vw;
    padding: 2.5vh;
  }


  .file-box2 {
      background-color: #333;
      color: white;
      padding: 3vh 3vw;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      width: 100vw;
      margin-left: 0%;
      height: 120vw;
      max-height: 70vh;
      overflow-y: auto;
      margin-top: 5%
  }   

  #file-list {
      list-style-type: none;
      padding: 0;
      text-align: left;
      font-size: 2.4vh;
  }

  #file-list li {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1.8vh 0;
      border-bottom: 1px solid #555;
      font-size: 2vh;
  }
 .custom-modal { width: 95%; }
}

