@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
html {
  height: 100%;
  scroll-behavior: smooth;
}
body {
  font-size: 16px;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #E7D7A8;
  background-size: cover;
  align-items: center;
  justify-content: center;
}
h2 {
  letter-spacing: normal;
  text-align: center;
  letter-spacing: -1px;
  margin: 10px 0;
}
.content{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.intro-section {
  max-width: 300px;
  margin-right: 20px;
  text-align: justify;
}

#logo {
  width: 150px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Base styles */
header {
  width: 100%;
  background-color: #F4EAD5;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  height: 50px;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  gap: 20px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #8B572A;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Mobile styles */
@media (max-width: 768px) {
  .hamburger {
      display: block;
  }

  .nav-menu {
      display: none;
      flex-direction: column;
      align-items: center;
      background-color: #F4EAD5;
      width: 100%;
      position: absolute;
      top: 60px;
      left: 0;
      box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
      display: flex;
  }

  .nav-links {
      flex-direction: column;
      gap: 10px;
      padding: 10px;
      align-items: center;
      text-align: center;
  }

  .nav-links li {
      width: 100%;
  }

  .nav-links li a {
    text-decoration: none;
    font-size: 18px;
    padding: 10px;
    width: 100%; 
    text-align: center;
  }
}



/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-container {
      flex-direction: column;
      align-items: center;
  }

  nav ul.nav-links {
      flex-direction: column;
      gap: 10px;
  }
}

.drawing-board {
  background: white;
  position: relative;
  width: 600px;
  height: 400px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
#drawing-board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}


#placeholder-glyph {
  opacity: 0.25;
  max-width: 100%;
  max-height: 100%;
  pointer-events: none;
}

.drawing-board canvas {
  position: absolute;
  top: 0;
  left: 0;
  background: none;
}

.container{
  display: flex;
  width: 100%;
  gap: 10px;
  padding: 10px;
  max-width: 800px;
}

section{
  border-radius: 7px;
}
.tools-board {
  background: white;
  width: 210px;
  padding: 15px 22px 0;
  display: flex;
  flex-direction: column; 
  justify-content: center;
  align-items: center;
}

.tools-board .row{
  margin-bottom: 20px;
}
.row .options{
  display: flex;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
  list-style: none;
  margin: 10px 0 0 5px;
  gap: 20px;
}
.row .options .option{
  display: flex;
  cursor: pointer;
  align-items: center;
  margin-bottom: 10px;
}
.option img {
  width: 30px;
  height: 30px;
  margin: auto;
}
.option:is(:hover, .active) img{
  filter: invert(17%) sepia(90%) saturate(3000%) hue-rotate(900deg) brightness(100%) contrast(100%);
}
.option :where(span, label){
  color: #8B572A;
  cursor: pointer;
  padding-left: 10px;
}
.option:is(:hover, .active) :where(span, label){
  color: #4A98F7;
}
.option #fill-color{
  cursor: pointer;
  height: 14px;
  width: 14px;
}
#fill-color:checked ~ label{
  color: #4A98F7;
}
#size-slider{
  width: 100%;
  height: 5px;
  margin-top: 10px;
}
.colors .options{
  display: flex;
  justify-content: space-between;
}
.colors .option{
  height: 20px;
  width: 20px;
  border-radius: 50%;
  margin-top: 3px;
  position: relative;
}
.colors .option:nth-child(1){
  background-color: #fff;
  border: 1px solid #bfbfbf;
}
.colors .option:nth-child(2){
  background-color: #000;
}
.colors .option:nth-child(3){
  background-color: #E02020;
}
.colors .option:nth-child(4){
  background-color: #6DD400;
}
.colors .option:nth-child(5){
  background-color: #4A98F7;
}
.colors .option.selected::before{
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  height: 12px;
  width: 12px;
  background: inherit;
  border-radius: inherit;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
}
.colors .option:first-child.selected::before{
  border-color: #ccc;
}
.option #color-picker{
  opacity: 0;
  cursor: pointer;
}
.buttons button{
  width: 100%;
  color: #fff;
  border: none;
  outline: none;
  padding: 11px 0;
  font-size: 0.9rem;
  margin-bottom: 13px;
  background: none;
  border-radius: 4px;
  cursor: pointer;
}
.buttons .clear-canvas{
  color: #6C757D;
  border: 1px solid #6C757D;
  transition: all 0.3s ease;
}
.clear-canvas:hover{
  color: #fff;
  background: #6C757D;
}
.buttons .save-img{
  background: #8B572A;
  border: 1px solid #8B572A;
}
.drawing-board{
  flex: 1;
  overflow: hidden;
}
.drawing-board canvas{
  width: 100%;
  height: 100%;
}

