body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.editor {
  flex: 1;
  display: flex;
}

.left-panel {
  width: 200px;
  background: #c4c4c4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.left-panel input {
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.canvas-area {
  flex: 1;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

canvas {
  border: 2px solid #999;
  max-width: 100%;
  max-height: 100%;
  background: #f9f9f9;
}

/* Bottom Toolbar */
.bottom-toolbar {
  height: 80px;
  background: #333;
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: #fff;
}

.toolbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}

.toolbar-item i {
  font-size: 20px;
  margin-bottom: 5px;
}

.toolbar-item:hover {
  color: #00bfff;
}

/* Right-side Panel */
.right-panel {
  position: fixed;
  top: 0;
  right: -350px;
  width: 300px;
  height: 100%;
  background: #f4f4f4;
  box-shadow: -5px 0 15px rgba(0,0,0,0.3);
  padding: 20px;
  transition: right 0.3s;
  overflow-y: auto;
}

.right-panel.active {
  right: 0;
}

.right-panel h4 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 15px;
}

.right-panel select,
.right-panel input[type="range"],
.right-panel button {
  width: 100%;
  margin-bottom: 10px;
  padding: 5px;
  border-radius: 6px;
  border: 1px solid #999;
}

/* Filter Cards Container */
.filter-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

/* Category Titles inside filter-cards */
.filter-cards h3 {
  flex-basis: 100%;      /* Make title take full width */
  margin: 10px 0 5px 0;  /* Add spacing above/below */
  font-size: 16px;
  color: #333;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
}

/* Individual filter card */
.filter-card {
  flex: 0 0 40%;          /* Two cards per row */
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  transition: 0.2s;
}

.filter-card i {
  font-size: 24px;
  margin-bottom: 5px;
  display: block;
}

.filter-card:hover {
  background: #00bfff;
  color: #fff;
}


/* Upload Card */
.upload-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #999;
  border-radius: 12px;
  padding: 30px;
  width: 180px;
  height: 150px;
  cursor: pointer;
  transition: 0.3s;
  text-align: center;
  color: #555;
  position: relative;
}

.upload-card:hover {
  border-color: #00bfff;
  background: #f0f8ff;
  color: #00bfff;
}

/* Hide default file input */
.upload-card input[type="file"] {
  display: none;
}

.upload-card i {
  margin-bottom: 10px;
}

.upload-card.dragover {
  border-color: #00bfff;
  background: #e0f7ff;
  color: #00bfff;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.download-btn {
  padding: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  background: #00bfff;
  color: #fff;
  transition: 0.2s;
}

.download-btn:hover {
  background: #0095d1;
}

#imageName {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #999;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}


.adjustment-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adjustment-controls label {
  font-weight: bold;
}

.adjustment-controls input[type="range"] {
  width: 100%;
  margin-bottom: 10px;
}

.adjustment-controls button {
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #00bfff;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.adjustment-controls button:hover {
  background: #0095d1;
}

.effect-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.effect-card {
  flex: 0 0 40%;
  background: #fff;
  border-radius: 8px;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: 0.2s;
}

.effect-card:hover {
  background: #00bfff;
  color: #fff;
}

.effect-card i {
  font-size: 24px;
  display: block;
  margin-bottom: 5px;
}

.font-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.font-card {
  padding: 10px;
  border: 1px solid #888;
  border-radius: 6px;
  cursor: pointer;
  min-width: 100px;
  text-align: center;
  transition: all 0.2s;
}

.font-card:hover {
  transform: scale(1.05);
  border-color: #fff;
}

/* 📱 MOBILE RESPONSIVE STYLES */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .editor {
    flex-direction: column;
  }

  .left-panel {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    padding: 10px;
    background: #dcdcdc;
  }

  .upload-card {
    flex-direction: row;
    gap: 10px;
    padding: 10px 15px;
  }

  .canvas-area {
    flex: 1;
    width: 100%;
    height: calc(100vh - 200px);
  }

  canvas {
    width: 800px;
    height: 500px;
  }

  /* Bottom toolbar: scrollable on mobile */
  .bottom-toolbar {
    height: auto;
    padding: 10px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .toolbar-item {
    flex: 0 0 auto;
    margin: 0 12px;
  }

  /* Make panels slide up from bottom on mobile */
  .right-panel {
    width: 100%;
    height: 50%;
    right: 0;
    bottom: -60%;
    top: auto;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
    transition: bottom 0.3s;
  }

  .right-panel.active {
    bottom: 0;
  }

  .panel-header {
    position: sticky;
    top: 0;
    background: #f4f4f4;
    padding-bottom: 5px;
  }
}
