@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

.mousepad-editor {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 20px 0;
  margin-top: 30px;
  border-top: 1px solid #e5e5e5;
}

.mousepad-editor *,
.mousepad-editor *::before,
.mousepad-editor *::after {
  box-sizing: border-box;
}

.mpe-canvas-caption {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin: 0 0 5px;
}
.mpe-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 1px;
  color: #004774;
  margin: 0;
  line-height: 1;
  text-align: center;
}

.mpe-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.mpe-layout > .mpe-canvas-wrap {
  flex: 1 1 60%;
  max-width: none;
  margin: 0;
  position: sticky;
  top: 20px;
}
.mpe-layout > .mpe-accordion {
  flex: 1 1 40%;
  max-width: 420px;
}
@media (max-width: 991px) {
  .mpe-layout {
    flex-direction: column;
  }
  .mpe-layout > .mpe-canvas-wrap,
  .mpe-layout > .mpe-accordion {
    flex: 1 1 100%;
    max-width: 100%;
    position: static;
  }
}

.mpe-canvas-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 25px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.mpe-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
}
.mpe-canvas-toolbar {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px;
  background: #fafafa;
}
.mpe-tool-btn {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #004774;
  transition: all .2s;
}
.mpe-tool-btn:hover {
  background: #ee7a03;
  color: #fff;
  border-color: #ee7a03;
}

.mpe-bg-thumb.mpe-active {
  border-color: #ee7a03 !important;
  border-width: 3px !important;
  box-shadow: 0 0 0 2px #fff7ee;
}

.mpe-slider-label {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #004774;
}
.mpe-slider-label input[type="range"] {
  width: 100%;
  margin-top: 6px;
}

.mpe-text-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.mpe-text-controls label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  gap: 4px;
}
.mpe-text-controls select,
.mpe-text-controls input[type="number"] {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
.mpe-style-btns {
  display: flex;
  gap: 4px;
}
.mpe-style-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  color: #004774;
  transition: all .2s;
}
.mpe-style-btn:hover {
  border-color: #ee7a03;
}
.mpe-style-btn.mpe-active-style {
  background: #ee7a03;
  color: #fff;
  border-color: #ee7a03;
}
.mpe-text-controls input[type="color"] {
  width: 50px;
  height: 36px;
  padding: 2px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.mpe-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mpe-item {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.mpe-item.mpe-open {
  overflow: visible;
}

.mpe-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #f7f7f7;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #004774;
  text-align: left;
  transition: background 0.2s;
}

.mpe-head:hover {
  background: #eef3f8;
}

.mpe-arrow {
  font-size: 22px;
  font-weight: 400;
  color: #ee7a03;
  transition: transform 0.2s;
}

.mpe-item.mpe-open .mpe-arrow {
  transform: rotate(45deg);
}

.mpe-item.mpe-open .mpe-head {
  background: #eef3f8;
}

.mpe-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  opacity: 0;
  background: #fff;
  transition: max-height .8s cubic-bezier(.25,.1,.25,1), padding .6s ease, opacity .5s ease;
}

.mpe-item.mpe-open .mpe-body {
  max-height: 2000px;
  padding: 18px;
  opacity: 1;
  overflow: visible;
  transition: max-height 1s cubic-bezier(.25,.1,.25,1), padding .5s ease, opacity .6s ease .15s;
}

.mpe-arrow {
  transition: transform .5s cubic-bezier(.25,.1,.25,1);
}

.mpe-hint {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #666;
}

.mpe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.mpe-thumb {
  aspect-ratio: 1;
  border: 2px dashed #ccc;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  transition: border-color 0.2s;
}

.mpe-thumb:hover {
  border-color: #ee7a03;
}

.mpe-thumb-img {
  border-style: solid;
  border-color: #ddd;
}

.mpe-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: #ee7a03;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 14px;
  transition: background 0.2s;
}

.mpe-upload:hover {
  background: #d96d00;
}

.mpe-upload input[type="file"] {
  display: none;
}

.mpe-text-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
}

.mpe-text-input:focus {
  outline: none;
  border-color: #ee7a03;
}

.mpe-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 14px;
  color: #999;
  font-size: 13px;
  font-weight: 600;
}
.mpe-divider::before,
.mpe-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e5e5e5;
}
.mpe-divider span {
  padding: 0 12px;
}
.mpe-subtitle {
  font-weight: 600;
  color: #004774;
  margin-top: 0;
}

.mpe-cdz {
  border: 2px dashed #ccd5e0;
  border-radius: 6px;
  padding: 28px 18px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: all .2s;
}
.mpe-cdz:hover,
.mpe-cdz.mpe-cdz-over {
  border-color: #ee7a03;
  background: #fff7ee;
}
.mpe-cdz-icon {
  font-size: 38px;
  color: #004774;
  line-height: 1;
  margin-bottom: 8px;
}
.mpe-cdz-title {
  font-weight: 600;
  color: #004774;
  font-size: 15px;
  margin-bottom: 4px;
}
.mpe-cdz-sub {
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}
.mpe-cdz input[type="file"] {
  display: none;
}

.mpe-cbg-preview {
  text-align: center;
}
.mpe-cbg-img {
  width: 100%;
  max-width: 320px;
  height: 180px;
  margin: 0 auto 12px;
  background-size: cover;
  background-position: center;
  border: 2px solid #004774;
  border-radius: 6px;
}
.mpe-cbg-delete {
  background: #fff;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
}
.mpe-cbg-delete:hover {
  background: #e74c3c;
  color: #fff;
}

.mpe-cbg-loading {
  text-align: center;
  padding: 20px;
  color: #004774;
  font-weight: 600;
}
.mpe-cbg-error {
  background: #fee;
  border: 1px solid #e74c3c;
  color: #c0392b;
  padding: 10px 14px;
  border-radius: 4px;
  margin-top: 10px;
  font-size: 13px;
}

@media (max-width: 767px) {
  .mpe-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
  .mpe-title {
    text-align: center;
  }
}