#completeMsg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1000;
}

#closeMsg {
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 20px;
}
#submit {
  background-color: #00B493;
  border-color: #00B493;
}

#submit:disabled {
  pointer-events: none;
  background-color: #ccc;
  color: #666;
  border: 1px solid #ccc;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  grid-gap: 10px;
  margin: 0 auto;
  padding: 10px;
  max-width: 800px;
  align-self: start;
}
.image-grid img {
  width: 100%;
  height: auto;
  border-radius: 5px; 
}

.selected-glyph {
  filter: invert(17%) sepia(90%) saturate(3000%) hue-rotate(900deg) brightness(100%) contrast(100%);
}

.loader {
  width: 50px;
  height: 50px;
  background-image: url('src/svg/45-KUCH@AB{}AK.svg');
  background-size: cover;
  animation: blink 1.5s infinite;
  margin: auto;
  display: none;
}

@keyframes blink {
  0% {
      opacity: 1;
  }
  50% {
      opacity: 0;
  }
  100% {
      opacity: 1;
  }
}



img {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}

.app-store-section {
  text-align: center;
  margin: 40px 0;
  background-color: #f6f2e9;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
}

.app-store-section h3 {
  font-size: 24px;
  color: #333;
}

.app-store-section p {
  font-size: 18px;
  color: #555;
  margin: 10px 0 20px;
}

.app-store-badge {
  width: 180px;
  height: auto;
}

.app-store-section p a {
  color: #8B572A;
  text-decoration: none;
  margin: 0 5px;
}

.app-store-section p a:hover {
  text-decoration: underline;
}

/* mobile screens */

@media (max-width: 768px) {
  .content {
      flex-direction: column;
      align-items: center;
  }

  .intro-section h2 {
    text-align: center;
  }
  .intro-section p {
    margin: 10px;
    font-size: 14px;
  }


  .intro-section, .container, .image-grid {
      width: 90%;
      max-width: none;
  }

  #logo {
      width: 100px;
  }

  .container {
      flex-direction: column;
      gap: 20px;
  }

  .drawing-board, .tools-board {
      width: 100%;
  }

  .drawing-board {
    height: auto;
    aspect-ratio: 3/2;
  }

  .drawing-board canvas {
    width: 100%;
    height: 100%;
  }

  .tools-board {
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      padding: 10px;
  }

  .tools-board .row {
      width: 100%;
      justify-content: space-around;
  }

  .tools-board .row .options, .tools-board .row.buttons {
      justify-content: center;
  }

  .image-grid {
      grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}

/* iPad/tablet screens */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
    font-size: 16px;
  }

  .intro-section h2 {
    text-align: center;
  }

  .content {
      flex-direction: column;
      align-items: center;
      padding: 20px 0;
  }

  .intro-section, .container, .image-grid {
      width: 95%;
      max-width: none;
  }

  #logo {
      width: 120px;
  }

  .container {
      flex-direction: column;
      align-items: center;
  }

  .drawing-board {
    width: 90%; 
    aspect-ratio: 16 / 9;
  }

  .drawing-board canvas {
      width: 100%;
      height: 100%;
  }

  .tools-board {
      order: 3;
      width: 90%;
      padding: 15px;
      flex-direction: row;
      justify-content: center;
      flex-wrap: wrap;
  }

  .tools-board .row {
      width: 100%;
      justify-content: space-evenly;
  }

  .image-grid {
      width: 100%;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}


/* Mockup Section */
.mockup-section {
  background: #f6f2e9;
  padding: 100px 40px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.mockup-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1200px;
}

.mockup-image {
  width: 350px;
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
}

.mockup-text {
  max-width: 500px;
  text-align: left;
}

.mockup-text h1 {
  font-size: 36px;
  color: #333;
  margin-bottom: 15px;
}

.mockup-text p {
  font-size: 18px;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.5;
}

.mockup-text .app-store-badge {
  width: 200px;
  height: auto;
}

/* Responsive for smaller devices */
@media (max-width: 768px) {
  .mockup-content {
      flex-direction: column;
      align-items: center;
      gap: 20px;
  }

  .mockup-text {
      text-align: center;
  }

  .mockup-text h1 {
      font-size: 28px;
  }

  .mockup-text p {
      font-size: 16px;
  }

  .mockup-image {
      width: 300px;
  }
}