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

body {
  font-family: Arial, sans-serif;
  background-color: #eaeaea;
  color: #000;
  /*min-width: 400px;*/
}

header {
  background-color: #333;
  color: #fff;
  /* padding: 1rem;
  /* text-align: center; */
}

.header-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.header-container h1 {
  margin: 0;
  margin-bottom: 10px;
  font-family: "Source Sans Pro", arial, sans-serif;
}


main {
  padding: 2rem;
  max-width: 900px;
  /*min-width: 400px;*/
  margin: 0 auto;
}


footer {
  background-color: #333;
  color: #999;
  /* padding: 1rem;
  text-align: center; */
  font-size: 0.8rem; 
}


footer a {
  color: #ccc;           
  text-decoration: none; 
}

footer a:hover {
  color: #ddd;           
  text-decoration: underline; 
}


.footer-container {
  max-width: 900px;   
  margin: 0 auto;    
  padding: 1rem 2rem; 
  text-align: left;  
}

.footer-container a {
  color: #ccc;       
  text-decoration: none;
}

.footer-container a:hover {
  color: #ddd;
  text-decoration: underline;
}

.subtitle,
.section-description {
  font-size: 0.8rem;      
  /* font-style: italic; */     
  color: #999;            
  display: block;
  white-space: pre-line;
  margin-bottom: 10px;
}


.card {
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}


#main-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}


#main-menu h2 {
  margin-bottom: 10px; 
} 


.tabs {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
  margin-top: 10px; 
}

.tab {
  flex: 1;
  background-color: #333333;
  color: #FFFFFF;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.tab.active {
  background-color: #007BFF;
  box-shadow: 0px 2px 4px rgba(0, 123, 255, 0.5);
}

.tab:hover {
  background-color: #007BFF;
}


#data-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#data-form input[type="text"],
#data-form input[type="email"],
#data-form textarea {
  width: 100%;
  height: 40px;
  line-height: 40px;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 16px;
  color: #000;
  box-sizing: border-box;
  transition: border-color 0.25s;
}

#data-form input[type="text"]::placeholder,
#data-form input[type="email"]::placeholder {
  color: #CCCCCC;
  line-height: 40px;
}


#data-form textarea {
  width: 100%;
  min-height: 70px;
  max-height: 200px;
  line-height: 1.5;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  padding: 10px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: #000;
  box-sizing: border-box;
  resize: vertical;
  overflow-y: auto;
  transition: border-color 0.25s;
}

#data-form textarea::placeholder {
  color: #CCCCCC;
}


#settings {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}



.settings-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.settings-row label {
  min-width: 120px;
}


#qr-size {
  width: 120px; 
  height: 40px;
  text-align: center;
  font-size: 0.9rem;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  margin: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none; 
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  /*margin-left: -5px !important;*/
}

#qr-size::-webkit-inner-spin-button,
#qr-size::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


#qr-size-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  outline: none;
  border-radius: 3px;
  margin-top: 5px;
  
  --slider-value: calc(((200 - 100) / (1024 - 100)) * 100%);
}

#qr-size-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: linear-gradient(to right, #333333 0%, #333333 var(--slider-value), darkgray var(--slider-value), darkgray 100%);
  border-radius: 3px;
}

#qr-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #333333;
  cursor: pointer;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

#qr-size-slider::-webkit-slider-thumb:hover {
  background: #007BFF;
}

#qr-size-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: linear-gradient(to right, #333333 0%, #333333 var(--slider-value), darkgray var(--slider-value), darkgray 100%);
  border-radius: 3px;
}

#qr-size-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #333333;
  cursor: pointer;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

#qr-size-slider::-moz-range-thumb:hover {
  background: #007BFF;
}


.color-row {
  flex-wrap: wrap;
  padding-top: 15px;
  padding-bottom: 5px;
}

