/* ===== Base Styles ===== */
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #245a6a, #2C6E82);
  color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  color: #fff;
  text-align: center;
  background: #1f4d5a;
  padding: 15px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: 1px;
}

/* ===== Layout ===== */
.Tools {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  flex: 1;
}

aside {
  background: #82572C;
  padding: 15px;
  border-radius: 10px;
  color: #fff;
  text-align: center;
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

aside h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 6px;
}

.Canvas {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  background: #fff;
  border-radius: 6px;
  display: block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.resizable-container {
  position: relative;
  display: inline-block;
}

.resizer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  cursor: se-resize;
  background: #FFD700;
  border-top-left-radius: 4px;
  box-shadow: -1px -1px 3px rgba(0,0,0,0.3);
  z-index: 10;
}

/* ===== Buttons ===== */
button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #5F9B9D, #4a7f81);
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

button:hover {
  background: #FFD700;
  color: #111;
  transform: translateY(-2px);
}

aside button.active {
  background: #FFD700;
  color: #111;
  font-weight: bold;
}

aside button span {
  font-size: 1.2rem;
}

/* ===== Logo & Inputs ===== */
.logo-container {
  align-items: center;
  text-align: center;
  margin-bottom: 12px;
}

.pulogo {
  width: 90px;
  height: 90px;
}

#artName {
  color: #fff;
  font-size: 14px;
  margin-top: 5px;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
}

/* ===== Popups ===== */
.modal {
  display: none;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: fixed;
  z-index: 9999;
}

.popup-content {
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
  width: 280px;
  min-height: 100px;
  animation: fadeIn 0.25s ease;
}

#popup .popup-content {
  background: #82572C;
}

#savePopup .popup-content {
  background: #5F9B9D;
  width: 320px;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .Tools {
    flex-direction: column;
    align-items: center;
  }
  aside {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}