@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

body {
  font-family: 'Arial', sans-serif;
  background-color: #1e1e1e;
  color: #f0f0f0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}
.pixel-title {
  font-size: 20px;
  text-transform: uppercase;
}

.default-cursor {
  cursor: url('../default.png'), auto !important;
}


.eraser-mode {
  cursor: url('../eraser.png'), auto !important;
}



.workspace {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  height: calc(100vh - 40px); 
  background-color: #2b2b2b;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.sidebar {
  background-color: #333;
  padding: 20px;
  border-radius: 10px;
  overflow-y: auto; 
}

.left-sidebar {
  grid-column: 1 / 2;
}

.right-sidebar {
  grid-column: 3 / 4;
}

.canvas-container {
  grid-column: 2 / 3;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #222;
  border-radius: 10px;
  padding: 15px;
  overflow: hidden; 
  position: relative;
}

#pixelCanvas {
  border: 1px solid #444;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  image-rendering: pixelated;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: auto; 
}

.tool-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-button {
  background-color: #444;
  color: #f0f0f0;
  border: solid #444;
  padding: 10px;
  border-radius: 5px;
  flex: 1 1 calc(25% - 10px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}
.tool-button:hover {
  background-color: #555;
  transform: scale(1.05);
}




.dropdown {
  background-color: #444;
  color: #ffffff;
  border: solid #444;
  padding: 10px;
  width: 80%;
  margin-bottom: 10px;
  border-radius: 5px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.color-picker {
  background-color: #444;
  color: #ffffff;
  border: solid #444;
  padding: 3px;
  width: 80%;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 5px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

input  {
  padding: 10px;
  margin-bottom: 15px;
}
.tool-button.active {
border-color: #ffc815 ;
  color: white;
}

.palette-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.palette-color {
  width: 20px;
  height: 20px;
  border: 1px solid #000;
  cursor: pointer;
}


.file-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.file-upload-input {
  display: none;
}


.file-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #444;
  color: #f0f0f0;
  border: solid #444;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  text-align: center;
}

.file-upload-button:hover {
  background-color: #555;
  transform: scale(1.05);
}

.file-upload-button i {
  font-size: 18px;
}


.file-upload-button:active {
  background-color: #666;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer {
  position: fixed;
  bottom: 5%;
  width: 200px;
  padding: 10px;
  color: #fff;
  background-color: #333;
  text-align: center;
  font-size: 14px;
  border-radius: 10px;
  z-index: 1000;
}

.footer.left {
  left: 10px;
}

.footer.right {
  right: 10px;
}

.footer a {
  color: #4da6ff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}




@media (max-width: 768px) {
  .workspace {
    flex-direction: column;
  }

  .left-sidebar,
  .right-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ccc;
  }

  .canvas-container {
    flex-grow: 1;
  }

  canvas {
    max-width: 100%;
    height: 70%;
  }

  .tool-button {
    padding: 0.4rem;
  }
}

@media (max-width: 480px) {
  .left-sidebar,
  .right-sidebar {
    padding: 0.5rem;
  }

  .tool-button {
    font-size: 0.8rem;
    padding: 0.3rem;
  }

  canvas {
    height: 60%;
  }
}




:root {
  --scrollbar-track-color: #282525;
  --scrollbar-thumb-color: #444; 
  --scrollbar-thumb-hover-color: #3f3c3c; /
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover-color);
}








.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  background-color: #2b2b2b;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  z-index: 1000;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
  padding: 20px;
  color: #f0f0f0;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #f0f0f0;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-button:hover {
  color: #ffc815;
}

.modal h2 {
  font-size: 22px;
  margin-bottom: 15px;
  text-align: center;
  color: #ffc815;
}

.search-bar {
  width: 95%;
  padding: 10px 15px;
  margin-bottom: 15px;
  font-size: 16px;
  background-color: #444;
  color: #f0f0f0;
  border: none;
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-bar::placeholder {
  color: #aaa;
}


.modal.hidden {
  display: none;
}

.item-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.item {
  width: 50px;
  height: 50px;
  background-size: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.item:hover {
  border-color: #0078d7;
}




.modal-alert {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85); 
  animation: fadeIn 0.5s ease-in-out;
}

.modal-alert-content {
  position: relative;
  background: #1e1e1e;
  color: #f0f0f0;
  border-radius: 12px;
  padding: 30px 20px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: slideIn 0.6s ease-out;
}

.modal-alert-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  color: #ffc107;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.modal-alert-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #ddd;
}

.modal-alert-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.modal-alert-content li::before {
  content: "⟡";
  color: #ffc107;
  margin-right: 8px;
  font-size: 1.2rem;
}

.modal-alert-content button {
  background: #ffc107;
  color: #1e1e1e;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.3s;
}

.modal-alert-content button:hover {
  background: #ffb300;
  transform: scale(1.05);
}

.modal-image {
  width: 120px;
  height: 120px;
  margin-bottom: 15px;
  animation: bounceIn 1s ease-in-out;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  80% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 768px) {
  .modal-alert-content {
    padding: 20px 15px;
    width: 95%;
    max-width: 400px;
  }

  .modal-alert-content h2 {
    font-size: 1.4rem;
  }

  .modal-alert-content p {
    font-size: 0.9rem;
  }

  .modal-alert-content button {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .modal-image {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .modal-alert-content {
    padding: 15px 10px;
    border-radius: 8px;
  }

  .modal-alert-content h2 {
    font-size: 1.2rem;
  }

  .modal-alert-content p {
    font-size: 0.8rem;
  }

  .modal-alert-content ul {
    font-size: 0.8rem;
  }

  .modal-alert-content button {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .modal-image {
    width: 80px;
    height: 80px;
  }
}