.color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-picker input[type="color"] {
  width: 120px;
  height: 40px;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  cursor: pointer;
  box-sizing: border-box;
  outline: none; 
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.color-picker input[type="color"]:hover {
  border: 1px solid #007BFF;
  box-shadow: 0px 0px 4px rgba(0, 123, 255, 0.5); 
  outline: none; 
}


input[type="color"]::-webkit-color-swatch {
  border-radius: 5px !important; 
  border: none !important; 
  margin: 3px !important; 
}


input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0 !important;
  border-radius: 5px !important;
}


.color-picker span {
  font-size: 0.9rem;
  min-width: 120px;
  min-height: 40px;
  text-align: center;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  padding: 11px 3px;
}

.color-picker input[type="text"] {
  width: 120px; 
  height: 40px;
  text-align: center;
  font-size: 0.9rem;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  padding: 11px 3px;
  box-sizing: border-box;
  outline: none; 
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}


.color-picker input[type="text"]:hover {
  border: 1px solid #007BFF;
  box-shadow: 0px 0px 4px rgba(0, 123, 255, 0.5); 
  outline: none;
}

.checkbox-label {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}


.format-tabs {
  display: flex;
  gap: 10px;

}

.format-tab {
  /*padding: 10px 15px;*/
  width: 55px;
  height: 40px;
  background-color: #333333;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.format-tab.active,
.format-tab:hover {
  background-color: #007BFF;
}


.button-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  /*padding-bottom: 10px;*/
}

element.style {
  padding-bottom: 10px;
}


.btn {
  display: inline-flex;            
  align-items: center;            
  justify-content: center; 
  height: 40px;
  padding: 0 15px;
  background-color: #007BFF;
  color: #FFFFFF;
  font-size: 14px;                 
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background-color: #0056b3;
}


.preview-container {
  width: 200px;
  height: 200px;
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-container canvas,
.preview-container img,
.preview-container svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-size {
  text-align: center;
  font-size: 0.9rem;
  margin: 5px auto 0;
  color: #333;
}


#history {
  display: grid;
  grid-template-columns: repeat(auto-fit, 185px);
  row-gap: 20px;
  column-gap: 15px;
  justify-content: start;
  justify-items: center;
}


#history-section h2 {
  margin-bottom: 10px; 
}

.history-item {
  background-color: #FFFFFF;
  border: 1px solid #CCCCCC;
  padding: 10px;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px;
  text-align: center;
  width: 180px;
  /*position: relative;*/
  /*align-items: center;*/
  display: flex;
  flex-direction: column;
  gap: 5px;
}


.history-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
}

.history-item img {
  max-width: 100%;
  height: auto;
  margin-bottom: 5px;
  margin: 0 auto;          
  display: block;
}

.info-div {
  margin-bottom: 5px;
}

.format-info {
  font-size: 0.8rem;
  color: #555;
  margin-top: 3px;
}


.history-item .delete-btn {
  background: #a9a9a9;      
  color: #ffffff;       
  border: none;         
  font-size: 1rem;     
  cursor: pointer;
  width: 40px;           
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.history-item .delete-btn:hover {
  background-color: #f55050;    /* #f55050 */
  font-size: 1.5rem; 
}


.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #007BFF;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}


.wifi-encryption-tabs {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

.wifi-encryption-tabs .encryption-tab {
  padding: 10px 15px;
  background-color: #333333;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.wifi-encryption-tabs .encryption-tab:hover,
.wifi-encryption-tabs .encryption-tab.active {
  background-color: #007BFF;
  color: #FFFFFF;
}


.char-counter {
  text-align: right;
  font-size: 0.9rem;
  color: #333;
  margin-top: 5px;
}

@media (max-width: 500px) {

  main {
    padding: 1rem;
    padding-top: 2rem;
    margin: 0 auto;
  }


  .tabs {
    display: grid;                          
    grid-template-columns: repeat(3, 1fr);  
    gap: 10px;                             
  }
  .tab {
    flex: none;
    width: auto;      
  }

  }

  .color-picker {
    flex-direction: column;
    align-items: flex-start; 
    gap: 8px;
  }


  #settings {
    gap: 10px;
  }


  .btn {
    font-size: 13px;
  }


  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
