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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #e0eafc, #cfdef3);
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 10px;
}

.container {
  width: 90%;
  max-width: 850px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  padding: 25px;
  position: relative;
  transition: transform 0.3s;
}

.container:hover {
  transform: translateY(-5px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 20px;
  background-color: #f1f1f1;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.toolbar button,
.toolbar select,
.toolbar input {
  margin: 5px;
}

.text-area {
  min-height: 350px;
  border: 2px dashed #bbb;
  border-radius: 8px;
  padding: 15px;
  position: relative;
  background-color: #fdfdfd;
  overflow: hidden;
}

#drawingCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.text-element {
  position: absolute;
  cursor: move;
  font-size: 16px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.dropbtn {
  background-color: #4caf50;
  color: white;
  padding: 10px 16px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000; 
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 50px; 
  left: 10px;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-radius: 4px;
}

.dropdown-content.show {
  display: block;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
}

.dropdown-content a:hover {
  background-color: #ddd;
}

@media (max-width: 768px) {
  .dropbtn {
    font-size: 14px;
    padding: 8px 12px;
  }
  
  .dropdown-content {
    min-width: 120px;
  }

  .dropdown-content a {
    font-size: 12px;
  }
}
.toolbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 20px;
  background-color: #f1f1f1;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}


.toolbar button {
  background-color: #4caf50; 
  color: white;
  font-size: 18px; 
  padding: 12px 20px; 
  margin: 5px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.toolbar button:hover {
  background-color: #45a049; 
  transform: scale(1.05); 
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.toolbar button:active {
  background-color: #3e8e41;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: scale(0.98);
}

.dropbtn {
  background-color: #4caf50;
  color: white;
  padding: 12px 20px;
  font-size: 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  transition: all 0.3s ease;
}

.dropbtn:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

.toolbar select,
.toolbar input {
  padding: 10px 14px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s ease;
}

.toolbar select:focus,
.toolbar input:focus {
  border-color: #4caf50;
}

/* Add Text Button */
.toolbar button[title="Add Text"] {
  background-color: #2196f3; 
}

.toolbar button[title="Add Text"]:hover {
  background-color: #1e88e5; 
}

.toolbar button[title="Eraser"] {
  background-color: #f44336; 
}

.toolbar button[title="Eraser"]:hover {
  background-color: #e53935; 
}

.toolbar button[title="Undo"],
.toolbar button[title="Redo"] {
  background-color: #ff9800; 
}

.toolbar button[title="Undo"]:hover,
.toolbar button[title="Redo"]:hover {
  background-color: #fb8c00; 
}

@media (max-width: 768px) {
  .toolbar button {
    font-size: 16px;
    padding: 10px 14px;
  }

  .dropbtn {
    font-size: 16px;
    padding: 10px 14px;
  }

  .toolbar select,
  .toolbar input {
    font-size: 14px;
    padding: 8px 10px;
  }
}
