.rotate-editor {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.rotate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
  gap: 1rem;
}

.rotate-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rotate-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: #ffffff;
  color: #555555;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rotate-action-btn:hover {
  border-color: rgba(0, 0, 0, 0.25);
  color: #000000;
  transform: translateY(-1px);
}

.rotate-action-btn i {
  font-size: 1rem;
}

.rotate-state {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: #f5f5f5;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #666666;
  white-space: nowrap;
}

.rotate-state-value {
  color: #000000;
  font-family: 'Nunito', monospace;
}

.rotate-dimensions {
  padding-left: 0.5rem;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  font-family: 'Nunito', monospace;
  color: #999999;
}

.rotate-canvas-container {
  position: relative;
  width: 100%;
  min-height: 320px;
  max-height: 560px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background-color: #f3f3f3;
  background-image:
    linear-gradient(45deg, #e6e6e6 25%, transparent 25%),
    linear-gradient(-45deg, #e6e6e6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e6e6 75%),
    linear-gradient(-45deg, transparent 75%, #e6e6e6 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

#rotateCanvas {
  display: block;
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  background: transparent;
}

.rotate-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
}

.btn-rotate-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  font-weight: 800;
  color: #555555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-rotate-reset:hover {
  border-color: rgba(0, 0, 0, 0.25);
  color: #000000;
  transform: translateY(-1px);
}

.btn-rotate-reset i {
  font-size: 1rem;
}

@media (max-width: 640px) {
  .rotate-toolbar {
    padding: 0.75rem 1rem;
    align-items: stretch;
  }

  .rotate-actions-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .rotate-action-btn {
    justify-content: center;
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
  }

  .rotate-state {
    width: 100%;
    justify-content: center;
  }

  .rotate-canvas-container {
    min-height: 260px;
    max-height: 420px;
    padding: 1rem;
  }

  #rotateCanvas {
    max-height: 360px;
  }

  .rotate-controls {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .rotate-controls .btn-convert,
  .rotate-controls .btn-rotate-reset,
  .rotate-controls .btn-clear {
    width: 100%;
    justify-content: center;
    font-size: 0.8125rem;
    padding: 0.75rem 1rem;
  }
}
